summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/tests/optimization-test.sh
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2017-02-26 20:28:21 +0000
committerEmil Velikov <[email protected]>2017-03-28 15:31:23 +0100
commit421115a72939b7dbcdc9f714d85f3e7616323a3e (patch)
tree20a3bf793c05b6a22917f0bb143ca6880428639e /src/compiler/glsl/tests/optimization-test.sh
parent7d2a1394bbdd79d059a4c1dbe96a4e38c9ed34de (diff)
glsl/tests/optimization-test: pass glsl_test as argument
Rather than hardcoding the binary location (which ends up wrong in a number of occasions) in the python script, pass it as argument. This allows us to remove a couple of dirname/basename workarounds that aimed to keep this working, and succeeded in the odd occasion. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/compiler/glsl/tests/optimization-test.sh')
-rwxr-xr-xsrc/compiler/glsl/tests/optimization-test.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/glsl/tests/optimization-test.sh b/src/compiler/glsl/tests/optimization-test.sh
index 86a87b0d954..ddfa7886b5a 100755
--- a/src/compiler/glsl/tests/optimization-test.sh
+++ b/src/compiler/glsl/tests/optimization-test.sh
@@ -38,7 +38,7 @@ for dir in $srcdir/glsl/tests/*/; do
completedir="$abs_builddir/glsl/tests/`echo ${dir} | sed 's|.*/glsl/tests/||g'`"
mkdir -p $completedir
cd $dir;
- $PYTHON2 create_test_cases.py --outdir $completedir;
+ $PYTHON2 create_test_cases.py --runner $abs_builddir/glsl/glsl_test --outdir $completedir;
if [ $? -eq 0 ]; then
has_tests=1
fi
@@ -61,7 +61,7 @@ fi
echo "====== Testing optimization passes ======"
for test in `find . -iname '*.opt_test'`; do
echo -n "Testing $test..."
- (cd `dirname "$test"`; ./`basename "$test"`) > "$test.out" 2>&1
+ ./$test > "$test.out" 2>&1
total=$((total+1))
if $PYTHON2 $PYTHON_FLAGS $compare_ir "$test.expected" "$test.out" >/dev/null 2>&1; then
echo "PASS"