glslang/Test/runtests
John Kessenich 11f9fc7247 Add and partially implement an interface for doing uniform reflection. It includes an AST traversal to identify live accesses.
It does not yet correctly compute block offsets, give correct GL-API-style type values, or handle arrays.

This is tied to the new -q flag.


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23938 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-07 01:06:34 +00:00

60 lines
1.6 KiB
Bash

#!/usr/bin/env bash
TARGETDIR=localResults
BASEDIR=baseResults
EXE=./glslangValidator.exe
#
# configuration file tests
#
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
$EXE 100Limits.vert 100.conf > $TARGETDIR/100LimitsConf.vert.out
diff -b $BASEDIR/100LimitsConf.vert.out $TARGETDIR/100LimitsConf.vert.out
#
# isolated compilation tests
#
while read t; do
echo Running $t...
b=`basename $t`
$EXE -i $t > $TARGETDIR/$b.out
diff -b $BASEDIR/$b.out $TARGETDIR/$b.out
done < testlist
#
# 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
runLinkTest noMain.vert mains.frag
runLinkTest link1.frag link2.frag link3.frag
runLinkTest recurse1.vert recurse1.frag recurse2.frag
runLinkTest 300link.frag
runLinkTest 300link2.frag
runLinkTest 300link3.frag
runLinkTest empty.frag empty2.frag empty3.frag
#
# reflection tests
#
echo Running reflection...
$EXE -l -q reflection.vert > $TARGETDIR/reflection.vert.out
diff -b $BASEDIR/reflection.vert.out $TARGETDIR/reflection.vert.out
#
# 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