mirror of
				https://github.com/tiagovignatti/intel-gpu-tools.git
				synced 2025-11-04 12:07:12 +00:00 
			
		
		
		
	scripts: Add capability to resume interrupted run-tests.sh session
Piglit provides a 'resume' feature that can restart an interrupted test run at the point where it stopped. This patch adds that feature to run_tests.sh. Signed-off-by: Mike Mason <michael.w.mason@intel.com> [Thomas: remove additional new line from end of file] Signed-off-by: Thomas Wood <thomas.wood@intel.com>
This commit is contained in:
		
							parent
							
								
									59c55626f9
								
							
						
					
					
						commit
						822cc6a565
					
				@ -59,6 +59,8 @@ function print_help {
 | 
			
		||||
	echo "  -v              enable verbose mode"
 | 
			
		||||
	echo "  -x <regex>      exclude tests that match the regular expression"
 | 
			
		||||
	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 ""
 | 
			
		||||
	echo "Useful patterns for test filtering are described in tests/NAMING-CONVENTION"
 | 
			
		||||
}
 | 
			
		||||
@ -73,7 +75,7 @@ function list_tests {
 | 
			
		||||
	done
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
while getopts ":dhlr:st:vx:" opt; do
 | 
			
		||||
while getopts ":dhlr:st:vx:R" opt; do
 | 
			
		||||
	case $opt in
 | 
			
		||||
		d) download_piglit; exit ;;
 | 
			
		||||
		h) print_help; exit ;;
 | 
			
		||||
@ -83,6 +85,7 @@ while getopts ":dhlr:st:vx:" opt; do
 | 
			
		||||
		t) FILTER="$FILTER -t $OPTARG" ;;
 | 
			
		||||
		v) VERBOSE="-v" ;;
 | 
			
		||||
		x) EXCLUDE="$EXCLUDE -x $OPTARG" ;;
 | 
			
		||||
		R) RESUME="true" ;;
 | 
			
		||||
		:)
 | 
			
		||||
			echo "Option -$OPTARG requires an argument."
 | 
			
		||||
			exit 1
 | 
			
		||||
@ -112,9 +115,12 @@ if [ ! -x "$PIGLIT" ]; then
 | 
			
		||||
	exit 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
mkdir -p "$RESULTS"
 | 
			
		||||
 | 
			
		||||
sudo IGT_TEST_ROOT="$IGT_TEST_ROOT" "$PIGLIT" run igt "$RESULTS" $VERBOSE $EXCLUDE $FILTER
 | 
			
		||||
if [ "x$RESUME" != "x" ]; then
 | 
			
		||||
	sudo IGT_TEST_ROOT="$IGT_TEST_ROOT" "$PIGLIT" resume "$RESULTS"
 | 
			
		||||
else
 | 
			
		||||
	mkdir -p "$RESULTS"
 | 
			
		||||
	sudo IGT_TEST_ROOT="$IGT_TEST_ROOT" "$PIGLIT" run igt "$RESULTS" $VERBOSE $EXCLUDE $FILTER
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [ "$SUMMARY" == "html" ]; then
 | 
			
		||||
	"$PIGLIT" summary html --overwrite "$RESULTS/html" "$RESULTS"
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user