 a86836ede2
			
		
	
	
		a86836ede2
		
	
	
	
	
		
			
			Added -C option to request cascading errors. By default, will exit early, to avoid all error-recovery-based crashes. This works by simulating end-of-file in input on first error, so no need for exception handling, or stack unwinding, or any complex error checking/handling to get out of the stack.
		
			
				
	
	
		
			44 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			44 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/env bash
 | |
| 
 | |
| TARGETDIR=localResults
 | |
| BASEDIR=baseResults
 | |
| EXE=../build/install/bin/glslangValidator
 | |
| HASERROR=0
 | |
| mkdir -p localResults
 | |
| 
 | |
| if [ -a localtestlist ]
 | |
|   then
 | |
|     while read t; do
 | |
|         echo Running $t...
 | |
|         b=`basename $t`
 | |
|         $EXE -i -l $t > $TARGETDIR/$b.out
 | |
|         diff -b $BASEDIR/$b.out $TARGETDIR/$b.out || HASERROR=1
 | |
|     done < localtestlist
 | |
| fi
 | |
| 
 | |
| rm -f comp.spv frag.spv geom.spv tesc.spv tese.spv vert.spv
 | |
| 
 | |
| #
 | |
| # reflection tests
 | |
| #
 | |
| echo Running reflection...
 | |
| $EXE -l -q -C reflection.vert > $TARGETDIR/reflection.vert.out
 | |
| diff -b $BASEDIR/reflection.vert.out $TARGETDIR/reflection.vert.out || HASERROR=1
 | |
| 
 | |
| #
 | |
| # multi-threaded test
 | |
| #
 | |
| echo Comparing single thread to multithread for all tests in current directory...
 | |
| $EXE -i -C *.vert *.geom *.frag *.tes* *.comp > singleThread.out
 | |
| $EXE -i -C *.vert *.geom *.frag *.tes* *.comp -t > multiThread.out
 | |
| diff singleThread.out multiThread.out || HASERROR=1
 | |
| 
 | |
| if [ $HASERROR -eq 0 ]
 | |
| then
 | |
|     echo Tests Succeeded.
 | |
| else
 | |
|     echo Tests Failed.
 | |
| fi
 | |
| 
 | |
| exit $HASERROR
 |