state_trackers/xvmc/test: Convert to automake
authorMatt Turner <mattst88@gmail.com>
Wed, 5 Sep 2012 04:16:04 +0000 (21:16 -0700)
committerAndreas Boll <andreas.boll.dev@gmail.com>
Thu, 10 Jan 2013 21:01:09 +0000 (22:01 +0100)
src/gallium/state_trackers/xvmc/Makefile.am
src/gallium/state_trackers/xvmc/tests/Makefile [deleted file]
src/gallium/state_trackers/xvmc/tests/test_subpicture.c
src/gallium/state_trackers/xvmc/tests/testlib.c

index b3b2e2f4ad38cdd84db0ee6f6245169ba37573f6..973ac5dfa187effc774d24188ed2701575411aae 100644 (file)
@@ -35,6 +35,29 @@ libxvmctracker_la_SOURCES = \
        subpicture.c \
        attributes.c
 
+check_PROGRAMS = \
+       tests/test_context \
+       tests/test_surface \
+       tests/test_subpicture \
+       tests/test_blocks \
+       tests/test_rendering
+TESTS = $(check_PROGRAMS)
+noinst_PROGRAMS = tests/xvmc_bench
+
+TEST_LIBS = -lXvMCW -lXvMC -lXv -lX11
+tests_test_context_SOURCES = tests/test_context.c tests/testlib.c
+tests_test_context_LDADD = $(TEST_LIBS)
+tests_test_surface_SOURCES = tests/test_surface.c tests/testlib.c
+tests_test_surface_LDADD = $(TEST_LIBS)
+tests_test_subpicture_SOURCES = tests/test_subpicture.c tests/testlib.c
+tests_test_subpicture_LDADD = $(TEST_LIBS)
+tests_test_blocks_SOURCES = tests/test_blocks.c tests/testlib.c
+tests_test_blocks_LDADD = $(TEST_LIBS)
+tests_test_rendering_SOURCES = tests/test_rendering.c tests/testlib.c
+tests_test_rendering_LDADD = $(TEST_LIBS)
+tests_xvmc_bench_SOURCES = tests/xvmc_bench.c tests/testlib.c
+tests_xvmc_bench_LDADD = $(TEST_LIBS)
+
 #XXX: Delete this when all targets that rely on xvmctracker are converted to automake.
 all-local: libxvmctracker.la
        ln -f $(builddir)/.libs/libxvmctracker.a $(builddir)/libxvmctracker.a
diff --git a/src/gallium/state_trackers/xvmc/tests/Makefile b/src/gallium/state_trackers/xvmc/tests/Makefile
deleted file mode 100644 (file)
index fa19045..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-TOP = ../../../../..
-include $(TOP)/configs/current
-
-LIBS = -lXvMCW -lXvMC -lXv -lX11
-
-#############################################
-
-.PHONY: default clean
-
-default: test_context test_surface test_subpicture test_blocks test_rendering xvmc_bench
-
-test_context: test_context.o testlib.o
-       $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
-
-test_surface: test_surface.o testlib.o
-       $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
-
-test_subpicture: test_subpicture.o testlib.o
-       $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
-
-test_blocks: test_blocks.o testlib.o
-       $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
-
-test_rendering: test_rendering.o testlib.o
-       $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
-
-xvmc_bench: xvmc_bench.o testlib.o
-       $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
-
-clean:
-       $(RM) -rf *.o test_context test_surface test_subpicture test_blocks test_rendering xvmc_bench
index 9336bfac4463c727fd909d06277df1364073c2a9..b0ebdce1c2b4f52a64ce74f2ce3646ea24752d3b 100644 (file)
@@ -28,6 +28,7 @@
 #include <assert.h>
 #include <error.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include "testlib.h"
 
 static void PrintGUID(const char *guid)
index de3b8da7787485fc076af3c925285597470615b0..741310f0b483b209c46614b542711e0ee7493354 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "testlib.h"
 #include <stdio.h>
+#include <stdlib.h>
 
 /*
 void test(int pred, const char *pred_string, const char *doc_string, const char *file, unsigned int line)