2013-02-12 18:26:15 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2013-08-05 15:52:03 +00:00
|
|
|
TARGETDIR=localResults
|
|
|
|
BASEDIR=baseResults
|
2014-03-11 02:10:26 +00:00
|
|
|
EXE=../build/install/bin/glslangValidator
|
2013-12-20 18:36:27 +00:00
|
|
|
mkdir -p localResults
|
2013-09-04 21:19:27 +00:00
|
|
|
|
|
|
|
#
|
2013-10-02 05:10:48 +00:00
|
|
|
# configuration file tests
|
2013-09-04 21:19:27 +00:00
|
|
|
#
|
2013-09-17 19:26:08 +00:00
|
|
|
echo running configuration file test
|
|
|
|
$EXE -c > $TARGETDIR/test.conf
|
|
|
|
diff -b $BASEDIR/test.conf $TARGETDIR/test.conf
|
2013-11-20 21:12:43 +00:00
|
|
|
$EXE -i -l $TARGETDIR/test.conf specExamples.vert > $TARGETDIR/specExamples.vert.out
|
2013-09-17 19:26:08 +00:00
|
|
|
diff -b $BASEDIR/specExamples.vert.out $TARGETDIR
|
2013-10-02 05:10:48 +00:00
|
|
|
$EXE 100Limits.vert 100.conf > $TARGETDIR/100LimitsConf.vert.out
|
|
|
|
diff -b $BASEDIR/100LimitsConf.vert.out $TARGETDIR/100LimitsConf.vert.out
|
2013-02-12 18:26:15 +00:00
|
|
|
|
2013-09-17 19:26:08 +00:00
|
|
|
#
|
|
|
|
# isolated compilation tests
|
|
|
|
#
|
2013-02-12 18:26:15 +00:00
|
|
|
while read t; do
|
|
|
|
echo Running $t...
|
2013-09-04 21:19:27 +00:00
|
|
|
b=`basename $t`
|
2013-11-20 21:12:43 +00:00
|
|
|
$EXE -i -l $t > $TARGETDIR/$b.out
|
2013-08-05 16:36:49 +00:00
|
|
|
diff -b $BASEDIR/$b.out $TARGETDIR/$b.out
|
2013-02-26 19:47:21 +00:00
|
|
|
done < testlist
|
2013-09-04 21:19:27 +00:00
|
|
|
|
|
|
|
#
|
2013-12-18 18:47:12 +00:00
|
|
|
# grouped shaders for bulk (faster) tests
|
2013-09-04 21:19:27 +00:00
|
|
|
#
|
2013-12-18 18:47:12 +00:00
|
|
|
function runBulkTest {
|
2013-09-04 21:19:27 +00:00
|
|
|
echo Running $*...
|
2013-12-18 18:47:12 +00:00
|
|
|
$EXE -i -l -t $* > $TARGETDIR/$1.out
|
2013-09-04 21:19:27 +00:00
|
|
|
diff -b $BASEDIR/$1.out $TARGETDIR/$1.out
|
|
|
|
}
|
|
|
|
|
2013-12-18 18:47:12 +00:00
|
|
|
runBulkTest mains1.frag mains2.frag noMain1.geom noMain2.geom
|
|
|
|
runBulkTest noMain.vert mains.frag
|
|
|
|
runBulkTest link1.frag link2.frag link3.frag
|
|
|
|
runBulkTest recurse1.vert recurse1.frag recurse2.frag
|
|
|
|
runBulkTest 300link.frag
|
|
|
|
runBulkTest 300link2.frag
|
|
|
|
runBulkTest 300link3.frag
|
|
|
|
runBulkTest empty.frag empty2.frag empty3.frag
|
|
|
|
runBulkTest 150.tesc 150.tese 400.tesc 400.tese 410.tesc 420.tesc 420.tese
|
2013-09-06 19:52:57 +00:00
|
|
|
|
2013-11-07 01:06:34 +00:00
|
|
|
#
|
|
|
|
# reflection tests
|
|
|
|
#
|
|
|
|
echo Running reflection...
|
|
|
|
$EXE -l -q reflection.vert > $TARGETDIR/reflection.vert.out
|
|
|
|
diff -b $BASEDIR/reflection.vert.out $TARGETDIR/reflection.vert.out
|
|
|
|
|
2013-09-06 19:52:57 +00:00
|
|
|
#
|
|
|
|
# multi-threaded test
|
|
|
|
#
|
|
|
|
echo Comparing single thread to multithread for all tests in current directory...
|
|
|
|
$EXE -i *.vert *.geom *.frag *.tes* *.comp > singleThread.out
|
|
|
|
$EXE -i *.vert *.geom *.frag *.tes* *.comp -t > multiThread.out
|
|
|
|
diff singleThread.out multiThread.out
|