tests: Move tap-driver.sh out of the autotools aux directory
[urcu.git] / tests / benchmark / Makefile.am
index 2326721ac4577aae8420da955d147b19363fb2ad..d268f3aa3155b8a87c9df795b73f7050b6a852d5 100644 (file)
@@ -1,10 +1,11 @@
-if !LIBC_INCLUDES_PTHREAD
-AM_LDFLAGS=-lpthread
-endif
-AM_CFLAGS=-I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/tests/common -g
+AM_CFLAGS += -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src -I$(top_srcdir)/tests/common -g
+
+TEST_EXTENSIONS = .tap
+TAP_LOG_DRIVER_FLAGS = --merge --comments
+TAP_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
+       $(top_srcdir)/tests/utils/tap-driver.sh
 
 SCRIPT_LIST = common.sh \
-       run.sh \
        run-urcu-tests.sh \
        runhash.sh \
        runtests.sh \
@@ -20,11 +21,13 @@ SCRIPT_LIST = common.sh \
 
 dist_noinst_SCRIPTS = $(SCRIPT_LIST)
 
-TEST_LIST = regression_tests \
-       short_bench_tests \
-       long_bench_tests
-
-dist_noinst_DATA = $(TEST_LIST)
+dist_noinst_DATA = \
+       hashtable_1_seconds.tap \
+       urcu_1_seconds.tap
+       hashtable_3_seconds.tap \
+       urcu_3_seconds.tap
+       hashtable_30_seconds.tap \
+       urcu_30_seconds.tap
 
 noinst_PROGRAMS = test_urcu test_urcu_dynamic_link test_urcu_timing \
        test_urcu_signal test_urcu_signal_dynamic_link test_urcu_signal_timing \
@@ -45,13 +48,13 @@ noinst_PROGRAMS = test_urcu test_urcu_dynamic_link test_urcu_timing \
        test_urcu_lfq_dynlink test_urcu_lfs_dynlink test_urcu_hash \
        test_urcu_lfs_rcu_dynlink
 
-URCU_COMMON_LIB=$(top_builddir)/liburcu-common.la
-URCU_LIB=$(top_builddir)/liburcu.la
-URCU_QSBR_LIB=$(top_builddir)/liburcu-qsbr.la
-URCU_MB_LIB=$(top_builddir)/liburcu-mb.la
-URCU_SIGNAL_LIB=$(top_builddir)/liburcu-signal.la
-URCU_BP_LIB=$(top_builddir)/liburcu-bp.la
-URCU_CDS_LIB=$(top_builddir)/liburcu-cds.la
+URCU_COMMON_LIB=$(top_builddir)/src/liburcu-common.la
+URCU_LIB=$(top_builddir)/src/liburcu.la
+URCU_QSBR_LIB=$(top_builddir)/src/liburcu-qsbr.la
+URCU_MB_LIB=$(top_builddir)/src/liburcu-mb.la
+URCU_SIGNAL_LIB=$(top_builddir)/src/liburcu-signal.la
+URCU_BP_LIB=$(top_builddir)/src/liburcu-bp.la
+URCU_CDS_LIB=$(top_builddir)/src/liburcu-cds.la
 
 DEBUG_YIELD_LIB=$(builddir)/../common/libdebug-yield.la
 
@@ -231,11 +234,19 @@ clean-local:
 
 .PHONY: short_bench long_bench regtest
 
+# This empty variable is required to enable the TAP test suite for custom
+# targets like 'regtest' while keeping the default 'check' a noop.
+TESTS =
+
+SHORT_BENCH_TESTS = urcu_3_seconds.tap hashtable_3_seconds.tap
+LONG_BENCH_TESTS = urcu_30_seconds.tap hashtable_30_seconds.tap
+REGTEST_TESTS = urcu_1_seconds.tap hashtable_1_seconds.tap
+
 short_bench:
-       ./run.sh short_bench_tests
+       $(MAKE) $(AM_MAKEFLAGS) check TESTS="$(SHORT_BENCH_TESTS)"
 
 long_bench:
-       ./run.sh long_bench_tests
+       $(MAKE) $(AM_MAKEFLAGS) check TESTS="$(LONG_BENCH_TESTS)"
 
 regtest:
-       ./run.sh regression_tests
+       $(MAKE) $(AM_MAKEFLAGS) check TESTS="$(REGTEST_TESTS)"
This page took 0.02385 seconds and 4 git commands to generate.