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

Unified Diff: tools/valgrind/valgrind_test.py

Issue 8816017: Fix rare logdir races by adding "_logdirfilecount" to the 'PID' when generating a unique logdir path (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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/valgrind/browser_wrapper_win.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/valgrind/valgrind_test.py
===================================================================
--- tools/valgrind/valgrind_test.py (revision 113180)
+++ tools/valgrind/valgrind_test.py (working copy)
@@ -921,28 +921,29 @@
else:
testcases = glob.glob(self.log_dir + "/testcase.*.logs")
# If we have browser wrapper, the per-test logdirs are named as
- # "testcase.wrapper_PID".
- # Let's extract the list of wrapper_PIDs and name it ppids
- ppids = set([int(f.split(".")[-2]) for f in testcases])
+ # "testcase.wrapper_PID.name".
+ # Let's extract the list of wrapper_PIDs and name it ppids.
+ # NOTE: ppids may contain '_', i.e. they are not ints!
+ ppids = set([f.split(".")[-2] for f in testcases])
for ppid in ppids:
testcase_name = None
try:
- f = open(self.log_dir + ("/testcase.%d.name" % ppid))
+ f = open("%s/testcase.%s.name" % (self.log_dir, ppid))
testcase_name = f.read().strip()
f.close()
except IOError:
pass
print "====================================================="
- print " Below is the report for drmemory wrapper PID=%d." % ppid
+ print " Below is the report for drmemory wrapper PID=%s." % ppid
if testcase_name:
print " It was used while running the `%s` test." % testcase_name
else:
# TODO(timurrrr): hm, the PID line is suppressed on Windows...
print " You can find the corresponding test"
- print " by searching the above log for 'PID=%d'" % ppid
+ print " by searching the above log for 'PID=%s'" % ppid
sys.stdout.flush()
- ppid_filenames = glob.glob("%s/testcase.%d.logs/*/results.txt" %
+ ppid_filenames = glob.glob("%s/testcase.%s.logs/*/results.txt" %
(self.log_dir, ppid))
ret |= analyzer.Report(ppid_filenames, testcase_name, False)
print "====================================================="
« no previous file with comments | « tools/valgrind/browser_wrapper_win.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698