Skip to content

Commit 156db42

Browse files
committed
tests: run tests in parallel
1 parent 66f3255 commit 156db42

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Makefile.test.include

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Distributed under the MIT software license, see the accompanying
33
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
TESTS += test/test_bitcoin
65
bin_PROGRAMS += test/test_bitcoin
76
noinst_PROGRAMS += test/test_bitcoin_fuzzy
87
TEST_SRCDIR = test
@@ -154,14 +153,18 @@ bitcoin_test_check: $(TEST_BINARY) FORCE
154153
bitcoin_test_clean : FORCE
155154
rm -f $(CLEAN_BITCOIN_TEST) $(test_test_bitcoin_OBJECTS) $(TEST_BINARY)
156155

157-
check-local:
156+
check-local: $(BITCOIN_TESTS:.cpp=.cpp.test)
158157
@echo "Running test/util/bitcoin-util-test.py..."
159158
$(PYTHON) $(top_builddir)/test/util/bitcoin-util-test.py
160159
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check
161160
if EMBEDDED_UNIVALUE
162161
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C univalue check
163162
endif
164163

164+
%.cpp.test: %.cpp
165+
@echo Running tests: `cat $< | grep "BOOST_FIXTURE_TEST_SUITE(\|BOOST_AUTO_TEST_SUITE(" | cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1` from $<
166+
$(AM_V_at)$(TEST_BINARY) -l test_suite -t "`cat $< | grep "BOOST_FIXTURE_TEST_SUITE(\|BOOST_AUTO_TEST_SUITE(" | cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1`" > $<.log 2>&1 || (cat $<.log && false)
167+
165168
%.json.h: %.json
166169
@$(MKDIR_P) $(@D)
167170
@{ \

0 commit comments

Comments
 (0)