r300g: Fix path to test programs for out-of-tree builds
authorMichel Dänzer <michel.daenzer@amd.com>
Tue, 19 Aug 2014 02:00:16 +0000 (11:00 +0900)
committerMichel Dänzer <michel@daenzer.net>
Wed, 20 Aug 2014 07:12:51 +0000 (16:12 +0900)
Fixes make check in that case.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
src/gallium/drivers/r300/Makefile.am
src/gallium/drivers/r300/compiler/tests/rc_test_helpers.c

index e74e44542beeb795b7b4f344dc958042a9fd55b4..f5107f8aa9c737daa6aba04108903841f6af02dc 100644 (file)
@@ -22,6 +22,7 @@ r300_compiler_tests_LDADD = libr300.la libr300-helper.la \
        $(top_builddir)/src/util/libmesautil.la \
        $(GALLIUM_COMMON_LIB_DEPS)
 r300_compiler_tests_CPPFLAGS = \
+       -DTEST_PATH=\"$(top_srcdir)/src/gallium/drivers/r300/compiler/tests\" \
        -I$(top_srcdir)/src/gallium/drivers/r300/compiler
 r300_compiler_tests_SOURCES = $(COMPILER_TESTS_SOURCES)
 
index 239a76298fee9fcd3923a58c734bd8584719cd24..7c9d1779df5597d10a06ffbc47629bf659175f64 100644 (file)
@@ -543,7 +543,7 @@ unsigned load_program(
        unsigned i = 0;
 
        memset(line, 0, sizeof(line));
-       snprintf(path, MAX_PATH_LENGTH, "compiler/tests/%s", filename);
+       snprintf(path, MAX_PATH_LENGTH, TEST_PATH "/%s", filename);
        file = fopen(path, "r");
        if (!file) {
                return 0;