Tests: dynamically create test list based on enabled features
[babeltrace.git] / tests / Makefile.am
index 47891e90af0945d3accf10f7d3cd0fe1351af031..5927f59eff6a2edee32871a901277661ea9c2f10 100644 (file)
@@ -1,12 +1,34 @@
-AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include
+SUBDIRS = utils bin lib
 
-SUBDIRS = lib
+EXTRA_DIST = $(srcdir)/ctf-traces/** tests
+if ENABLE_DEBUGINFO
+EXTRA_DIST += $(srcdir)/debuginfo-data/** tests_debuginfo
+endif
 
-noinst_PROGRAMS = test-bitfield
+SCRIPT_LIST = run.sh
 
-test_bitfield_SOURCES = test-bitfield.c
+dist_noinst_SCRIPTS = $(SCRIPT_LIST)
 
-EXTRA_DIST = runall.sh ctf-traces/**
+all-local:
+       @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
+               for script in $(SCRIPT_LIST); do \
+                       cp -f $(srcdir)/$$script $(builddir); \
+               done; \
+       fi
 
+clean-local:
+       @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
+               for script in $(SCRIPT_LIST); do \
+                       rm -f $(builddir)/$$script; \
+               done; \
+       fi
+
+TEMPLIST := $(shell mktemp -u)
 check-am:
-       ./runall.sh
+       @cat $(srcdir)/tests > $(TEMPLIST)
+if ENABLE_DEBUGINFO
+       @echo '' >> $(TEMPLIST)
+       @cat $(srcdir)/tests_debuginfo >> $(TEMPLIST)
+endif
+       ./run.sh $(TEMPLIST)
+       rm $(TEMPLIST)
This page took 0.024959 seconds and 4 git commands to generate.