aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/tests
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2017-02-23 14:53:03 +0000
committerEmil Velikov <[email protected]>2017-03-28 15:31:23 +0100
commit7d2a1394bbdd79d059a4c1dbe96a4e38c9ed34de (patch)
treee6a51f413b8601edfab2a01b197030277ea9dd0f /src/compiler/glsl/tests
parent86a937d2644adcd724dae58c5212de5358326e9c (diff)
glsl/tests/optimization-test: error out if we fail to generate any tests
v2: use -eq over a string comparison (Eric) 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')
-rwxr-xr-xsrc/compiler/glsl/tests/optimization-test.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/compiler/glsl/tests/optimization-test.sh b/src/compiler/glsl/tests/optimization-test.sh
index 1113cb1f17c..86a87b0d954 100755
--- a/src/compiler/glsl/tests/optimization-test.sh
+++ b/src/compiler/glsl/tests/optimization-test.sh
@@ -27,6 +27,7 @@ compare_ir=$srcdir/glsl/tests/compare_ir.py
total=0
pass=0
+has_tests=0
# Store our location before we start diving into subdirectories.
ORIGDIR=`pwd`
@@ -36,12 +37,22 @@ for dir in $srcdir/glsl/tests/*/; do
# 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 ..
+ cd $dir;
+ $PYTHON2 create_test_cases.py --outdir $completedir;
+ if [ $? -eq 0 ]; then
+ has_tests=1
+ fi
+ cd ..
fi
echo "$dir"
done
cd "$ORIGDIR"
+if [ $has_tests -eq 0 ]; then
+ echo "Could not generate any tests."
+ exit 1
+fi
+
if [ ! -f "$compare_ir" ]; then
echo "Could not find compare_ir. Make sure that srcdir variable is correctly set."
exit 1