aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile.test.include
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2022-03-25 13:30:19 +0100
committerMarcoFalke <falke.marco@gmail.com>2022-03-25 13:30:26 +0100
commitd2615312c1292a0088f162bba1abbeb5f4068b2f (patch)
treec90b096a5ee23babeedf95f2e5b4baea249215a2 /src/Makefile.test.include
parentc9b5790e8da8a88d9022dd9725a1f7bb4474cbf7 (diff)
parentf8cba0d9117fe9b9ac51d7044372b28270c7838b (diff)
downloadbitcoin-d2615312c1292a0088f162bba1abbeb5f4068b2f.tar.xz
Merge bitcoin/bitcoin#19385: test: Change default test logging directory
f8cba0d9117fe9b9ac51d7044372b28270c7838b test: Change default test logging directory (Yancy Ribbens) Pull request description: This PR changes the default test log location request here: https://github.com/bitcoin/bitcoin/issues/17224. Instead of using the location of the makefile [automatic variable](https://www.gnu.org/software/make/manual/make.html#Automatic-Variables) `$<` I extract just the basename and then prepend a new location `./test`. This is done because `$<` represents the variable name AND location of the prerequisite here. Top commit has no ACKs. Tree-SHA512: f0fbc530cf0e14c284b4bbf6671c145b1d7a2e1f5561f5c5d09f0cbe88b98e620e763bbbf2dfa9aeeec3dcc9b0127939e105e14c7e4f6660c7c19663622a393d
Diffstat (limited to 'src/Makefile.test.include')
-rw-r--r--src/Makefile.test.include15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index a7505b9bcf..56d8842d17 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -385,8 +385,19 @@ univalue_test_object_LDFLAGS = -static $(LIBTOOL_APP_LDFLAGS)
endif
%.cpp.test: %.cpp
- @echo Running tests: `cat $< | grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" | cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1` from $<
- $(AM_V_at)$(TEST_BINARY) --catch_system_errors=no -l test_suite -t "`cat $< | grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" | cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1`" -- DEBUG_LOG_OUT > $<.log 2>&1 || (cat $<.log && false)
+ @echo Running tests: $$(\
+ cat $< | \
+ grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" | \
+ cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1) \
+ from $<
+ $(AM_V_at)$(TEST_BINARY) \
+ --catch_system_errors=no -l test_suite -t "$$(\
+ cat $< | \
+ grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" | \
+ cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1\
+ )" -- DEBUG_LOG_OUT > $(abs_builddir)/$$(\
+ echo $< | grep -E -o "(wallet/test/.*\.cpp|test/.*\.cpp)" | $(SED) -e s/\.cpp/.log/\
+ ) 2>&1 || (cat $<.log && false)
%.json.h: %.json
@$(MKDIR_P) $(@D)