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 <emil.velikov@collabora.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
This commit is contained in:
@@ -24,17 +24,21 @@ if [ ! -x "$compiler" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
tests_relative_dir="glsl/tests/warnings"
|
||||||
|
|
||||||
echo "====== Testing compilation output ======"
|
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..."
|
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))
|
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"
|
echo "PASS"
|
||||||
pass=$((pass+1))
|
pass=$((pass+1))
|
||||||
else
|
else
|
||||||
echo "FAIL"
|
echo "FAIL"
|
||||||
diff "$test.expected" "$test.out"
|
diff "$test.expected" "$test_output.out"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user