mirror of
https://github.com/RPCS3/glslang.git
synced 2024-11-28 21:50:46 +00:00
cf0206c341
r26245: Remove "not yet complete" warning for versions 130 and 140, after tidying up a bit and adding tests. Token pasting is the only known missing feature, and gives its own message now on use. git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26226 e7fa87d3-cd2b-0410-9028-fcbf551c1848
72 lines
2.0 KiB
Bash
Executable File
72 lines
2.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
TARGETDIR=localResults
|
|
BASEDIR=baseResults
|
|
EXE=../build/install/bin/glslangValidator
|
|
mkdir -p localResults
|
|
|
|
#
|
|
# configuration file tests
|
|
#
|
|
echo running configuration file test
|
|
$EXE -c > $TARGETDIR/test.conf
|
|
diff -b $BASEDIR/test.conf $TARGETDIR/test.conf
|
|
$EXE -i -l $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 -l $t > $TARGETDIR/$b.out
|
|
diff -b $BASEDIR/$b.out $TARGETDIR/$b.out
|
|
done < testlist
|
|
|
|
if [ -a localtestlist ]
|
|
then
|
|
while read t; do
|
|
echo Running $t...
|
|
b=`basename $t`
|
|
$EXE -i -l $t > $TARGETDIR/$b.out
|
|
diff -b $BASEDIR/$b.out $TARGETDIR/$b.out
|
|
done < localtestlist
|
|
fi
|
|
|
|
#
|
|
# grouped shaders for bulk (faster) tests
|
|
#
|
|
function runBulkTest {
|
|
echo Running $*...
|
|
$EXE -i -l -t $* > $TARGETDIR/$1.out
|
|
diff -b $BASEDIR/$1.out $TARGETDIR/$1.out
|
|
}
|
|
|
|
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
|
|
|
|
#
|
|
# 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
|