John Kessenich | aab2514 | 2013-02-12 18:26:15 +0000 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
John Kessenich | 4586dbd | 2013-08-05 15:52:03 +0000 | [diff] [blame] | 3 | TARGETDIR=localResults |
| 4 | BASEDIR=baseResults |
John Kessenich | 69f4b51 | 2013-09-04 21:19:27 +0000 | [diff] [blame] | 5 | EXE=./glslangValidator.exe |
| 6 | |
| 7 | # |
John Kessenich | a5830df | 2013-10-02 05:10:48 +0000 | [diff] [blame^] | 8 | # configuration file tests |
John Kessenich | 05a7063 | 2013-09-17 19:26:08 +0000 | [diff] [blame] | 9 | # |
| 10 | echo running configuration file test |
| 11 | $EXE -c > $TARGETDIR/test.conf |
| 12 | diff -b $BASEDIR/test.conf $TARGETDIR/test.conf |
| 13 | $EXE -i $TARGETDIR/test.conf specExamples.vert > $TARGETDIR/specExamples.vert.out |
| 14 | diff -b $BASEDIR/specExamples.vert.out $TARGETDIR |
John Kessenich | a5830df | 2013-10-02 05:10:48 +0000 | [diff] [blame^] | 15 | $EXE 100Limits.vert 100.conf > $TARGETDIR/100LimitsConf.vert.out |
| 16 | diff -b $BASEDIR/100LimitsConf.vert.out $TARGETDIR/100LimitsConf.vert.out |
John Kessenich | 05a7063 | 2013-09-17 19:26:08 +0000 | [diff] [blame] | 17 | |
| 18 | # |
John Kessenich | 69f4b51 | 2013-09-04 21:19:27 +0000 | [diff] [blame] | 19 | # isolated compilation tests |
| 20 | # |
John Kessenich | aab2514 | 2013-02-12 18:26:15 +0000 | [diff] [blame] | 21 | while read t; do |
| 22 | echo Running $t... |
John Kessenich | 69f4b51 | 2013-09-04 21:19:27 +0000 | [diff] [blame] | 23 | b=`basename $t` |
| 24 | $EXE -i $t > $TARGETDIR/$b.out |
John Kessenich | 8d2fe45 | 2013-08-05 16:36:49 +0000 | [diff] [blame] | 25 | diff -b $BASEDIR/$b.out $TARGETDIR/$b.out |
John Kessenich | b3338b3 | 2013-02-26 19:47:21 +0000 | [diff] [blame] | 26 | done < testlist |
John Kessenich | 69f4b51 | 2013-09-04 21:19:27 +0000 | [diff] [blame] | 27 | |
| 28 | # |
| 29 | # grouped shaders for link tests |
| 30 | # |
John Kessenich | 69f4b51 | 2013-09-04 21:19:27 +0000 | [diff] [blame] | 31 | function runLinkTest { |
| 32 | echo Running $*... |
| 33 | $EXE -i -l $* > $TARGETDIR/$1.out |
| 34 | diff -b $BASEDIR/$1.out $TARGETDIR/$1.out |
| 35 | } |
| 36 | |
| 37 | runLinkTest mains1.frag mains2.frag noMain1.geom noMain2.geom |
John Kessenich | 337dbc7 | 2013-09-24 21:18:46 +0000 | [diff] [blame] | 38 | runLinkTest noMain.vert mains.frag |
| 39 | runLinkTest link1.frag link2.frag link3.frag |
John Kessenich | 2ecdd14 | 2013-10-01 21:58:43 +0000 | [diff] [blame] | 40 | runLinkTest recurse1.vert recurse1.frag recurse2.frag |
John Kessenich | 38f3b89 | 2013-09-06 19:52:57 +0000 | [diff] [blame] | 41 | |
| 42 | # |
| 43 | # multi-threaded test |
| 44 | # |
John Kessenich | 38f3b89 | 2013-09-06 19:52:57 +0000 | [diff] [blame] | 45 | echo 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 |
| 48 | diff singleThread.out multiThread.out |