summaryrefslogtreecommitdiffstats
path: root/src/glsl/tests
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2013-01-15 11:45:40 -0800
committerMatt Turner <mattst88@gmail.com>2013-01-22 14:33:24 -0800
commitefd201caa5cbfaf10d0ecad219046a9fe3593c4b (patch)
tree21930b02c385defb8e77d4e7152bc7c1d3ea03fd /src/glsl/tests
parent86d30dea3c13d29ef8d39bc18db63a0441051975 (diff)
downloadexternal_mesa3d-efd201caa5cbfaf10d0ecad219046a9fe3593c4b.zip
external_mesa3d-efd201caa5cbfaf10d0ecad219046a9fe3593c4b.tar.gz
external_mesa3d-efd201caa5cbfaf10d0ecad219046a9fe3593c4b.tar.bz2
glsl/build: Build tests via the glsl Makefile
Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
Diffstat (limited to 'src/glsl/tests')
-rw-r--r--src/glsl/tests/Makefile.am35
-rwxr-xr-xsrc/glsl/tests/optimization-test10
2 files changed, 8 insertions, 37 deletions
diff --git a/src/glsl/tests/Makefile.am b/src/glsl/tests/Makefile.am
deleted file mode 100644
index eaf5a3c..0000000
--- a/src/glsl/tests/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-AM_CPPFLAGS = \
- -I$(top_srcdir)/src/gtest/include \
- -I$(top_srcdir)/src/mesa \
- -I$(top_srcdir)/src/mapi \
- -I$(top_srcdir)/src/glsl \
- -I$(top_srcdir)/include
-
-TESTS_ENVIRONMENT= \
- export PYTHON2=$(PYTHON2); \
- export PYTHON_FLAGS=$(PYTHON_FLAGS);
-
-TESTS = \
- optimization-test \
- ralloc-test \
- uniform-initializer-test
-
-check_PROGRAMS = \
- ralloc-test \
- uniform-initializer-test
-
-uniform_initializer_test_SOURCES = \
- copy_constant_to_storage_tests.cpp \
- set_uniform_initializer_tests.cpp \
- uniform_initializer_utils.cpp
-uniform_initializer_test_CFLAGS = \
- $(PTHREAD_CFLAGS)
-uniform_initializer_test_LDADD = \
- $(top_builddir)/src/gtest/libgtest.la \
- $(top_builddir)/src/glsl/libglsl.la \
- $(top_builddir)/src/mesa/libmesa.la \
- $(PTHREAD_LIBS)
-
-ralloc_test_SOURCES = ralloc_test.cpp $(top_builddir)/src/glsl/ralloc.c
-ralloc_test_CFLAGS = $(PTHREAD_CFLAGS)
-ralloc_test_LDADD = $(top_builddir)/src/gtest/libgtest.la $(PTHREAD_LIBS)
diff --git a/src/glsl/tests/optimization-test b/src/glsl/tests/optimization-test
index 363c6cc..59383f8 100755
--- a/src/glsl/tests/optimization-test
+++ b/src/glsl/tests/optimization-test
@@ -1,5 +1,11 @@
#!/bin/bash
+if [ ! -z "$srcdir" ]; then
+ compare_ir=`pwd`/tests/compare_ir
+else
+ compare_ir=./compare_ir
+fi
+
total=0
pass=0
@@ -8,12 +14,12 @@ for test in `find . -iname '*.opt_test'`; do
echo -n "Testing $test..."
(cd `dirname "$test"`; ./`basename "$test"`) > "$test.out" 2>&1
total=$((total+1))
- if $PYTHON2 $PYTHON_FLAGS ./compare_ir "$test.expected" "$test.out" >/dev/null 2>&1; then
+ if $PYTHON2 $PYTHON_FLAGS $compare_ir "$test.expected" "$test.out" >/dev/null 2>&1; then
echo "PASS"
pass=$((pass+1))
else
echo "FAIL"
- $PYTHON2 $PYTHON_FLAGS ./compare_ir "$test.expected" "$test.out"
+ $PYTHON2 $PYTHON_FLAGS $compare_ir "$test.expected" "$test.out"
fi
done