Skip to content

Commit d2b4355

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#24715: build, test: Fix test logfile name
8b517fa build, refactor: Replace tabs with spaces (Hennadii Stepanov) dc0774c build, test: Fix test logfile name (Hennadii Stepanov) Pull request description: Recently merged bitcoin/bitcoin#19385 was flawed as it tries to `cat` a non-existed logfile: - bitcoin/bitcoin#19385 (comment) - bitcoin/bitcoin#19385 (comment) Closes bitcoin/bitcoin#17224. ACKs for top commit: luke-jr: utACK 8b517fa Tree-SHA512: 6c6dab6d7d38b5e949f1159ddff8e431f26d7254157f8308d63383c0642154271107e384c77722b7cf77f0be204bd21d69f3a9e93a8d19cf48954ac673df6c7a
2 parents 87dc1dc + 8b517fa commit d2b4355

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/Makefile.test.include

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -386,18 +386,18 @@ endif
386386

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

402402
%.json.h: %.json
403403
@$(MKDIR_P) $(@D)

0 commit comments

Comments
 (0)