blob: 92633042cdbda6cd96b26791c36bca4fb1d7e24a [file] [log] [blame]
John Kessenichaab25142013-02-12 18:26:15 +00001#!/usr/bin/env bash
2
John Kessenich4586dbd2013-08-05 15:52:03 +00003TARGETDIR=localResults
4BASEDIR=baseResults
John Kessenich69f4b512013-09-04 21:19:27 +00005EXE=./glslangValidator.exe
6
7#
John Kessenicha5830df2013-10-02 05:10:48 +00008# configuration file tests
John Kessenich05a70632013-09-17 19:26:08 +00009#
10echo running configuration file test
11$EXE -c > $TARGETDIR/test.conf
12diff -b $BASEDIR/test.conf $TARGETDIR/test.conf
13$EXE -i $TARGETDIR/test.conf specExamples.vert > $TARGETDIR/specExamples.vert.out
14diff -b $BASEDIR/specExamples.vert.out $TARGETDIR
John Kessenicha5830df2013-10-02 05:10:48 +000015$EXE 100Limits.vert 100.conf > $TARGETDIR/100LimitsConf.vert.out
16diff -b $BASEDIR/100LimitsConf.vert.out $TARGETDIR/100LimitsConf.vert.out
John Kessenich05a70632013-09-17 19:26:08 +000017
18#
John Kessenich69f4b512013-09-04 21:19:27 +000019# isolated compilation tests
20#
John Kessenichaab25142013-02-12 18:26:15 +000021while read t; do
22 echo Running $t...
John Kessenich69f4b512013-09-04 21:19:27 +000023 b=`basename $t`
24 $EXE -i $t > $TARGETDIR/$b.out
John Kessenich8d2fe452013-08-05 16:36:49 +000025 diff -b $BASEDIR/$b.out $TARGETDIR/$b.out
John Kessenichb3338b32013-02-26 19:47:21 +000026done < testlist
John Kessenich69f4b512013-09-04 21:19:27 +000027
28#
29# grouped shaders for link tests
30#
John Kessenich69f4b512013-09-04 21:19:27 +000031function runLinkTest {
32 echo Running $*...
33 $EXE -i -l $* > $TARGETDIR/$1.out
34 diff -b $BASEDIR/$1.out $TARGETDIR/$1.out
35}
36
37runLinkTest mains1.frag mains2.frag noMain1.geom noMain2.geom
John Kessenich337dbc72013-09-24 21:18:46 +000038runLinkTest noMain.vert mains.frag
39runLinkTest link1.frag link2.frag link3.frag
John Kessenich2ecdd142013-10-01 21:58:43 +000040runLinkTest recurse1.vert recurse1.frag recurse2.frag
John Kessenichfb57e7c2013-10-15 21:46:20 +000041runLinkTest 300link.frag
42runLinkTest 300link2.frag
43runLinkTest 300link3.frag
John Kessenichea869fb2013-10-28 18:12:06 +000044runLinkTest empty.frag empty2.frag empty3.frag
John Kessenich38f3b892013-09-06 19:52:57 +000045
46#
John Kessenich11f9fc72013-11-07 01:06:34 +000047# reflection tests
48#
49echo Running reflection...
50$EXE -l -q reflection.vert > $TARGETDIR/reflection.vert.out
51diff -b $BASEDIR/reflection.vert.out $TARGETDIR/reflection.vert.out
52
53#
John Kessenich38f3b892013-09-06 19:52:57 +000054# multi-threaded test
55#
John Kessenich38f3b892013-09-06 19:52:57 +000056echo Comparing single thread to multithread for all tests in current directory...
57$EXE -i *.vert *.geom *.frag *.tes* *.comp > singleThread.out
58$EXE -i *.vert *.geom *.frag *.tes* *.comp -t > multiThread.out
59diff singleThread.out multiThread.out