v2: use -eq over a string comparison (Eric)
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
total=0
pass=0
+has_tests=0
# Store our location before we start diving into subdirectories.
ORIGDIR=`pwd`
# 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