diff --git a/adrv1crr/adrv_crr_test/test_nav.sh b/adrv1crr/adrv_crr_test/test_nav.sh index 6e6ffa42..a6c5c59e 100755 --- a/adrv1crr/adrv_crr_test/test_nav.sh +++ b/adrv1crr/adrv_crr_test/test_nav.sh @@ -12,22 +12,22 @@ run_test $TEST_ID "$SHORT_DESC" "$CMD" TEST_ID="02" SHORT_DESC="double press BT0 - timeout 10 seconds" -CMD="timeout 10 evtest /dev/input/by-path/platform-gpio_keys-event | grep -m 2 \"type 1 (EV_KEY), code 105 (KEY_LEFT), value 1\" > /dev/null" +CMD="timeout 10 evtest /dev/input/by-path/platform-gpio_keys-event | grep -m 1 \"type 1 (EV_KEY), code 105 (KEY_LEFT), value 0\" > /dev/null" run_test $TEST_ID "$SHORT_DESC" "$CMD" TEST_ID="03" SHORT_DESC="double press BT1 - timeout 10 seconds" -CMD="timeout 10 evtest /dev/input/by-path/platform-gpio_keys-event | grep -m 2 \"type 1 (EV_KEY), code 106 (KEY_RIGHT), value 1\" > /dev/null" +CMD="timeout 10 evtest /dev/input/by-path/platform-gpio_keys-event | grep -m 1 \"type 1 (EV_KEY), code 106 (KEY_RIGHT), value 0\" > /dev/null" run_test $TEST_ID "$SHORT_DESC" "$CMD" TEST_ID="04" SHORT_DESC="double press BT2 - timeout 10 seconds" -CMD="timeout 10 evtest /dev/input/by-path/platform-gpio_keys-event | grep -m 2 \"type 1 (EV_KEY), code 28 (KEY_ENTER), value 1\" > /dev/null" +CMD="timeout 10 evtest /dev/input/by-path/platform-gpio_keys-event | grep -m 1 \"type 1 (EV_KEY), code 28 (KEY_ENTER), value 0\" > /dev/null" run_test $TEST_ID "$SHORT_DESC" "$CMD" TEST_ID="05" SHORT_DESC="double press BT3 - timeout 10 seconds" -CMD="timeout 10 evtest /dev/input/by-path/platform-gpio_keys-event | grep -m 2 \"type 1 (EV_KEY), code 1 (KEY_ESC), value 1\" > /dev/null" +CMD="timeout 10 evtest /dev/input/by-path/platform-gpio_keys-event | grep -m 1 \"type 1 (EV_KEY), code 1 (KEY_ESC), value 0\" > /dev/null" run_test $TEST_ID "$SHORT_DESC" "$CMD" TEST_ID="06" diff --git a/adrv1crr/lib/production.sh b/adrv1crr/lib/production.sh index bf5a7df5..d8f317bf 100644 --- a/adrv1crr/lib/production.sh +++ b/adrv1crr/lib/production.sh @@ -20,7 +20,7 @@ show_start_state() { } get_board_serial() { - BOARD_SERIAL=$(ssh_cmd "dmesg | grep SPI-NOR-UniqueID | cut -d' ' -f9 | tr -d '[:cntrl:]'") + BOARD_SERIAL=$(ssh_cmd "dmesg | grep SPI-NOR-UniqueID | cut -d' ' -f9 | tr -d '[:cntrl:]'") # to be updated with a serial number from carrier } get_fmcomms_serial() { @@ -37,10 +37,10 @@ handle_error_state() { FAILED=1 inc_fail_stats "$serial" console_ascii_failed - if [ -n "$serial" ] ; then + if [ $SYNCHRONIZATION -eq 0 ]; then cat "$LOGFILE" > "$LOGDIR/failed_${serial}_${RUN_TIMESTAMP}.log" else - cat "$LOGFILE" > "${ERRORSFILE}_${RUN_TIMESTAMP}" + cat "$LOGFILE" > "$LOGDIR/no_date_failed_${serial}_${RUN_TIMESTAMP}.log" fi cat /dev/null > "$LOGFILE" } @@ -191,7 +191,7 @@ production() { timedatectl | grep "synchronized: yes" SYNCHRONIZATION=$? if [ $SYNCHRONIZATION -ne 0 ]; then - echo_red "Your time and date is not up-to-date. The times of the logs will be inaccurate" + echo_red "Your time and date is not up-to-date. The times of the logs will be inaccurate. The corresponding log files will begin with \"no_date\"" fi case $MODE in @@ -206,21 +206,6 @@ production() { handle_error_state "$BOARD_SERIAL" fi ;; - "ADRV SOM Test") - ssh_cmd "sudo /home/analog/adrv_som_test/som_test.sh" - if [ $? -ne 0 ]; then - handle_error_state "$BOARD_SERIAL" - fi - ;; - "ADRV FMCOMMS8 RF test") - ssh_cmd "sudo /home/analog/adrv_fmcomms8_test/fmcomms8_test.sh" - RESULT=$? - get_fmcomms_serial - python3 -m pytest --color yes $SCRIPT_DIR/work/pyadi-iio/test/test_adrv9009_zu11eg_fmcomms8.py -v - if [ $? -ne 0 ] || [ $RESULT -ne 0 ]; then - handle_error_state "$BOARD_SERIAL" - fi - ;; *) echo "invalid option $MODE" ;; esac @@ -229,9 +214,13 @@ production() { fi if [ "$FAILED" == "0" ] ; then - inc_pass_stats "$BOARD_SERIAL" - cat "$LOGFILE" > "$LOGDIR/passed_${BOARD_SERIAL}_${RUN_TIMESTAMP}.log" - cat /dev/null > "$LOGFILE" + inc_pass_stats "$BOARD_SERIAL" + if [ $SYNCHRONIZATION -eq 0 ]; then + cat "$LOGFILE" > "$LOGDIR/passed_${BOARD_SERIAL}_${RUN_TIMESTAMP}.log" + else + cat "$LOGFILE" > "$LOGDIR/no_date_passed_${BOARD_SERIAL}_${RUN_TIMESTAMP}.log" + fi + cat /dev/null > "$LOGFILE" fi }