diff options
author | Emil Velikov <[email protected]> | 2017-02-26 21:24:26 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-03-28 15:31:22 +0100 |
commit | 493fa69e374526fc5bf8d6727eb40a1c851a2d01 (patch) | |
tree | c233b46ab755ead933994515862fd8b12eb98772 | |
parent | 81ccc7a484ae8f9f242a42a80a3d09e6987cc816 (diff) |
glsl/tests/warnings-test: correctly manage srcdir/builddir
Before this commit, we would effectively fail to run any of the test in
a OOT builds.
Signed-off-by: Emil Velikov <[email protected]>
Acked-by: Kenneth Graunke <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
-rwxr-xr-x | src/compiler/glsl/tests/warnings-test.sh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/compiler/glsl/tests/warnings-test.sh b/src/compiler/glsl/tests/warnings-test.sh index 7891c2477fe..9bb6ed7b6cc 100755 --- a/src/compiler/glsl/tests/warnings-test.sh +++ b/src/compiler/glsl/tests/warnings-test.sh @@ -24,17 +24,21 @@ if [ ! -x "$compiler" ]; then exit 1 fi +tests_relative_dir="glsl/tests/warnings" + echo "====== Testing compilation output ======" -for test in `find . -iname '*.vert'`; do +for test in $srcdir/$tests_relative_dir/*.vert; do + test_output="$abs_builddir/$tests_relative_dir/`basename $test`" + mkdir -p $abs_builddir/$tests_relative_dir/ echo -n "Testing $test..." - $compiler --just-log --version 150 "$test" > "$test.out" 2>&1 + $compiler --just-log --version 150 "$test" > "$test_output.out" 2>&1 total=$((total+1)) - if diff "$test.expected" "$test.out" >/dev/null 2>&1; then + if diff "$test.expected" "$test_output.out" >/dev/null 2>&1; then echo "PASS" pass=$((pass+1)) else echo "FAIL" - diff "$test.expected" "$test.out" + diff "$test.expected" "$test_output.out" fi done |