
This makes it easier/clearer as to: - if the file should have the execute bit set (.py should not) - do we need the shebang in the first place and if so what it should be Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
32 lines
672 B
Bash
Executable File
32 lines
672 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Execute several shaders, and check that the InfoLog outcome is the expected.
|
|
|
|
compiler=./glsl_compiler
|
|
total=0
|
|
pass=0
|
|
|
|
echo "====== Testing compilation output ======"
|
|
for test in `find . -iname '*.vert'`; do
|
|
echo -n "Testing $test..."
|
|
$compiler --just-log --version 150 "$test" > "$test.out" 2>&1
|
|
total=$((total+1))
|
|
if diff "$test.expected" "$test.out" >/dev/null 2>&1; then
|
|
echo "PASS"
|
|
pass=$((pass+1))
|
|
else
|
|
echo "FAIL"
|
|
diff "$test.expected" "$test.out"
|
|
fi
|
|
done
|
|
|
|
echo ""
|
|
echo "$pass/$total tests returned correct results"
|
|
echo ""
|
|
|
|
if [[ $pass == $total ]]; then
|
|
exit 0
|
|
else
|
|
exit 1
|
|
fi
|