diff options
author | pooryorick <com.digitalsmarties@pooryorick.com> | 2023-03-22 20:26:05 (GMT) |
---|---|---|
committer | pooryorick <com.digitalsmarties@pooryorick.com> | 2023-03-22 20:26:05 (GMT) |
commit | 9d432523a6f04ed087547fa81ea1c502314bcd37 (patch) | |
tree | c907b88451436ca4d6765f5d7f8895424fde1703 /unix | |
parent | 7f3849495af70609d977a45ab829c6bc9291b965 (diff) | |
download | tcl-9d432523a6f04ed087547fa81ea1c502314bcd37.zip tcl-9d432523a6f04ed087547fa81ea1c502314bcd37.tar.gz tcl-9d432523a6f04ed087547fa81ea1c502314bcd37.tar.bz2 |
Merge core-8-branch 3082cb9e80: Make valgrind_foreach target in Makefile.in
properly handle interrupted tests.
Diffstat (limited to 'unix')
-rw-r--r-- | unix/Makefile.in | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in index 93c3abd..1bf5814 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -956,6 +956,27 @@ valgrind: ${TCL_EXE} ${TCLTEST_EXE} $(TOP_DIR)/tests/all.tcl -singleproc 1 -constraints valgrind \ $(TESTFLAGS) +testresults/valgrind/%.result: ${TCL_EXE} ${TCLTEST_EXE} + @mkdir -p testresults/valgrind + $(SHELL_ENV) $(VALGRIND) $(VALGRINDARGS) ./${TCLTEST_EXE} \ + $(TOP_DIR)/tests/all.tcl -singleproc 1 -constraints valgrind \ + -file $(basename $(notdir $@)) > $@.tmp 2>&1 + @mv $@.tmp $@ +.PRECIOUS: testresults/valgrind/%.result + + +testresults/valgrind/%.success: testresults/valgrind/%.result + @printf '%s' valgrind >&2 + @printf ' %s' $(basename $(notdir $@)) >&2 + @printf '\n >&2' + @status=$$(./${TCLTEST_EXE} $(TOP_DIR)/tools/valgrind_check_success \ + file $(basename $@).result); \ + if [ "$$status" -eq 1 ]; then touch $@; exit 0; else exit 1; fi + +valgrind_each: $(addprefix testresults/valgrind/,$(addsuffix .success,$(notdir\ + $(wildcard $(TOP_DIR)/tests/*.test)))) + + valgrindshell: ${TCL_EXE} $(SHELL_ENV) $(VALGRIND) $(VALGRINDARGS) ./${TCL_EXE} $(SCRIPT) |