Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Unified Diff: tools/testrunner/local/execution.py

Issue 2414093003: [tools] Fix merging sancov files from multiple test attempts (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/sanitizers/sancov_merger_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testrunner/local/execution.py
diff --git a/tools/testrunner/local/execution.py b/tools/testrunner/local/execution.py
index f3d11a8b5cf3775a7afc09e8fa029cd900200465..4cb9e45a035ec2192c8b7caa1c71e2e34f9f2d2e 100644
--- a/tools/testrunner/local/execution.py
+++ b/tools/testrunner/local/execution.py
@@ -149,8 +149,9 @@ class TestJob(Job):
Rename files with PIDs to files with unique test IDs, because the number
of tests might be higher than pid_max. E.g.:
- d8.1234.sancov -> d8.test.1.sancov, where 1234 was the process' PID
- and 1 is the test ID.
+ d8.1234.sancov -> d8.test.42.1.sancov, where 1234 was the process' PID,
+ 42 is the test ID and 1 is the attempt (the same test might be rerun on
+ failures).
"""
if context.sancov_dir and output.pid is not None:
sancov_file = os.path.join(
@@ -160,7 +161,10 @@ class TestJob(Job):
if os.path.exists(sancov_file):
parts = sancov_file.split(".")
new_sancov_file = ".".join(
- parts[:-2] + ["test", str(self.test.id)] + parts[-1:])
+ parts[:-2] +
+ ["test", str(self.test.id), str(self.test.run)] +
+ parts[-1:]
+ )
assert not os.path.exists(new_sancov_file)
os.rename(sancov_file, new_sancov_file)
« no previous file with comments | « tools/sanitizers/sancov_merger_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698