Index: tools/valgrind/tsan_analyze.py |
=================================================================== |
--- tools/valgrind/tsan_analyze.py (revision 109598) |
+++ tools/valgrind/tsan_analyze.py (working copy) |
@@ -121,6 +121,9 @@ |
self.ReadLine() |
supp += self.line_ |
self.ReadLine() |
+ if self._cur_testcase: |
+ result.append("The report came from the `%s` test.\n" % \ |
+ self._cur_testcase) |
result.append("Suppression (error hash=#%016X#):\n" % \ |
(int(hashlib.md5(supp).hexdigest()[:16], 16))) |
result.append(" For more info on using suppressions see " |
@@ -213,7 +216,7 @@ |
reports = map(lambda(x): map(str, x), reports) |
return [''.join(report_lines) for report_lines in reports] |
- def Report(self, files, check_sanity=False): |
+ def Report(self, files, testcase, check_sanity=False): |
'''Reads in a set of files and prints ThreadSanitizer report. |
Args: |
@@ -221,7 +224,9 @@ |
check_sanity: if true, search for SANITY_TEST_SUPPRESSIONS |
''' |
+ self._cur_testcase = testcase |
reports = self.GetReports(files) |
+ self._cur_testcase = None |
Alexander Potapenko
2011/11/11 09:41:31
Please add a comment describing why you need to re
|
is_sane = False |
print "-----------------------------------------------------" |
@@ -265,6 +270,6 @@ |
filenames = args |
analyzer = TsanAnalyzer(options.source_dir, use_gdb=True) |
- retcode = analyzer.Report(filenames) |
+ retcode = analyzer.Report(filenames, None) |
sys.exit(retcode) |