[Mesa-dev] [PATCH 5/5] src/glsl/glcpp: wire up glcpp-test to make check

Matt Turner mattst88 at gmail.com
Sun Jan 29 22:09:51 PST 2012


---
 src/glsl/glcpp/Makefile.am      |    2 ++
 src/glsl/glcpp/tests/glcpp-test |    6 +++++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/glsl/glcpp/Makefile.am b/src/glsl/glcpp/Makefile.am
index 198908c..68f55dc 100644
--- a/src/glsl/glcpp/Makefile.am
+++ b/src/glsl/glcpp/Makefile.am
@@ -24,6 +24,8 @@
 noinst_LTLIBRARIES = libglcpp.la
 check_PROGRAMS = glcpp
 
+TESTS = tests/glcpp-test
+
 AM_CPPFLAGS = \
 	-I$(top_srcdir)/src/mesa \
 	-I$(top_srcdir)/src/mapi \
diff --git a/src/glsl/glcpp/tests/glcpp-test b/src/glsl/glcpp/tests/glcpp-test
index 1db7523..1f37139 100755
--- a/src/glsl/glcpp/tests/glcpp-test
+++ b/src/glsl/glcpp/tests/glcpp-test
@@ -34,10 +34,14 @@ total=0
 pass=0
 clean=0
 
+builddir=`pwd`
+testdir=`dirname $0`
+cd $testdir
+
 echo "====== Testing for correctness ======"
 for test in *.c; do
     echo -n "Testing $test..."
-    ../glcpp < $test > $test.out 2>&1
+    $builddir/glcpp < $test > $test.out 2>&1
     total=$((total+1))
     if cmp $test.expected $test.out >/dev/null 2>&1; then
 	echo "PASS"
-- 
1.7.3.4



More information about the mesa-dev mailing list