Skip to content

Commit f77e83c

Browse files
committed
tests: jd-desp-d3: Fix skipping command
Fixed test skipping bug on non SDW platforms, if the usbrelay module is not installed. Signed-off-by: Artur Wilczak <arturx.wilczak@intel.com>
1 parent e4b2c87 commit f77e83c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test-case/test-jack-detection-dsp-d3.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,13 @@ main()
168168
start_test
169169

170170
dlogi "Checking usbrelay availability..."
171-
if ! command -v usbrelay > /dev/null; then
171+
command -v usbrelay || {
172172
# If usbrelay package is not installed
173173
skip_test "usbrelay command not found."
174-
fi
175-
176-
if ! usbrelay_switch --debug > /dev/null; then
174+
}
175+
usbrelay_switch --debug || {
177176
skip_test "Failed to get usbrelay status."
178-
fi
177+
}
179178

180179
dlogi "Reset USB Relay - plug jack audio."
181180
usbrelay_switch "$relay" 0

0 commit comments

Comments
 (0)