diff options
author | Matt Turner <[email protected]> | 2013-01-15 11:45:40 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2013-01-22 14:33:24 -0800 |
commit | efd201caa5cbfaf10d0ecad219046a9fe3593c4b (patch) | |
tree | 21930b02c385defb8e77d4e7152bc7c1d3ea03fd /src/glsl/tests | |
parent | 86d30dea3c13d29ef8d39bc18db63a0441051975 (diff) |
glsl/build: Build tests via the glsl Makefile
Tested-by: Andreas Boll <[email protected]>
Diffstat (limited to 'src/glsl/tests')
-rw-r--r-- | src/glsl/tests/Makefile.am | 35 | ||||
-rwxr-xr-x | src/glsl/tests/optimization-test | 10 |
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 eaf5a3c0ac1..00000000000 --- 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 363c6ccda56..59383f8f912 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 |