Skip to content

Commit d261531

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#19385: test: Change default test logging directory
f8cba0d test: Change default test logging directory (Yancy Ribbens) Pull request description: This PR changes the default test log location request here: bitcoin/bitcoin#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
2 parents c9b5790 + f8cba0d commit d261531

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/Makefile.test.include

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,19 @@ univalue_test_object_LDFLAGS = -static $(LIBTOOL_APP_LDFLAGS)
385385
endif
386386

387387
%.cpp.test: %.cpp
388-
@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 $<
389-
$(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)
388+
@echo Running tests: $$(\
389+
cat $< | \
390+
grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" | \
391+
cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1) \
392+
from $<
393+
$(AM_V_at)$(TEST_BINARY) \
394+
--catch_system_errors=no -l test_suite -t "$$(\
395+
cat $< | \
396+
grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" | \
397+
cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1\
398+
)" -- DEBUG_LOG_OUT > $(abs_builddir)/$$(\
399+
echo $< | grep -E -o "(wallet/test/.*\.cpp|test/.*\.cpp)" | $(SED) -e s/\.cpp/.log/\
400+
) 2>&1 || (cat $<.log && false)
390401

391402
%.json.h: %.json
392403
@$(MKDIR_P) $(@D)

0 commit comments

Comments
 (0)