premake/Linux/build-scripts/run.tests.sh
author Ryan C. Gordon
Mon, 04 Jan 2016 16:25:27 -0500
changeset 10006 5229da175b57
parent 7925 f090a47eb7f7
permissions -rwxr-xr-x
x11: Support _NET_WM_USER_TIME and give _NET_ACTIVE_WINDOW a valid timestamp.

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