Skip to content

Commit cfad0b1

Browse files
committed
feature/add-udev-rules: Fix broken unit test
Signed-off-by: Alexey Gladkov <[email protected]>
1 parent a84a4b4 commit cfad0b1

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
@cwd@/@ts@/bin/xcdrom_id
2+
tifm_sd
23
rc=0

features/add-udev-rules/tests/ts0003-RUN-with-builtins/run

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
cwd="${0%/*}"
44

5+
export UDEV_RULES_PRINT_MODULES=1
56
export UDEVADM="xudevadm"
67
export PATH="$cwd/bin:$PATH"
78

tools/find-udev-rule-externals

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,16 @@ done
165165

166166
# Optional not fatal detection.
167167
if [ "${#MODULES[@]}" -gt 0 ]; then
168-
printf '%s\n' "${MODULES[@]}" |
169-
sort -u |
170-
depinfo --input=- \
171-
${USE_MODPROBE_BLACKLIST:+--use-blacklist} \
172-
--set-version="$kernel" \
173-
--no-prefix \
174-
2>/dev/null ||:
168+
if [ -z "${UDEV_RULES_PRINT_MODULES-}" ]; then
169+
printf '%s\n' "${MODULES[@]}" |
170+
sort -u |
171+
depinfo --input=- \
172+
${USE_MODPROBE_BLACKLIST:+--use-blacklist} \
173+
--set-version="$kernel" \
174+
--no-prefix \
175+
2>/dev/null ||:
176+
else
177+
printf '%s\n' "${MODULES[@]}" |
178+
sort -u
179+
fi
175180
fi

0 commit comments

Comments
 (0)