blob: b9e9f71426fb442d6ff40c9763211c2791de8300 [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 Kessenich38f3b892013-09-06 19:52:57 +000041
42#
43# multi-threaded test
44#
John Kessenich38f3b892013-09-06 19:52:57 +000045echo Comparing single thread to multithread for all tests in current directory...
46$EXE -i *.vert *.geom *.frag *.tes* *.comp > singleThread.out
47$EXE -i *.vert *.geom *.frag *.tes* *.comp -t > multiThread.out
48diff singleThread.out multiThread.out