#!/bin/csh

set TESTS = "Scale1 Scale2 Scale3 Scale4 Scale5 Scale6 Scale7 Scale8 Scale9 Scale10 Scrollbar1 Scrollbar2 Scrollbar3 Scrollbar4 Scrollbar5 Scrollbar6 Scrollbar7 Scrollbar8 Scrollbar9 Scrollbar10 Scrollbar11"

if (-e ./failures) then
	echo "backing up failures file"
	mv failures failures.bak
endif

rm -f core
touch ./failures

foreach test ($TESTS)
	./$test
	if ($status != 0) then
		if (-e core) then
			echo "backing up core to "$test".core"
			mv core $test.core
		endif
		echo "failure in test: "$test
		echo $test >> failures
	endif
	
end
