r300g: Reorganize the compiler unit tests
authorTom Stellard <tstellar@gmail.com>
Fri, 24 Feb 2012 14:00:01 +0000 (09:00 -0500)
committerTom Stellard <tstellar@gmail.com>
Sun, 26 Feb 2012 20:13:47 +0000 (15:13 -0500)
src/gallium/drivers/r300/compiler/tests/Makefile
src/gallium/drivers/r300/compiler/tests/r300_compiler_tests.c [new file with mode: 0644]
src/gallium/drivers/r300/compiler/tests/r300_compiler_tests.h [new file with mode: 0644]
src/gallium/drivers/r300/compiler/tests/radeon_compiler_util_tests.c

index 6eda34a2c00c4fa37c2fe55b862ca269852ec103..fe83e5d0c964aee57be66fa37e0fcf845d1b75b3 100644 (file)
@@ -4,11 +4,12 @@ include $(TOP)/configs/current
 CFLAGS += -Wall -Werror
 
 ### Basic defines ###
-TESTS =        radeon_compiler_util_tests
+TESTS =        r300_compiler_tests
 
 TEST_SOURCES := $(TESTS:=.c)
 
 SHARED_SOURCES =               \
+       radeon_compiler_util_tests.c    \
        rc_test_helpers.c       \
        unit_test.c
 
diff --git a/src/gallium/drivers/r300/compiler/tests/r300_compiler_tests.c b/src/gallium/drivers/r300/compiler/tests/r300_compiler_tests.c
new file mode 100644 (file)
index 0000000..01495b4
--- /dev/null
@@ -0,0 +1,6 @@
+#include "r300_compiler_tests.h"
+
+int main(int argc, char ** argv)
+{
+       radeon_compiler_util_run_tests();
+}
diff --git a/src/gallium/drivers/r300/compiler/tests/r300_compiler_tests.h b/src/gallium/drivers/r300/compiler/tests/r300_compiler_tests.h
new file mode 100644 (file)
index 0000000..0a22705
--- /dev/null
@@ -0,0 +1,2 @@
+
+void radeon_compiler_util_run_tests(void);
index a2e3f2ab2e54fcf8253f5cf7f4b3a6a99fb8c035..5ef25962a561e3b2e2a0b726722322741edd608d 100644 (file)
@@ -5,6 +5,7 @@
 #include "radeon_compiler_util.h"
 #include "radeon_program.h"
 
+#include "r300_compiler_tests.h"
 #include "rc_test_helpers.h"
 #include "unit_test.h"
 
@@ -66,7 +67,7 @@ static void test_runner_rc_inst_can_use_presub(struct test_result * result)
                "MAD temp[0].xyz, temp[2].xyz_, -temp[3].xxx_, input[5].xyz_;");
 }
 
-int main(int argc, char ** argv)
+void radeon_compiler_util_run_tests()
 {
        struct test tests[] = {
                {"rc_inst_can_use_presub()", test_runner_rc_inst_can_use_presub},