diff mbox

[i-g-t] scripts/run-tests.sh: add option to not retry incomplete tests on resume

Message ID 1432740306-14752-1-git-send-email-michael.w.mason@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mason, Michael W May 27, 2015, 3:25 p.m. UTC
This patch utilizes piglit's new --no-retry option. That option
prevents incomplete tests from being retried when resuming a
test run. This is necessary because retrying tests that cause
a crash or reboot prevents a test run from being resumed.

This patch also adds -s to the piglit command line. The -s option
forces test logs to be synced to disk after every test.
Without it, some logs can be lost if a test causes a crash
or reboot, making it impossible to resume the test run at the
correct point.

Signed-off-by: Mike Mason <michael.w.mason@intel.com>
---
 scripts/run-tests.sh | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh
index 5f83dcf..4fd9e46 100755
--- a/scripts/run-tests.sh
+++ b/scripts/run-tests.sh
@@ -61,6 +61,8 @@  function print_help {
 	echo "                  (can be used more than once)"
 	echo "  -R              resume interrupted test where the partial results"
 	echo "                  are in the directory given by -r"
+	echo "  -n              do not retry incomplete tests when resuming a"
+	echo "                  test run with -R"
 	echo ""
 	echo "Useful patterns for test filtering are described in tests/NAMING-CONVENTION"
 }
@@ -75,7 +77,7 @@  function list_tests {
 	done
 }
 
-while getopts ":dhlr:st:vx:R" opt; do
+while getopts ":dhlr:st:vx:Rn" opt; do
 	case $opt in
 		d) download_piglit; exit ;;
 		h) print_help; exit ;;
@@ -86,6 +88,7 @@  while getopts ":dhlr:st:vx:R" opt; do
 		v) VERBOSE="-v" ;;
 		x) EXCLUDE="$EXCLUDE -x $OPTARG" ;;
 		R) RESUME="true" ;;
+		n) NORETRY="--no-retry" ;;
 		:)
 			echo "Option -$OPTARG requires an argument."
 			exit 1
@@ -116,10 +119,10 @@  if [ ! -x "$PIGLIT" ]; then
 fi
 
 if [ "x$RESUME" != "x" ]; then
-	sudo IGT_TEST_ROOT="$IGT_TEST_ROOT" "$PIGLIT" resume "$RESULTS"
+	sudo IGT_TEST_ROOT="$IGT_TEST_ROOT" "$PIGLIT" resume "$RESULTS" $NORETRY
 else
 	mkdir -p "$RESULTS"
-	sudo IGT_TEST_ROOT="$IGT_TEST_ROOT" "$PIGLIT" run igt "$RESULTS" $VERBOSE $EXCLUDE $FILTER
+	sudo IGT_TEST_ROOT="$IGT_TEST_ROOT" "$PIGLIT" run igt "$RESULTS" -s $VERBOSE $EXCLUDE $FILTER
 fi
 
 if [ "$SUMMARY" == "html" ]; then