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 | b38c969 | 2015-05-15 19:01:17 +0000 | [diff] [blame] | 6 | HASERROR=0 |
John Kessenich | 08d1824 | 2013-12-20 18:36:27 +0000 | [diff] [blame] | 7 | mkdir -p localResults |
John Kessenich | 69f4b51 | 2013-09-04 21:19:27 +0000 | [diff] [blame] | 8 | |
John Kessenich | cf0206c | 2014-04-14 15:46:40 +0000 | [diff] [blame] | 9 | if [ -a localtestlist ] |
| 10 | then |
| 11 | while read t; do |
| 12 | echo Running $t... |
| 13 | b=`basename $t` |
| 14 | $EXE -i -l $t > $TARGETDIR/$b.out |
John Kessenich | b38c969 | 2015-05-15 19:01:17 +0000 | [diff] [blame] | 15 | diff -b $BASEDIR/$b.out $TARGETDIR/$b.out || HASERROR=1 |
John Kessenich | cf0206c | 2014-04-14 15:46:40 +0000 | [diff] [blame] | 16 | done < localtestlist |
| 17 | fi |
| 18 | |
johnkslang | 02ad18a | 2015-06-26 00:12:31 -0600 | [diff] [blame] | 19 | rm -f comp.spv frag.spv geom.spv tesc.spv tese.spv vert.spv |
John Kessenich | 593a3f7 | 2015-05-15 18:44:16 +0000 | [diff] [blame] | 20 | |
| 21 | # |
John Kessenich | 31a51be | 2016-07-19 14:32:52 -0600 | [diff] [blame] | 22 | # special tests |
| 23 | # |
| 24 | |
| 25 | $EXE badMacroArgs.frag > $TARGETDIR/badMacroArgs.frag.out |
| 26 | diff -b $BASEDIR/badMacroArgs.frag.out $TARGETDIR/badMacroArgs.frag.out || HASERROR=1 |
| 27 | |
| 28 | # |
John Kessenich | 11f9fc7 | 2013-11-07 01:06:34 +0000 | [diff] [blame] | 29 | # reflection tests |
| 30 | # |
| 31 | echo Running reflection... |
John Kessenich | a86836e | 2016-07-09 14:50:57 -0600 | [diff] [blame] | 32 | $EXE -l -q -C reflection.vert > $TARGETDIR/reflection.vert.out |
John Kessenich | b38c969 | 2015-05-15 19:01:17 +0000 | [diff] [blame] | 33 | diff -b $BASEDIR/reflection.vert.out $TARGETDIR/reflection.vert.out || HASERROR=1 |
John Kessenich | 2572b19 | 2016-09-19 23:12:48 -0600 | [diff] [blame] | 34 | $EXE -D -e flizv -l -q -C -V hlsl.reflection.vert > $TARGETDIR/hlsl.reflection.vert.out |
| 35 | diff -b $BASEDIR/hlsl.reflection.vert.out $TARGETDIR/hlsl.reflection.vert.out || HASERROR=1 |
steve-lunarg | 8ffc36a | 2016-09-21 14:19:40 -0600 | [diff] [blame^] | 36 | $EXE -D -e main -l -q -C -V hlsl.reflection.binding.frag > $TARGETDIR/hlsl.reflection.binding.frag.out |
| 37 | diff -b $BASEDIR/hlsl.reflection.binding.frag.out $TARGETDIR/hlsl.reflection.binding.frag.out || HASERROR=1 |
| 38 | |
John Kessenich | 11f9fc7 | 2013-11-07 01:06:34 +0000 | [diff] [blame] | 39 | |
| 40 | # |
John Kessenich | 38f3b89 | 2013-09-06 19:52:57 +0000 | [diff] [blame] | 41 | # multi-threaded test |
| 42 | # |
John Kessenich | 38f3b89 | 2013-09-06 19:52:57 +0000 | [diff] [blame] | 43 | echo Comparing single thread to multithread for all tests in current directory... |
John Kessenich | a86836e | 2016-07-09 14:50:57 -0600 | [diff] [blame] | 44 | $EXE -i -C *.vert *.geom *.frag *.tes* *.comp > singleThread.out |
| 45 | $EXE -i -C *.vert *.geom *.frag *.tes* *.comp -t > multiThread.out |
John Kessenich | b38c969 | 2015-05-15 19:01:17 +0000 | [diff] [blame] | 46 | diff singleThread.out multiThread.out || HASERROR=1 |
| 47 | |
John Kessenich | 84ea15f | 2015-05-15 21:54:24 +0000 | [diff] [blame] | 48 | if [ $HASERROR -eq 0 ] |
| 49 | then |
| 50 | echo Tests Succeeded. |
| 51 | else |
| 52 | echo Tests Failed. |
| 53 | fi |
| 54 | |
John Kessenich | b38c969 | 2015-05-15 19:01:17 +0000 | [diff] [blame] | 55 | exit $HASERROR |