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 | d18e2d8 | 2014-03-11 02:10:26 +0000 | [diff] [blame^] | 5 | EXE=../build/install/bin/glslangValidator |
John Kessenich | 08d1824 | 2013-12-20 18:36:27 +0000 | [diff] [blame] | 6 | mkdir -p localResults |
John Kessenich | 69f4b51 | 2013-09-04 21:19:27 +0000 | [diff] [blame] | 7 | |
| 8 | # |
John Kessenich | a5830df | 2013-10-02 05:10:48 +0000 | [diff] [blame] | 9 | # configuration file tests |
John Kessenich | 05a7063 | 2013-09-17 19:26:08 +0000 | [diff] [blame] | 10 | # |
| 11 | echo running configuration file test |
| 12 | $EXE -c > $TARGETDIR/test.conf |
| 13 | diff -b $BASEDIR/test.conf $TARGETDIR/test.conf |
John Kessenich | 5134b9c | 2013-11-20 21:12:43 +0000 | [diff] [blame] | 14 | $EXE -i -l $TARGETDIR/test.conf specExamples.vert > $TARGETDIR/specExamples.vert.out |
John Kessenich | 05a7063 | 2013-09-17 19:26:08 +0000 | [diff] [blame] | 15 | diff -b $BASEDIR/specExamples.vert.out $TARGETDIR |
John Kessenich | a5830df | 2013-10-02 05:10:48 +0000 | [diff] [blame] | 16 | $EXE 100Limits.vert 100.conf > $TARGETDIR/100LimitsConf.vert.out |
| 17 | diff -b $BASEDIR/100LimitsConf.vert.out $TARGETDIR/100LimitsConf.vert.out |
John Kessenich | 05a7063 | 2013-09-17 19:26:08 +0000 | [diff] [blame] | 18 | |
| 19 | # |
John Kessenich | 69f4b51 | 2013-09-04 21:19:27 +0000 | [diff] [blame] | 20 | # isolated compilation tests |
| 21 | # |
John Kessenich | aab2514 | 2013-02-12 18:26:15 +0000 | [diff] [blame] | 22 | while read t; do |
| 23 | echo Running $t... |
John Kessenich | 69f4b51 | 2013-09-04 21:19:27 +0000 | [diff] [blame] | 24 | b=`basename $t` |
John Kessenich | 5134b9c | 2013-11-20 21:12:43 +0000 | [diff] [blame] | 25 | $EXE -i -l $t > $TARGETDIR/$b.out |
John Kessenich | 8d2fe45 | 2013-08-05 16:36:49 +0000 | [diff] [blame] | 26 | diff -b $BASEDIR/$b.out $TARGETDIR/$b.out |
John Kessenich | b3338b3 | 2013-02-26 19:47:21 +0000 | [diff] [blame] | 27 | done < testlist |
John Kessenich | 69f4b51 | 2013-09-04 21:19:27 +0000 | [diff] [blame] | 28 | |
| 29 | # |
John Kessenich | e8fe7b8 | 2013-12-18 18:47:12 +0000 | [diff] [blame] | 30 | # grouped shaders for bulk (faster) tests |
John Kessenich | 69f4b51 | 2013-09-04 21:19:27 +0000 | [diff] [blame] | 31 | # |
John Kessenich | e8fe7b8 | 2013-12-18 18:47:12 +0000 | [diff] [blame] | 32 | function runBulkTest { |
John Kessenich | 69f4b51 | 2013-09-04 21:19:27 +0000 | [diff] [blame] | 33 | echo Running $*... |
John Kessenich | e8fe7b8 | 2013-12-18 18:47:12 +0000 | [diff] [blame] | 34 | $EXE -i -l -t $* > $TARGETDIR/$1.out |
John Kessenich | 69f4b51 | 2013-09-04 21:19:27 +0000 | [diff] [blame] | 35 | diff -b $BASEDIR/$1.out $TARGETDIR/$1.out |
| 36 | } |
| 37 | |
John Kessenich | e8fe7b8 | 2013-12-18 18:47:12 +0000 | [diff] [blame] | 38 | runBulkTest mains1.frag mains2.frag noMain1.geom noMain2.geom |
| 39 | runBulkTest noMain.vert mains.frag |
| 40 | runBulkTest link1.frag link2.frag link3.frag |
| 41 | runBulkTest recurse1.vert recurse1.frag recurse2.frag |
| 42 | runBulkTest 300link.frag |
| 43 | runBulkTest 300link2.frag |
| 44 | runBulkTest 300link3.frag |
| 45 | runBulkTest empty.frag empty2.frag empty3.frag |
| 46 | runBulkTest 150.tesc 150.tese 400.tesc 400.tese 410.tesc 420.tesc 420.tese |
John Kessenich | 38f3b89 | 2013-09-06 19:52:57 +0000 | [diff] [blame] | 47 | |
| 48 | # |
John Kessenich | 11f9fc7 | 2013-11-07 01:06:34 +0000 | [diff] [blame] | 49 | # reflection tests |
| 50 | # |
| 51 | echo Running reflection... |
| 52 | $EXE -l -q reflection.vert > $TARGETDIR/reflection.vert.out |
| 53 | diff -b $BASEDIR/reflection.vert.out $TARGETDIR/reflection.vert.out |
| 54 | |
| 55 | # |
John Kessenich | 38f3b89 | 2013-09-06 19:52:57 +0000 | [diff] [blame] | 56 | # multi-threaded test |
| 57 | # |
John Kessenich | 38f3b89 | 2013-09-06 19:52:57 +0000 | [diff] [blame] | 58 | echo Comparing single thread to multithread for all tests in current directory... |
| 59 | $EXE -i *.vert *.geom *.frag *.tes* *.comp > singleThread.out |
| 60 | $EXE -i *.vert *.geom *.frag *.tes* *.comp -t > multiThread.out |
| 61 | diff singleThread.out multiThread.out |