Commit | Line | Data |
---|---|---|
d001c886 MJ |
1 | # SPDX-FileCopyrightText: 2023 EfficiOS Inc. |
2 | # | |
3 | # SPDX-License-Identifier: MIT | |
4 | ||
01956342 | 5 | AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_srcdir)/tests/common |
9e4e7ad1 | 6 | AM_CPPFLAGS += -include $(top_srcdir)/tests/benchmark/common-states.h |
f5ab766e | 7 | |
03c5782e MJ |
8 | TEST_EXTENSIONS = .tap |
9 | TAP_LOG_DRIVER_FLAGS = --merge --comments | |
de6cb9d5 MJ |
10 | TAP_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' \ |
11 | URCU_TESTS_SRCDIR='$(abs_top_srcdir)/tests' \ | |
12 | URCU_TESTS_BUILDDIR='$(abs_top_builddir)/tests' \ | |
13 | $(SHELL) $(top_srcdir)/tests/utils/tap-driver.sh | |
03c5782e | 14 | |
9e4e7ad1 OD |
15 | noinst_HEADERS = common-states.h |
16 | ||
de6cb9d5 | 17 | SCRIPT_LIST = \ |
f356e6f3 MJ |
18 | runpaul-phase1.sh \ |
19 | runpaul-phase2.sh \ | |
20 | runpaul-phase3.sh \ | |
21 | runpaul-phase4.sh \ | |
22 | runpaul-phase5.sh \ | |
23 | runpaul-phase6.sh \ | |
24 | runpaul-phase7.sh \ | |
f356e6f3 MJ |
25 | subphase4.sh |
26 | ||
de6cb9d5 MJ |
27 | dist_noinst_SCRIPTS = \ |
28 | runhash.sh \ | |
29 | runtests-batch.sh \ | |
30 | runtests.sh \ | |
31 | run-urcu-tests.sh \ | |
32 | $(SCRIPT_LIST) | |
f356e6f3 | 33 | |
03c5782e MJ |
34 | dist_noinst_DATA = \ |
35 | hashtable_1_seconds.tap \ | |
36 | urcu_1_seconds.tap | |
37 | hashtable_3_seconds.tap \ | |
38 | urcu_3_seconds.tap | |
39 | hashtable_30_seconds.tap \ | |
40 | urcu_30_seconds.tap | |
67c10597 | 41 | |
f5ab766e | 42 | noinst_PROGRAMS = test_urcu test_urcu_dynamic_link test_urcu_timing \ |
f5ab766e | 43 | test_rwlock_timing test_rwlock test_perthreadlock_timing \ |
c60cd05a | 44 | test_perthreadlock test_urcu_yield test_urcu_mb \ |
f5ab766e | 45 | test_urcu_qsbr_timing test_urcu_qsbr \ |
c60cd05a | 46 | test_mutex test_looplen test_urcu_gc \ |
f5ab766e | 47 | test_urcu_lgc \ |
c60cd05a | 48 | test_urcu_mb_gc test_urcu_qsbr_gc test_urcu_qsbr_lgc \ |
f5ab766e MD |
49 | test_urcu_mb_lgc test_urcu_qsbr_dynamic_link test_urcu_defer \ |
50 | test_urcu_assign test_urcu_assign_dynamic_link \ | |
51 | test_urcu_bp test_urcu_bp_dynamic_link test_cycles_per_loop \ | |
52 | test_urcu_lfq test_urcu_wfq test_urcu_lfs test_urcu_wfs \ | |
53 | test_urcu_lfs_rcu \ | |
54 | test_urcu_wfcq \ | |
55 | test_urcu_wfq_dynlink test_urcu_wfs_dynlink \ | |
56 | test_urcu_wfcq_dynlink \ | |
57 | test_urcu_lfq_dynlink test_urcu_lfs_dynlink test_urcu_hash \ | |
58 | test_urcu_lfs_rcu_dynlink | |
59 | ||
6893800a MJ |
60 | URCU_COMMON_LIB=$(top_builddir)/src/liburcu-common.la |
61 | URCU_LIB=$(top_builddir)/src/liburcu.la | |
62 | URCU_QSBR_LIB=$(top_builddir)/src/liburcu-qsbr.la | |
63 | URCU_MB_LIB=$(top_builddir)/src/liburcu-mb.la | |
6893800a MJ |
64 | URCU_BP_LIB=$(top_builddir)/src/liburcu-bp.la |
65 | URCU_CDS_LIB=$(top_builddir)/src/liburcu-cds.la | |
f5ab766e | 66 | |
2650042a MD |
67 | DEBUG_YIELD_LIB=$(builddir)/../common/libdebug-yield.la |
68 | ||
9e4e7ad1 | 69 | test_urcu_SOURCES = test_urcu.c common-states.c |
05a4bc03 | 70 | test_urcu_LDADD = $(URCU_LIB) |
f5ab766e | 71 | |
9e4e7ad1 | 72 | test_urcu_dynamic_link_SOURCES = test_urcu.c common-states.c |
05a4bc03 | 73 | test_urcu_dynamic_link_LDADD = $(URCU_LIB) |
f5ab766e MD |
74 | test_urcu_dynamic_link_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS) |
75 | ||
9e4e7ad1 | 76 | test_urcu_timing_SOURCES = test_urcu_timing.c common-states.c |
05a4bc03 | 77 | test_urcu_timing_LDADD = $(URCU_LIB) |
f5ab766e | 78 | |
9e4e7ad1 | 79 | test_urcu_yield_SOURCES = test_urcu.c common-states.c |
05a4bc03 | 80 | test_urcu_yield_LDADD = $(URCU_LIB) $(DEBUG_YIELD_LIB) |
f5ab766e MD |
81 | test_urcu_yield_CFLAGS = -DDEBUG_YIELD $(AM_CFLAGS) |
82 | ||
83 | ||
9e4e7ad1 | 84 | test_urcu_qsbr_SOURCES = test_urcu_qsbr.c common-states.c |
bb917e0f | 85 | test_urcu_qsbr_LDADD = $(URCU_QSBR_LIB) |
f5ab766e | 86 | |
9e4e7ad1 | 87 | test_urcu_qsbr_timing_SOURCES = test_urcu_qsbr_timing.c common-states.c |
bb917e0f | 88 | test_urcu_qsbr_timing_LDADD = $(URCU_QSBR_LIB) |
f5ab766e MD |
89 | |
90 | ||
9e4e7ad1 | 91 | test_urcu_mb_SOURCES = test_urcu.c common-states.c |
30ac8e5e | 92 | test_urcu_mb_LDADD = $(URCU_MB_LIB) |
f5ab766e MD |
93 | test_urcu_mb_CFLAGS = -DRCU_MB $(AM_CFLAGS) |
94 | ||
95 | ||
9e4e7ad1 | 96 | test_rwlock_timing_SOURCES = test_rwlock_timing.c common-states.c |
c60cd05a | 97 | test_rwlock_timing_LDADD = $(URCU_LIB) |
f5ab766e | 98 | |
9e4e7ad1 | 99 | test_rwlock_SOURCES = test_rwlock.c common-states.c |
c60cd05a | 100 | test_rwlock_LDADD = $(URCU_LIB) |
f5ab766e | 101 | |
9e4e7ad1 | 102 | test_perthreadlock_timing_SOURCES = test_perthreadlock_timing.c common-states.c |
c60cd05a | 103 | test_perthreadlock_timing_LDADD = $(URCU_LIB) |
f5ab766e | 104 | |
9e4e7ad1 | 105 | test_perthreadlock_SOURCES = test_perthreadlock.c common-states.c |
c60cd05a | 106 | test_perthreadlock_LDADD = $(URCU_LIB) |
f5ab766e | 107 | |
9e4e7ad1 | 108 | test_mutex_SOURCES = test_mutex.c common-states.c |
f5ab766e | 109 | |
9e4e7ad1 | 110 | test_looplen_SOURCES = test_looplen.c common-states.c |
f5ab766e | 111 | |
9e4e7ad1 | 112 | test_urcu_gc_SOURCES = test_urcu_gc.c common-states.c |
05a4bc03 | 113 | test_urcu_gc_LDADD = $(URCU_LIB) |
f5ab766e | 114 | |
9e4e7ad1 | 115 | test_urcu_mb_gc_SOURCES = test_urcu_gc.c common-states.c |
30ac8e5e | 116 | test_urcu_mb_gc_LDADD = $(URCU_MB_LIB) |
f5ab766e MD |
117 | test_urcu_mb_gc_CFLAGS = -DRCU_MB $(AM_CFLAGS) |
118 | ||
9e4e7ad1 | 119 | test_urcu_qsbr_gc_SOURCES = test_urcu_qsbr_gc.c common-states.c |
bb917e0f | 120 | test_urcu_qsbr_gc_LDADD = $(URCU_QSBR_LIB) |
f5ab766e | 121 | |
9e4e7ad1 | 122 | test_urcu_qsbr_lgc_SOURCES = test_urcu_qsbr_gc.c common-states.c |
bb917e0f | 123 | test_urcu_qsbr_lgc_LDADD = $(URCU_QSBR_LIB) |
f5ab766e MD |
124 | test_urcu_qsbr_lgc_CFLAGS = -DTEST_LOCAL_GC $(AM_CFLAGS) |
125 | ||
9e4e7ad1 | 126 | test_urcu_lgc_SOURCES = test_urcu_gc.c common-states.c |
05a4bc03 | 127 | test_urcu_lgc_LDADD = $(URCU_LIB) |
f5ab766e MD |
128 | test_urcu_lgc_CFLAGS = -DTEST_LOCAL_GC $(AM_CFLAGS) |
129 | ||
9e4e7ad1 | 130 | test_urcu_mb_lgc_SOURCES = test_urcu_gc.c common-states.c |
30ac8e5e | 131 | test_urcu_mb_lgc_LDADD = $(URCU_MB_LIB) |
f5ab766e MD |
132 | test_urcu_mb_lgc_CFLAGS = -DTEST_LOCAL_GC -DRCU_MB $(AM_CFLAGS) |
133 | ||
9e4e7ad1 | 134 | test_urcu_qsbr_dynamic_link_SOURCES = test_urcu_qsbr.c common-states.c |
bb917e0f | 135 | test_urcu_qsbr_dynamic_link_LDADD = $(URCU_QSBR_LIB) |
f5ab766e MD |
136 | test_urcu_qsbr_dynamic_link_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS) |
137 | ||
9e4e7ad1 | 138 | test_urcu_defer_SOURCES = test_urcu_defer.c common-states.c |
fd76f239 | 139 | test_urcu_defer_LDADD = $(URCU_LIB) |
f5ab766e MD |
140 | |
141 | test_cycles_per_loop_SOURCES = test_cycles_per_loop.c | |
142 | ||
9e4e7ad1 | 143 | test_urcu_assign_SOURCES = test_urcu_assign.c common-states.c |
05a4bc03 | 144 | test_urcu_assign_LDADD = $(URCU_LIB) |
f5ab766e | 145 | |
9e4e7ad1 | 146 | test_urcu_assign_dynamic_link_SOURCES = test_urcu_assign.c common-states.c |
05a4bc03 | 147 | test_urcu_assign_dynamic_link_LDADD = $(URCU_LIB) |
f5ab766e MD |
148 | test_urcu_assign_dynamic_link_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS) |
149 | ||
9e4e7ad1 | 150 | test_urcu_bp_SOURCES = test_urcu_bp.c common-states.c |
6a3d2c22 | 151 | test_urcu_bp_LDADD = $(URCU_BP_LIB) |
f5ab766e | 152 | |
9e4e7ad1 | 153 | test_urcu_bp_dynamic_link_SOURCES = test_urcu_bp.c common-states.c |
6a3d2c22 | 154 | test_urcu_bp_dynamic_link_LDADD = $(URCU_BP_LIB) |
f5ab766e MD |
155 | test_urcu_bp_dynamic_link_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS) |
156 | ||
9e4e7ad1 | 157 | test_urcu_lfq_SOURCES = test_urcu_lfq.c common-states.c |
05a4bc03 | 158 | test_urcu_lfq_LDADD = $(URCU_LIB) $(URCU_CDS_LIB) |
f5ab766e | 159 | |
9e4e7ad1 | 160 | test_urcu_lfq_dynlink_SOURCES = test_urcu_lfq.c common-states.c |
f5ab766e | 161 | test_urcu_lfq_dynlink_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS) |
05a4bc03 | 162 | test_urcu_lfq_dynlink_LDADD = $(URCU_LIB) $(URCU_CDS_LIB) |
f5ab766e | 163 | |
9e4e7ad1 | 164 | test_urcu_wfq_SOURCES = test_urcu_wfq.c common-states.c |
f5ab766e MD |
165 | test_urcu_wfq_LDADD = $(URCU_COMMON_LIB) |
166 | ||
9e4e7ad1 | 167 | test_urcu_wfq_dynlink_SOURCES = test_urcu_wfq.c common-states.c |
f5ab766e MD |
168 | test_urcu_wfq_dynlink_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS) |
169 | test_urcu_wfq_dynlink_LDADD = $(URCU_COMMON_LIB) | |
170 | ||
9e4e7ad1 | 171 | test_urcu_wfcq_SOURCES = test_urcu_wfcq.c common-states.c |
f5ab766e MD |
172 | test_urcu_wfcq_LDADD = $(URCU_COMMON_LIB) |
173 | ||
9e4e7ad1 | 174 | test_urcu_wfcq_dynlink_SOURCES = test_urcu_wfcq.c common-states.c |
f5ab766e MD |
175 | test_urcu_wfcq_dynlink_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS) |
176 | test_urcu_wfcq_dynlink_LDADD = $(URCU_COMMON_LIB) | |
177 | ||
9e4e7ad1 | 178 | test_urcu_lfs_SOURCES = test_urcu_lfs.c common-states.c |
05a4bc03 | 179 | test_urcu_lfs_LDADD = $(URCU_LIB) $(URCU_CDS_LIB) |
f5ab766e | 180 | |
9e4e7ad1 | 181 | test_urcu_lfs_rcu_SOURCES = test_urcu_lfs_rcu.c common-states.c |
05a4bc03 | 182 | test_urcu_lfs_rcu_LDADD = $(URCU_LIB) $(URCU_CDS_LIB) |
f5ab766e | 183 | |
9e4e7ad1 | 184 | test_urcu_lfs_dynlink_SOURCES = test_urcu_lfs.c common-states.c |
f5ab766e | 185 | test_urcu_lfs_dynlink_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS) |
05a4bc03 | 186 | test_urcu_lfs_dynlink_LDADD = $(URCU_LIB) $(URCU_CDS_LIB) |
f5ab766e | 187 | |
9e4e7ad1 | 188 | test_urcu_lfs_rcu_dynlink_SOURCES = test_urcu_lfs_rcu.c common-states.c |
f5ab766e | 189 | test_urcu_lfs_rcu_dynlink_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS) |
05a4bc03 | 190 | test_urcu_lfs_rcu_dynlink_LDADD = $(URCU_LIB) $(URCU_CDS_LIB) |
f5ab766e | 191 | |
9e4e7ad1 | 192 | test_urcu_wfs_SOURCES = test_urcu_wfs.c common-states.c |
f5ab766e MD |
193 | test_urcu_wfs_LDADD = $(URCU_COMMON_LIB) |
194 | ||
9e4e7ad1 | 195 | test_urcu_wfs_dynlink_SOURCES = test_urcu_wfs.c common-states.c |
f5ab766e MD |
196 | test_urcu_wfs_dynlink_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS) |
197 | test_urcu_wfs_dynlink_LDADD = $(URCU_COMMON_LIB) | |
198 | ||
199 | test_urcu_hash_SOURCES = test_urcu_hash.c test_urcu_hash.h \ | |
9e4e7ad1 | 200 | test_urcu_hash_rw.c test_urcu_hash_unique.c common-states.c |
f5ab766e | 201 | test_urcu_hash_CFLAGS = -DRCU_QSBR $(AM_CFLAGS) |
05a1c278 | 202 | test_urcu_hash_LDADD = $(URCU_QSBR_LIB) $(URCU_COMMON_LIB) $(URCU_CDS_LIB) |
f5ab766e | 203 | |
f356e6f3 MJ |
204 | all-local: |
205 | @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ | |
de6cb9d5 | 206 | for script in $(SCRIPT_LIST); do \ |
f356e6f3 MJ |
207 | cp -f $(srcdir)/$$script $(builddir); \ |
208 | done; \ | |
209 | fi | |
210 | ||
211 | clean-local: | |
212 | @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ | |
de6cb9d5 | 213 | for script in $(SCRIPT_LIST); do \ |
f356e6f3 MJ |
214 | rm -f $(builddir)/$$script; \ |
215 | done; \ | |
216 | fi | |
217 | ||
ad460058 | 218 | .PHONY: short_bench long_bench regtest |
f5ab766e | 219 | |
03c5782e MJ |
220 | # This empty variable is required to enable the TAP test suite for custom |
221 | # targets like 'regtest' while keeping the default 'check' a noop. | |
222 | TESTS = | |
223 | ||
224 | SHORT_BENCH_TESTS = urcu_3_seconds.tap hashtable_3_seconds.tap | |
225 | LONG_BENCH_TESTS = urcu_30_seconds.tap hashtable_30_seconds.tap | |
226 | REGTEST_TESTS = urcu_1_seconds.tap hashtable_1_seconds.tap | |
227 | ||
ad460058 | 228 | short_bench: |
03c5782e | 229 | $(MAKE) $(AM_MAKEFLAGS) check TESTS="$(SHORT_BENCH_TESTS)" |
ad460058 MD |
230 | |
231 | long_bench: | |
03c5782e | 232 | $(MAKE) $(AM_MAKEFLAGS) check TESTS="$(LONG_BENCH_TESTS)" |
ad460058 MD |
233 | |
234 | regtest: | |
03c5782e | 235 | $(MAKE) $(AM_MAKEFLAGS) check TESTS="$(REGTEST_TESTS)" |