From f77e83c8bcc474dbdfdd4ef5c5102ffbec0bc6d2 Mon Sep 17 00:00:00 2001 From: Artur Wilczak Date: Fri, 28 Nov 2025 13:57:17 +0100 Subject: [PATCH] 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 --- test-case/test-jack-detection-dsp-d3.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test-case/test-jack-detection-dsp-d3.sh b/test-case/test-jack-detection-dsp-d3.sh index 34ca434f..1cea9809 100755 --- a/test-case/test-jack-detection-dsp-d3.sh +++ b/test-case/test-jack-detection-dsp-d3.sh @@ -168,14 +168,13 @@ main() start_test dlogi "Checking usbrelay availability..." - if ! command -v usbrelay > /dev/null; then + command -v usbrelay || { # If usbrelay package is not installed skip_test "usbrelay command not found." - fi - - if ! usbrelay_switch --debug > /dev/null; then + } + usbrelay_switch --debug || { skip_test "Failed to get usbrelay status." - fi + } dlogi "Reset USB Relay - plug jack audio." usbrelay_switch "$relay" 0