diff --git a/gui/basic_regression.bash b/gui/basic_regression.bash index 8fd5d0c9..75624575 100755 --- a/gui/basic_regression.bash +++ b/gui/basic_regression.bash @@ -110,6 +110,11 @@ function pre_test { fi } +function reboot_dut { + ../openwrt_ctl.py --action reboot --tty $AP_SERIAL --scheme serial + # TODO: Support hard-power cycle with power-ctl switch as well? +} + function post_test { DEST=$1 mkdir -p $DEST/logs @@ -126,6 +131,9 @@ function post_test { # Kill any existing processes on this serial port pkill -f ".*openwrt_ctl.*$AP_SERIAL.*" mv $MY_TMPDIR/dut_console_log.txt $DEST/logs/ + + # detect a few fatal flaws and reqest AP restart if found. + grep "Hardware became unavailable" $DEST/logs/dut_console_log.txt && reboot_dut fi mv $MY_TMPDIR/basic_regression_log.txt $DEST/logs/test_automation_log.txt diff --git a/gui/lf_gui_report_summary.pl b/gui/lf_gui_report_summary.pl index 03ebe670..9a9afee9 100755 --- a/gui/lf_gui_report_summary.pl +++ b/gui/lf_gui_report_summary.pl @@ -229,6 +229,7 @@ sub processLogs { if (($ln =~ /WARNING:/) || ($ln =~ /BUG:/) || + ($ln =~ /Hardware became unavailable during restart/) || ($ln =~ /restarting hardware/) || ($ln =~ /crashed/)) { if ($ln =~ /WARNING:/) { @@ -240,7 +241,8 @@ sub processLogs { elsif ($ln =~ /restarting hardware/) { $restarting++; } - elsif ($ln =~ /crashed/) { + elsif (($ln =~ /crashed/) || # software/firmware crashed + ($ln =~ /became unavailable/)) { # hardware crashed $crashed++; } print IDX "
  • $enc_ln
  • \n";