<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 26 August 2014 21:31, Mike Mason <span dir="ltr"><<a href="mailto:michael.w.mason@intel.com" target="_blank">michael.w.mason@intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Piglit provides a 'resume' feature that can restart an interrupted<br>
test run at the point where it stopped. This patch adds that<br>
feature to run_tests.sh.<br>
<br>
Signed-off-by: Mike Mason <<a href="mailto:michael.w.mason@intel.com" target="_blank">michael.w.mason@intel.com</a>><br>
---<br>
scripts/run-tests.sh | 15 +++++++++++----<br>
1 file changed, 11 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh<br>
index d0e0c67..580f777 100755<br>
--- a/scripts/run-tests.sh<br>
+++ b/scripts/run-tests.sh<br>
@@ -59,6 +59,8 @@ function print_help {<br>
echo " -v enable verbose mode"<br>
echo " -x <regex> exclude tests that match the regular expression"<br>
echo " (can be used more than once)"<br>
+ echo " -R resume interrupted test where the partial results"<br>
+ echo " are in the directory given by -r"<br>
echo ""<br>
echo "Useful patterns for test filtering are described in tests/NAMING-CONVENTION"<br>
}<br>
@@ -73,7 +75,7 @@ function list_tests {<br>
done<br>
}<br>
<br>
-while getopts ":dhlr:st:vx:" opt; do<br>
+while getopts ":dhlr:st:vx:R" opt; do<br>
case $opt in<br>
d) download_piglit; exit ;;<br>
h) print_help; exit ;;<br>
@@ -83,6 +85,7 @@ while getopts ":dhlr:st:vx:" opt; do<br>
t) FILTER="$FILTER -t $OPTARG" ;;<br>
v) VERBOSE="-v" ;;<br>
x) EXCLUDE="$EXCLUDE -x $OPTARG" ;;<br>
+ R) RESUME="true" ;;<br>
:)<br>
echo "Option -$OPTARG requires an argument."<br>
exit 1<br>
@@ -112,11 +115,15 @@ if [ ! -x "$PIGLIT" ]; then<br>
exit 1<br>
fi<br>
<br>
-mkdir -p "$RESULTS"<br>
-<br>
-sudo IGT_TEST_ROOT="$IGT_TEST_ROOT" "$PIGLIT" run igt "$RESULTS" $VERBOSE $EXCLUDE $FILTER<br>
+if [ "x$RESUME" != "x" ]; then<br>
+ sudo IGT_TEST_ROOT="$IGT_TEST_ROOT" "$PIGLIT" resume "$RESULTS"<br>
+else<br>
+ mkdir -p "$RESULTS"<br>
+ sudo IGT_TEST_ROOT="$IGT_TEST_ROOT" "$PIGLIT" run igt "$RESULTS" $VERBOSE $EXCLUDE $FILTER<br>
+fi<br>
<br>
if [ "$SUMMARY" == "html" ]; then<br>
"$PIGLIT" summary html --overwrite "$RESULTS/html" "$RESULTS"<br>
echo "HTML summary has been written to $RESULTS/html/index.html"<br>
fi<br>
+<br></blockquote><div><br></div><div>Patch merged, although I've removed this additional new line from the end of the file.<br></div><div><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
--<br>
1.9.1<br>
<br>
_______________________________________________<br>
Intel-gfx mailing list<br>
<a href="mailto:Intel-gfx@lists.freedesktop.org" target="_blank">Intel-gfx@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/intel-gfx" target="_blank">http://lists.freedesktop.org/mailman/listinfo/intel-gfx</a><br></blockquote></div></div></div>