-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 \
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 \
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
.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)"