glslang/Test/runtests
John Kessenich 337dbc7d8c Add basic intra-stage linking validation for matching types and qualification of uniforms/ins/outs/globals, function body duplication, and mixing ES/non-ES shaders.
Still need to handle arrays and built-in redeclarations, and many more rules, but this puts the basics in place.


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23225 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-24 21:18:46 +00:00

46 lines
1.1 KiB
Bash

#!/usr/bin/env bash
TARGETDIR=localResults
BASEDIR=baseResults
EXE=./glslangValidator.exe
#
# configuration file test
#
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
#
# 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
#
# 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