3 if [ -z "$srcdir" -o -z "$abs_builddir" ]; then
5 echo "Warning: you're invoking the script manually and things may fail."
6 echo "Attempting to determine/set srcdir and abs_builddir variables."
9 # Variable should point to the Makefile.glsl.am
12 # Variable should point to glsl_compiler
13 abs_builddir
=`pwd`/..
/..
/
16 # Execute several shaders, and check that the InfoLog outcome is the expected.
18 compiler
=$abs_builddir/glsl_compiler
22 if [ ! -x "$compiler" ]; then
23 echo "Could not find glsl_compiler. Ensure that it is build via make check"
27 tests_relative_dir
="glsl/tests/warnings"
29 echo "====== Testing compilation output ======"
30 for test in $srcdir/$tests_relative_dir/*.vert
; do
31 test_output
="$abs_builddir/$tests_relative_dir/`basename $test`"
32 mkdir
-p $abs_builddir/$tests_relative_dir/
33 echo -n "Testing $test..."
34 $compiler --just-log --version 150 "$test" > "$test_output.out" 2>&1
36 if diff "$test.expected" "$test_output.out" >/dev
/null
2>&1; then
41 diff "$test.expected" "$test_output.out"
45 if [ $total -eq 0 ]; then
46 echo "Could not find any tests."
51 echo "$pass/$total tests returned correct results"
54 if [ $pass = $total ]; then