premake/Xcode/build-scripts/run.tests.command
author Ryan C. Gordon
Sun, 03 Jan 2016 20:52:44 -0500
changeset 10004 8f2f519d1e61
parent 7925 f090a47eb7f7
permissions -rwxr-xr-x
CMake: Don't make a libSDL2.so symlink on Mac OS X (do .dylib instead).
     1 #!/bin/sh
     2 
     3 function pause() {
     4   read -p "$*"
     5 }
     6 
     7 function pass() {
     8 	if [ -d "$1/Build/Debug" ]; then
     9 	cd $1/Build/Debug
    10 	echo "Testing:" $1
    11 	echo "\033]0;Testing: $1\007"
    12 	"./$@"
    13 	cd ../../..
    14 	pause "Press any key to continue..."
    15 	fi
    16 }
    17 
    18 function randomfile() {
    19 	fcount=($1/*.*)
    20 	fcount=${#fcount[@]}
    21 	fpick=$(($RANDOM % $fcount))
    22 	for d in $1/*.*; do
    23 		if [[ $fpick -eq 0 ]]; then
    24 			RETURN=$d
    25 			echo $d
    26 			return
    27 		fi
    28 		fpick=$(($fpick - 1))
    29 	done
    30 }
    31 
    32 function testspecial() {
    33 	if [ -d "$1/Build/Debug" ]; then
    34 		cd $1/Build/Debug
    35 		randomfile $2
    36 		cd ../../..
    37 		pass $1 $RETURN
    38 	fi
    39 }
    40 
    41 # change to directory above command file
    42 cd `dirname $0`/..
    43 cd tests
    44 
    45 pass "checkkeys"
    46 pass "loopwave"
    47 #pass "testatomic"
    48 pass "testaudioinfo"
    49 pass "testautomation"
    50 pass "testdraw2"
    51 pass "testchessboard"
    52 pass "testerror"
    53 pass "testfile"
    54 pass "testfilesystem"
    55 pass "testgamecontroller"
    56 pass "testgesture"
    57 pass "testgl2"
    58 pass "testgles"
    59 pass "testhaptic"
    60 pass "testiconv"
    61 pass "testime"
    62 pass "testintersection"
    63 pass "testjoystick"
    64 pass "testkeys"
    65 #pass "testloadso"
    66 pass "testlock"
    67 pass "testmessage"
    68 #pass "testmultiaudio"
    69 pass "testnative"
    70 pass "testoverlay2"
    71 pass "testplatform"
    72 pass "testpower"
    73 pass "testrelative"
    74 pass "testrendercopyex"
    75 pass "testrendertarget"
    76 pass "testresample" "sample.wav" "newsample.wav" "44100"
    77 pass "testrumble"
    78 pass "testscale"
    79 pass "testsem" 1
    80 pass "testshader"
    81 #testspecial "testshape" ./shapes
    82 #testspecial "testshape" ./shapes
    83 #testspecial "testshape" ./shapes
    84 pass "testsprite2"
    85 pass "testspriteminimal"
    86 pass "teststreaming"
    87 pass "testthread"
    88 pass "testtimer"
    89 pass "testver"
    90 pass "testwm2"
    91 pass "torturethread"
    92 
    93 cd ..