mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-25 09:17:12 +01:00
b88ca1b4a6
Yes this seems confusing as on mac+linux Long is either 32 or 64bits depending on the architecture, but this is how the X11 protocol is defined. Thus 5 is the correct value for the nelts here. Not 5 or 10 depending on the architecture. More info on the confusion https://bugs.freedesktop.org/show_bug.cgi?id=16802
94 lines
1.6 KiB
Bash
Executable File
94 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
function pause() {
|
|
read -p "$*"
|
|
}
|
|
|
|
function pass() {
|
|
if [ -d "$1/Build/Debug" ]; then
|
|
cd $1/Build/Debug
|
|
echo "Testing:" $1
|
|
"./$@"
|
|
cd ../../..
|
|
pause "Press any key to continue..."
|
|
fi
|
|
}
|
|
|
|
function randomfile() {
|
|
fcount=($1/*.*)
|
|
fcount=${#fcount[@]}
|
|
fpick=$(($RANDOM % $fcount))
|
|
for d in $1/*.*; do
|
|
if [[ $fpick -eq 0 ]]; then
|
|
RETURN=$d
|
|
echo $d
|
|
return
|
|
fi
|
|
fpick=$(($fpick - 1))
|
|
done
|
|
}
|
|
|
|
function testspecial() {
|
|
if [ -d "$1/Build/Debug" ]; then
|
|
cd $1/Build/Debug
|
|
randomfile $2
|
|
cd ../../..
|
|
pass $1 $RETURN
|
|
fi
|
|
}
|
|
|
|
# change to directory above shell file
|
|
SCRIPTPATH=`readlink -f $0`
|
|
SCRIPTDIR=`dirname $SCRIPTPATH`
|
|
cd $SCRIPTDIR/..
|
|
cd tests
|
|
|
|
pass "checkkeys"
|
|
pass "loopwave"
|
|
pass "testatomic"
|
|
pass "testaudioinfo"
|
|
pass "testautomation"
|
|
pass "testdraw2"
|
|
pass "testchessboard"
|
|
pass "testerror"
|
|
pass "testfile"
|
|
pass "testfilesystem"
|
|
pass "testgamecontroller"
|
|
pass "testgesture"
|
|
pass "testgl2"
|
|
pass "testgles"
|
|
pass "testhaptic"
|
|
pass "testiconv"
|
|
pass "testime"
|
|
pass "testintersection"
|
|
pass "testjoystick"
|
|
pass "testkeys"
|
|
#pass "testloadso"
|
|
pass "testlock"
|
|
pass "testmessage"
|
|
#pass "testmultiaudio"
|
|
pass "testnative"
|
|
pass "testoverlay2"
|
|
pass "testplatform"
|
|
pass "testpower"
|
|
pass "testrelative"
|
|
pass "testrendercopyex"
|
|
pass "testrendertarget"
|
|
pass "testresample" "sample.wav" "newsample.wav" "44100"
|
|
pass "testrumble"
|
|
pass "testscale"
|
|
pass "testsem" 1
|
|
pass "testshader"
|
|
testspecial "testshape" ./shapes
|
|
testspecial "testshape" ./shapes
|
|
testspecial "testshape" ./shapes
|
|
pass "testsprite2"
|
|
pass "testspriteminimal"
|
|
pass "teststreaming"
|
|
pass "testthread"
|
|
pass "testtimer"
|
|
pass "testver"
|
|
pass "testwm2"
|
|
pass "torturethread"
|
|
|
|
cd .. |