summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/tests/optimization-test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl/tests/optimization-test.sh')
-rwxr-xr-xsrc/compiler/glsl/tests/optimization-test.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/compiler/glsl/tests/optimization-test.sh b/src/compiler/glsl/tests/optimization-test.sh
index 47970c6be29..1113cb1f17c 100755
--- a/src/compiler/glsl/tests/optimization-test.sh
+++ b/src/compiler/glsl/tests/optimization-test.sh
@@ -28,13 +28,19 @@ compare_ir=$srcdir/glsl/tests/compare_ir.py
total=0
pass=0
+# Store our location before we start diving into subdirectories.
+ORIGDIR=`pwd`
echo "====== Generating tests ======"
-for dir in tests/*/; do
+for dir in $srcdir/glsl/tests/*/; do
if [ -e "${dir}create_test_cases.py" ]; then
- cd $dir; $PYTHON2 create_test_cases.py; cd ..
+ # construct the correct builddir
+ completedir="$abs_builddir/glsl/tests/`echo ${dir} | sed 's|.*/glsl/tests/||g'`"
+ mkdir -p $completedir
+ cd $dir; $PYTHON2 create_test_cases.py --outdir $completedir; cd ..
fi
echo "$dir"
done
+cd "$ORIGDIR"
if [ ! -f "$compare_ir" ]; then
echo "Could not find compare_ir. Make sure that srcdir variable is correctly set."