diff options
Diffstat (limited to 'automated/linux/usb/usb-test-basic.sh')
-rwxr-xr-x | automated/linux/usb/usb-test-basic.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/automated/linux/usb/usb-test-basic.sh b/automated/linux/usb/usb-test-basic.sh index 9b834c6..a8360ab 100755 --- a/automated/linux/usb/usb-test-basic.sh +++ b/automated/linux/usb/usb-test-basic.sh @@ -25,6 +25,7 @@ . ../../lib/sh-test-lib OUTPUT="$(pwd)/output" RESULT_FILE="${OUTPUT}/result.txt" +RET=0 usage() { echo "Usage: $0 [-s <true>]" 1>&2 @@ -60,9 +61,15 @@ examine_all_usb_devices() { echo "=======================================" echo "lsusb -D "${USB_BUS}""${bus}"/"${device}"" lsusb -D "${USB_BUS}""${bus}"/"${device}" + increment_return_status $RET + RET=$? done done - echo "examine_all_usb_devices pass" | tee -a "${RESULT_FILE}" + if [ $RET -ne 0 ]; then + echo "examine_all_usb_devices fail" | tee -a "${RESULT_FILE}" + else + echo "examine_all_usb_devices pass" | tee -a "${RESULT_FILE}" + fi else echo "examine_all_usb_devices fail" | tee -a "${RESULT_FILE}" fi |