scripts/run-tests.sh: add option to not retry incomplete tests on resume

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>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
This commit is contained in:
Mike Mason 2015-05-27 08:25:06 -07:00 committed by Thomas Wood
parent f49723872b
commit b1e40e97c8

View File

@ -61,6 +61,8 @@ function print_help {
echo " (can be used more than once)" echo " (can be used more than once)"
echo " -R resume interrupted test where the partial results" echo " -R resume interrupted test where the partial results"
echo " are in the directory given by -r" 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 ""
echo "Useful patterns for test filtering are described in tests/NAMING-CONVENTION" echo "Useful patterns for test filtering are described in tests/NAMING-CONVENTION"
} }
@ -78,7 +80,7 @@ function list_tests {
done done
} }
while getopts ":dhlr:st:vx:R" opt; do while getopts ":dhlr:st:vx:Rn" opt; do
case $opt in case $opt in
d) download_piglit; exit ;; d) download_piglit; exit ;;
h) print_help; exit ;; h) print_help; exit ;;
@ -89,6 +91,7 @@ while getopts ":dhlr:st:vx:R" opt; do
v) VERBOSE="-v" ;; v) VERBOSE="-v" ;;
x) EXCLUDE="$EXCLUDE -x $OPTARG" ;; x) EXCLUDE="$EXCLUDE -x $OPTARG" ;;
R) RESUME="true" ;; R) RESUME="true" ;;
n) NORETRY="--no-retry" ;;
:) :)
echo "Option -$OPTARG requires an argument." echo "Option -$OPTARG requires an argument."
exit 1 exit 1
@ -119,10 +122,10 @@ if [ ! -x "$PIGLIT" ]; then
fi fi
if [ "x$RESUME" != "x" ]; then 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 else
mkdir -p "$RESULTS" 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 fi
if [ "$SUMMARY" == "html" ]; then if [ "$SUMMARY" == "html" ]; then