premake/Xcode/build-scripts/run.tests.command
changeset 7925 f090a47eb7f7
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/premake/Xcode/build-scripts/run.tests.command	Sun Nov 10 00:38:37 2013 -0500
     1.3 @@ -0,0 +1,93 @@
     1.4 +#!/bin/sh
     1.5 +
     1.6 +function pause() {
     1.7 +  read -p "$*"
     1.8 +}
     1.9 +
    1.10 +function pass() {
    1.11 +	if [ -d "$1/Build/Debug" ]; then
    1.12 +	cd $1/Build/Debug
    1.13 +	echo "Testing:" $1
    1.14 +	echo "\033]0;Testing: $1\007"
    1.15 +	"./$@"
    1.16 +	cd ../../..
    1.17 +	pause "Press any key to continue..."
    1.18 +	fi
    1.19 +}
    1.20 +
    1.21 +function randomfile() {
    1.22 +	fcount=($1/*.*)
    1.23 +	fcount=${#fcount[@]}
    1.24 +	fpick=$(($RANDOM % $fcount))
    1.25 +	for d in $1/*.*; do
    1.26 +		if [[ $fpick -eq 0 ]]; then
    1.27 +			RETURN=$d
    1.28 +			echo $d
    1.29 +			return
    1.30 +		fi
    1.31 +		fpick=$(($fpick - 1))
    1.32 +	done
    1.33 +}
    1.34 +
    1.35 +function testspecial() {
    1.36 +	if [ -d "$1/Build/Debug" ]; then
    1.37 +		cd $1/Build/Debug
    1.38 +		randomfile $2
    1.39 +		cd ../../..
    1.40 +		pass $1 $RETURN
    1.41 +	fi
    1.42 +}
    1.43 +
    1.44 +# change to directory above command file
    1.45 +cd `dirname $0`/..
    1.46 +cd tests
    1.47 +
    1.48 +pass "checkkeys"
    1.49 +pass "loopwave"
    1.50 +#pass "testatomic"
    1.51 +pass "testaudioinfo"
    1.52 +pass "testautomation"
    1.53 +pass "testdraw2"
    1.54 +pass "testchessboard"
    1.55 +pass "testerror"
    1.56 +pass "testfile"
    1.57 +pass "testfilesystem"
    1.58 +pass "testgamecontroller"
    1.59 +pass "testgesture"
    1.60 +pass "testgl2"
    1.61 +pass "testgles"
    1.62 +pass "testhaptic"
    1.63 +pass "testiconv"
    1.64 +pass "testime"
    1.65 +pass "testintersection"
    1.66 +pass "testjoystick"
    1.67 +pass "testkeys"
    1.68 +#pass "testloadso"
    1.69 +pass "testlock"
    1.70 +pass "testmessage"
    1.71 +#pass "testmultiaudio"
    1.72 +pass "testnative"
    1.73 +pass "testoverlay2"
    1.74 +pass "testplatform"
    1.75 +pass "testpower"
    1.76 +pass "testrelative"
    1.77 +pass "testrendercopyex"
    1.78 +pass "testrendertarget"
    1.79 +pass "testresample" "sample.wav" "newsample.wav" "44100"
    1.80 +pass "testrumble"
    1.81 +pass "testscale"
    1.82 +pass "testsem" 1
    1.83 +pass "testshader"
    1.84 +#testspecial "testshape" ./shapes
    1.85 +#testspecial "testshape" ./shapes
    1.86 +#testspecial "testshape" ./shapes
    1.87 +pass "testsprite2"
    1.88 +pass "testspriteminimal"
    1.89 +pass "teststreaming"
    1.90 +pass "testthread"
    1.91 +pass "testtimer"
    1.92 +pass "testver"
    1.93 +pass "testwm2"
    1.94 +pass "torturethread"
    1.95 +
    1.96 +cd ..
    1.97 \ No newline at end of file