[Mesa-dev] [PATCH v2 09/23] glsl/tests/optimization-test: add fallback srcdir/abs_builddir defines
Emil Velikov
emil.l.velikov at gmail.com
Fri Mar 17 13:19:35 UTC 2017
From: Emil Velikov <emil.velikov at collabora.com>
There is no robust way to detect either one, so simply hope for the best
and warn just in case.
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
src/compiler/glsl/tests/optimization-test.sh | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/compiler/glsl/tests/optimization-test.sh b/src/compiler/glsl/tests/optimization-test.sh
index 7410db64f14..a7d771170c5 100755
--- a/src/compiler/glsl/tests/optimization-test.sh
+++ b/src/compiler/glsl/tests/optimization-test.sh
@@ -16,6 +16,19 @@ if [ $? -ne 0 ]; then
exit 1
fi
+if [ -z "$srcdir" -o -z "$abs_builddir" ]; then
+ echo ""
+ echo "Warning: you're invoking the script manually and things may fail."
+ echo "Attempting to determine/set srcdir and abs_builddir variables."
+ echo ""
+
+ # Variable should point to the Makefile.glsl.am
+ srcdir=./../../
+ cd `dirname "$0"`
+ # Variable should point to the folder two levels above glsl_test
+ abs_builddir=`pwd`/../../
+fi
+
total=0
pass=0
--
2.11.1
More information about the mesa-dev
mailing list