summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaetan Nadon <memsize@videotron.ca>2014-02-20 09:42:40 -0500
committerGaetan Nadon <memsize@videotron.ca>2014-04-17 10:21:14 -0400
commitd26dd5b14015a4f90197740bd8b2f20a0df77c8c (patch)
treefefcb74de9a7213c022094be9ed6376544340383
parent71d4fce26a9f6e9aa96eb68ab73dda1da5e59ee8 (diff)
test: move test cases into their own directory
Seperate building the production code from the test programs, out of principal and as it opens the possibilities of simplification in follow-up patches. Avoid file names like test_xcb_image_shm-test_xcb_image_shm Reviewed-by: Uli Schlachter <psychon@znc.in> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac1
-rw-r--r--image/Makefile.am31
-rw-r--r--test/.gitignore (renamed from image/.gitignore)0
-rw-r--r--test/Makefile.am29
-rw-r--r--test/test.xbm (renamed from image/test.xbm)0
-rw-r--r--test/test_bitmap.c (renamed from image/test_bitmap.c)0
-rw-r--r--test/test_formats.c (renamed from image/test_formats.c)0
-rw-r--r--test/test_swap.c (renamed from image/test_swap.c)0
-rw-r--r--test/test_xcb_image.c (renamed from image/test_xcb_image.c)0
-rw-r--r--test/test_xcb_image_shm.c (renamed from image/test_xcb_image_shm.c)0
11 files changed, 31 insertions, 32 deletions
diff --git a/Makefile.am b/Makefile.am
index 21d2066..c981823 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,5 +12,5 @@ ChangeLog:
dist-hook: ChangeLog INSTALL
-SUBDIRS = image
+SUBDIRS = image test
EXTRA_DIST = autogen.sh
diff --git a/configure.ac b/configure.ac
index f6de7fc..4e9e1cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,6 +19,7 @@ PKG_CHECK_MODULES(XCB_UTIL, xcb-util)
AC_CONFIG_FILES([
Makefile
image/Makefile
+ test/Makefile
image/xcb-image.pc
])
AC_OUTPUT
diff --git a/image/Makefile.am b/image/Makefile.am
index d32f5a7..30e9c87 100644
--- a/image/Makefile.am
+++ b/image/Makefile.am
@@ -12,34 +12,3 @@ libxcb_image_la_LIBADD = $(XCB_LIBS) $(XCB_SHM_LIBS) $(XCB_UTIL_LIBS)
libxcb_image_la_LDFLAGS = -no-undefined
pkgconfig_DATA = xcb-image.pc
-
-noinst_PROGRAMS = test_xcb_image test_formats test_bitmap
-
-if HAVE_SHM
-noinst_PROGRAMS += test_xcb_image_shm
-endif
-
-check_PROGRAMS = test_swap
-
-TESTS=test_swap
-
-test_swap_SOURCES = test_swap.c
-test_swap_CPPFLAGS = $(XCB_CFLAGS) $(XCB_SHM_CFLAGS) $(XCB_UTIL_CFLAGS)
-test_swap_LDADD = $(XCB_LIBS) $(XCB_UTIL_LIBS) $(XCB_IMAGE_LIBS)
-
-test_xcb_image_SOURCES = test_xcb_image.c
-test_xcb_image_CPPFLAGS = $(XCB_CFLAGS) $(XCB_SHM_CFLAGS) $(XCB_UTIL_CFLAGS)
-test_xcb_image_LDADD = $(XCB_LIBS) $(XCB_UTIL_LIBS) $(XCB_IMAGE_LIBS)
-
-test_xcb_image_shm_SOURCES = test_xcb_image_shm.c
-test_xcb_image_shm_CPPFLAGS = $(XCB_CFLAGS) $(XCB_SHM_CFLAGS) $(XCB_UTIL_CFLAGS)
-test_xcb_image_shm_LDADD = $(XCB_LIBS) $(XCB_SHM_LIBS) \
- $(XCB_UTIL_LIBS) $(XCB_IMAGE_LIBS)
-
-test_formats_SOURCES = test_formats.c
-test_formats_CPPFLAGS = $(XCB_CFLAGS) $(XCB_SHM_CFLAGS) $(XCB_UTIL_CFLAGS) $(XPROTO_CFLAGS)
-test_formats_LDADD = $(XCB_LIBS) $(XCB_UTIL_LIBS) $(XCB_IMAGE_LIBS)
-
-test_bitmap_SOURCES = test_bitmap.c test.xbm
-test_bitmap_CPPFLAGS = $(XCB_CFLAGS) $(XCB_SHM_CFLAGS) $(XCB_UTIL_CFLAGS)
-test_bitmap_LDADD = $(XCB_LIBS) $(XCB_UTIL_LIBS) $(XCB_IMAGE_LIBS)
diff --git a/image/.gitignore b/test/.gitignore
index de1725d..de1725d 100644
--- a/image/.gitignore
+++ b/test/.gitignore
diff --git a/test/Makefile.am b/test/Makefile.am
new file mode 100644
index 0000000..1116473
--- /dev/null
+++ b/test/Makefile.am
@@ -0,0 +1,29 @@
+noinst_PROGRAMS = test_xcb_image test_formats test_bitmap
+
+if HAVE_SHM
+noinst_PROGRAMS += test_xcb_image_shm
+endif
+
+check_PROGRAMS = test_swap
+
+TESTS=test_swap
+
+test_swap_SOURCES = test_swap.c
+test_swap_CPPFLAGS = $(XCB_CFLAGS) $(XCB_SHM_CFLAGS) $(XCB_UTIL_CFLAGS) -I$(top_srcdir)/image
+test_swap_LDADD = $(XCB_LIBS) $(XCB_UTIL_LIBS) $(top_builddir)/image/libxcb-image.la
+
+test_xcb_image_SOURCES = test_xcb_image.c
+test_xcb_image_CPPFLAGS = $(XCB_CFLAGS) $(XCB_SHM_CFLAGS) $(XCB_UTIL_CFLAGS) -I$(top_srcdir)/image
+test_xcb_image_LDADD = $(XCB_LIBS) $(XCB_UTIL_LIBS) $(top_builddir)/image/libxcb-image.la
+
+test_xcb_image_shm_SOURCES = test_xcb_image_shm.c
+test_xcb_image_shm_CPPFLAGS = $(XCB_CFLAGS) $(XCB_SHM_CFLAGS) $(XCB_UTIL_CFLAGS) -I$(top_srcdir)/image
+test_xcb_image_shm_LDADD = $(XCB_LIBS) $(XCB_UTIL_LIBS) $(XCB_SHM_LIBS) $(top_builddir)/image/libxcb-image.la
+
+test_formats_SOURCES = test_formats.c
+test_formats_CPPFLAGS = $(XCB_CFLAGS) $(XCB_SHM_CFLAGS) $(XCB_UTIL_CFLAGS) $(XPROTO_CFLAGS) -I$(top_srcdir)/image
+test_formats_LDADD = $(XCB_LIBS) $(XCB_UTIL_LIBS) $(top_builddir)/image/libxcb-image.la
+
+test_bitmap_SOURCES = test_bitmap.c test.xbm
+test_bitmap_CPPFLAGS = $(XCB_CFLAGS) $(XCB_SHM_CFLAGS) $(XCB_UTIL_CFLAGS) -I$(top_srcdir)/image
+test_bitmap_LDADD = $(XCB_LIBS) $(XCB_UTIL_LIBS) $(top_builddir)/image/libxcb-image.la
diff --git a/image/test.xbm b/test/test.xbm
index 804b996..804b996 100644
--- a/image/test.xbm
+++ b/test/test.xbm
diff --git a/image/test_bitmap.c b/test/test_bitmap.c
index ff57776..ff57776 100644
--- a/image/test_bitmap.c
+++ b/test/test_bitmap.c
diff --git a/image/test_formats.c b/test/test_formats.c
index 307e623..307e623 100644
--- a/image/test_formats.c
+++ b/test/test_formats.c
diff --git a/image/test_swap.c b/test/test_swap.c
index 688ae68..688ae68 100644
--- a/image/test_swap.c
+++ b/test/test_swap.c
diff --git a/image/test_xcb_image.c b/test/test_xcb_image.c
index 474dea0..474dea0 100644
--- a/image/test_xcb_image.c
+++ b/test/test_xcb_image.c
diff --git a/image/test_xcb_image_shm.c b/test/test_xcb_image_shm.c
index df4ceca..df4ceca 100644
--- a/image/test_xcb_image_shm.c
+++ b/test/test_xcb_image_shm.c