run.tests.sh (1660B)
1#!/bin/bash 2 3function pause() { 4 read -p "$*" 5} 6 7function pass() { 8 if [ -d "$1/Build/Debug" ]; then 9 cd $1/Build/Debug 10 echo "Testing:" $1 11 "./$@" 12 cd ../../.. 13 pause "Press any key to continue..." 14 fi 15} 16 17function randomfile() { 18 fcount=($1/*.*) 19 fcount=${#fcount[@]} 20 fpick=$(($RANDOM % $fcount)) 21 for d in $1/*.*; do 22 if [[ $fpick -eq 0 ]]; then 23 RETURN=$d 24 echo $d 25 return 26 fi 27 fpick=$(($fpick - 1)) 28 done 29} 30 31function testspecial() { 32 if [ -d "$1/Build/Debug" ]; then 33 cd $1/Build/Debug 34 randomfile $2 35 cd ../../.. 36 pass $1 $RETURN 37 fi 38} 39 40# change to directory above shell file 41SCRIPTPATH=`readlink -f $0` 42SCRIPTDIR=`dirname $SCRIPTPATH` 43cd $SCRIPTDIR/.. 44cd tests 45 46pass "checkkeys" 47pass "loopwave" 48pass "testatomic" 49pass "testaudioinfo" 50pass "testautomation" 51pass "testdraw2" 52pass "testchessboard" 53pass "testerror" 54pass "testfile" 55pass "testfilesystem" 56pass "testgamecontroller" 57pass "testgesture" 58pass "testgl2" 59pass "testgles" 60pass "testhaptic" 61pass "testiconv" 62pass "testime" 63pass "testintersection" 64pass "testjoystick" 65pass "testkeys" 66#pass "testloadso" 67pass "testlock" 68pass "testmessage" 69#pass "testmultiaudio" 70pass "testnative" 71pass "testoverlay2" 72pass "testplatform" 73pass "testpower" 74pass "testrelative" 75pass "testrendercopyex" 76pass "testrendertarget" 77pass "testresample" "sample.wav" "newsample.wav" "44100" 78pass "testrumble" 79pass "testscale" 80pass "testsem" 1 81pass "testshader" 82testspecial "testshape" ./shapes 83testspecial "testshape" ./shapes 84testspecial "testshape" ./shapes 85pass "testsprite2" 86pass "testspriteminimal" 87pass "teststreaming" 88pass "testthread" 89pass "testtimer" 90pass "testver" 91pass "testwm2" 92pass "torturethread" 93 94cd ..