diff options
author | fanquake <fanquake@gmail.com> | 2022-03-24 11:55:59 +0000 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2022-03-24 11:56:14 +0000 |
commit | 26d98d51f2cfc902df35f855590c052e16a5ce12 (patch) | |
tree | b000dc3ed65cc25c58ec291156951abfc70a3e1b | |
parent | 864fb89b2f8b529121a0d39b6fbc0242d19fd506 (diff) | |
parent | fa76d8d4d71d844e217686881d4f630eac3a8e10 (diff) | |
download | bitcoin-26d98d51f2cfc902df35f855590c052e16a5ce12.tar.xz |
Merge bitcoin/bitcoin#24574: test: Actually print TSan tracebacks
fa76d8d4d71d844e217686881d4f630eac3a8e10 test: Actually print TSan tracebacks (MarcoFalke)
Pull request description:
Commit 5e5138a721738f47053d915e4c65f925838ad5b4 made the TSan logs to be printed before returning an error from the ci script.
However, it seems that on Cirrus CI, the `--failfast` option will kill not only all python process and bitcoind child process, but also the parent CI bash script, rendering the `trap` inefficient. I believe this bug was introduced in commit 451b96f7d2796d00eabaec56d831f9e9b1a569cc.
ACKs for top commit:
fanquake:
utACK fa76d8d4d71d844e217686881d4f630eac3a8e10
Tree-SHA512: 686f889d38a343882cb62ad6e0c2080196330e7cc7086891a7ff66d9443b455c82ba8d7e4a5cc42daa0513b0ad2743055bfe90e2f6ac88a910ee3b663fabddcd
-rw-r--r-- | .cirrus.yml | 1 | ||||
-rwxr-xr-x | test/functional/test_runner.py | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/.cirrus.yml b/.cirrus.yml index e07ff9796e..e0ab1536a0 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -2,6 +2,7 @@ env: # Global defaults PACKAGE_MANAGER_INSTALL: "apt-get update && apt-get install -y" MAKEJOBS: "-j10" TEST_RUNNER_PORT_MIN: "14000" # Must be larger than 12321, which is used for the http cache. See https://cirrus-ci.org/guide/writing-tasks/#http-cache + CI_FAILFAST_TEST_LEAVE_DANGLING: "1" # Cirrus CI does not care about dangling process and setting this variable avoids killing the CI script itself on error CCACHE_SIZE: "200M" CCACHE_DIR: "/tmp/ccache_dir" CCACHE_NOHASHDIR: "1" # Debug info might contain a stale path if the build dir changes, but this is fine diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index dd4a612c9e..306c8e7ff0 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -586,11 +586,12 @@ def run_tests(*, test_list, src_dir, build_dir, tmpdir, jobs=1, enable_coverage= # Clean up dangling processes if any. This may only happen with --failfast option. # Killing the process group will also terminate the current process but that is # not an issue - if len(job_queue.jobs): + if not os.getenv("CI_FAILFAST_TEST_LEAVE_DANGLING") and len(job_queue.jobs): os.killpg(os.getpgid(0), signal.SIGKILL) sys.exit(not all_passed) + def print_results(test_results, max_len_name, runtime): results = "\n" + BOLD[1] + "%s | %s | %s\n\n" % ("TEST".ljust(max_len_name), "STATUS ", "DURATION") + BOLD[0] |