blob: ae7ed4503fd47f6dfd73f0613f2597f2df91e89f [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 Kessenichd18e2d82014-03-11 02:10:26 +00005EXE=../build/install/bin/glslangValidator
John Kessenichb38c9692015-05-15 19:01:17 +00006HASERROR=0
John Kessenich08d18242013-12-20 18:36:27 +00007mkdir -p localResults
John Kessenich69f4b512013-09-04 21:19:27 +00008
John Kessenichcf0206c2014-04-14 15:46:40 +00009if [ -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 Kessenichb38c9692015-05-15 19:01:17 +000015 diff -b $BASEDIR/$b.out $TARGETDIR/$b.out || HASERROR=1
John Kessenichcf0206c2014-04-14 15:46:40 +000016 done < localtestlist
17fi
18
johnkslang02ad18a2015-06-26 00:12:31 -060019rm -f comp.spv frag.spv geom.spv tesc.spv tese.spv vert.spv
John Kessenich593a3f72015-05-15 18:44:16 +000020
21#
John Kessenich11f9fc72013-11-07 01:06:34 +000022# reflection tests
23#
24echo Running reflection...
John Kessenicha86836e2016-07-09 14:50:57 -060025$EXE -l -q -C reflection.vert > $TARGETDIR/reflection.vert.out
John Kessenichb38c9692015-05-15 19:01:17 +000026diff -b $BASEDIR/reflection.vert.out $TARGETDIR/reflection.vert.out || HASERROR=1
John Kessenich11f9fc72013-11-07 01:06:34 +000027
28#
John Kessenich38f3b892013-09-06 19:52:57 +000029# multi-threaded test
30#
John Kessenich38f3b892013-09-06 19:52:57 +000031echo Comparing single thread to multithread for all tests in current directory...
John Kessenicha86836e2016-07-09 14:50:57 -060032$EXE -i -C *.vert *.geom *.frag *.tes* *.comp > singleThread.out
33$EXE -i -C *.vert *.geom *.frag *.tes* *.comp -t > multiThread.out
John Kessenichb38c9692015-05-15 19:01:17 +000034diff singleThread.out multiThread.out || HASERROR=1
35
John Kessenich84ea15f2015-05-15 21:54:24 +000036if [ $HASERROR -eq 0 ]
37then
38 echo Tests Succeeded.
39else
40 echo Tests Failed.
41fi
42
John Kessenichb38c9692015-05-15 19:01:17 +000043exit $HASERROR