Skip to content

Commit 5447f9d

Browse files
MarcoFalkePastaPastaPasta
authored andcommitted
Merge bitcoin/bitcoin#24715: build, test: Fix test logfile name
8b517fae7eb229911a5d41bbe26fbf6cc7de46df build, refactor: Replace tabs with spaces (Hennadii Stepanov) dc0774cbdfaee5b81085596dbc686036ca9a2d51 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 8b517fae7eb229911a5d41bbe26fbf6cc7de46df Tree-SHA512: 6c6dab6d7d38b5e949f1159ddff8e431f26d7254157f8308d63383c0642154271107e384c77722b7cf77f0be204bd21d69f3a9e93a8d19cf48954ac673df6c7a
1 parent 7753645 commit 5447f9d

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
@@ -399,18 +399,18 @@ endif
399399

400400
%.cpp.test: %.cpp
401401
@echo Running tests: $$(\
402-
cat $< | \
403-
grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" | \
404-
cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1) \
405-
from $<
406-
$(AM_V_at)$(TEST_BINARY) \
407-
--catch_system_errors=no -l test_suite -t "$$(\
408-
cat $< | \
409-
grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" | \
410-
cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1\
411-
)" -- DEBUG_LOG_OUT > $(abs_builddir)/$$(\
412-
echo $< | grep -E -o "(wallet/test/.*\.cpp|test/.*\.cpp)" | $(SED) -e s/\.cpp/.log/\
413-
) 2>&1 || (cat $<.log && false)
402+
cat $< | \
403+
grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" | \
404+
cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1\
405+
) from $<
406+
$(AM_V_at)export TEST_LOGFILE=$(abs_builddir)/$$(\
407+
echo $< | grep -E -o "(wallet/test/.*\.cpp|test/.*\.cpp)" | $(SED) -e s/\.cpp/.log/ \
408+
) && \
409+
$(TEST_BINARY) --catch_system_errors=no -l test_suite -t "$$(\
410+
cat $< | \
411+
grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" | \
412+
cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1\
413+
)" -- DEBUG_LOG_OUT > "$$TEST_LOGFILE" 2>&1 || (cat "$$TEST_LOGFILE" && false)
414414

415415
test/data/%.json.h: test/data/%.json
416416
@$(MKDIR_P) $(@D)

0 commit comments

Comments
 (0)