2013-02-12 18:26:15 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2013-08-05 15:52:03 +00:00
|
|
|
TARGETDIR=localResults
|
|
|
|
BASEDIR=baseResults
|
2013-09-04 21:19:27 +00:00
|
|
|
EXE=./glslangValidator.exe
|
|
|
|
|
|
|
|
#
|
2013-09-17 19:26:08 +00:00
|
|
|
# configuration file test
|
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
|
|
|
|
$EXE -i $TARGETDIR/test.conf specExamples.vert > $TARGETDIR/specExamples.vert.out
|
|
|
|
diff -b $BASEDIR/specExamples.vert.out $TARGETDIR
|
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`
|
|
|
|
$EXE -i $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
|
|
|
|
|
|
|
#
|
|
|
|
# grouped shaders for link tests
|
|
|
|
#
|
|
|
|
function runLinkTest {
|
|
|
|
echo Running $*...
|
|
|
|
$EXE -i -l $* > $TARGETDIR/$1.out
|
|
|
|
diff -b $BASEDIR/$1.out $TARGETDIR/$1.out
|
|
|
|
}
|
|
|
|
|
|
|
|
runLinkTest mains1.frag mains2.frag noMain1.geom noMain2.geom
|
2013-09-24 21:18:46 +00:00
|
|
|
runLinkTest noMain.vert mains.frag
|
|
|
|
runLinkTest link1.frag link2.frag link3.frag
|
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
|