cscg22-gearboy

CSCG 2022 Challenge 'Gearboy'
git clone https://git.sinitax.com/sinitax/cscg22-gearboy
Log | Files | Refs | sfeed.txt

run.tests.command (1637B)


      1#!/bin/sh
      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	echo "\033]0;Testing: $1\007"
     12	"./$@"
     13	cd ../../..
     14	pause "Press any key to continue..."
     15	fi
     16}
     17
     18function 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
     32function 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
     42cd `dirname $0`/..
     43cd tests
     44
     45pass "checkkeys"
     46pass "loopwave"
     47#pass "testatomic"
     48pass "testaudioinfo"
     49pass "testautomation"
     50pass "testdraw2"
     51pass "testchessboard"
     52pass "testerror"
     53pass "testfile"
     54pass "testfilesystem"
     55pass "testgamecontroller"
     56pass "testgesture"
     57pass "testgl2"
     58pass "testgles"
     59pass "testhaptic"
     60pass "testiconv"
     61pass "testime"
     62pass "testintersection"
     63pass "testjoystick"
     64pass "testkeys"
     65#pass "testloadso"
     66pass "testlock"
     67pass "testmessage"
     68#pass "testmultiaudio"
     69pass "testnative"
     70pass "testoverlay2"
     71pass "testplatform"
     72pass "testpower"
     73pass "testrelative"
     74pass "testrendercopyex"
     75pass "testrendertarget"
     76pass "testresample" "sample.wav" "newsample.wav" "44100"
     77pass "testrumble"
     78pass "testscale"
     79pass "testsem" 1
     80pass "testshader"
     81#testspecial "testshape" ./shapes
     82#testspecial "testshape" ./shapes
     83#testspecial "testshape" ./shapes
     84pass "testsprite2"
     85pass "testspriteminimal"
     86pass "teststreaming"
     87pass "testthread"
     88pass "testtimer"
     89pass "testver"
     90pass "testwm2"
     91pass "torturethread"
     92
     93cd ..