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

Side by Side Diff: tools/valgrind/valgrind_test.py

Issue 8872016: Fix tsan_rv as it was broken due to recent "testcase" failures (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/valgrind/tsan_analyze.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Runs an exe through Valgrind and puts the intermediate files in a 5 """Runs an exe through Valgrind and puts the intermediate files in a
6 directory. 6 directory.
7 """ 7 """
8 8
9 import datetime 9 import datetime
10 import glob 10 import glob
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 class ThreadSanitizerRV1Analyzer(tsan_analyze.TsanAnalyzer): 959 class ThreadSanitizerRV1Analyzer(tsan_analyze.TsanAnalyzer):
960 """ TsanAnalyzer that saves race reports to a file. """ 960 """ TsanAnalyzer that saves race reports to a file. """
961 961
962 TMP_FILE = "rvlog.tmp" 962 TMP_FILE = "rvlog.tmp"
963 963
964 def __init__(self, source_dir, use_gdb): 964 def __init__(self, source_dir, use_gdb):
965 super(ThreadSanitizerRV1Analyzer, self).__init__(source_dir, use_gdb) 965 super(ThreadSanitizerRV1Analyzer, self).__init__(source_dir, use_gdb)
966 self.out = open(self.TMP_FILE, "w") 966 self.out = open(self.TMP_FILE, "w")
967 967
968 def Report(self, files, testcase, check_sanity=False): 968 def Report(self, files, testcase, check_sanity=False):
969 # TODO(timurrrr): handle testcase?
970 reports = self.GetReports(files) 969 reports = self.GetReports(files)
971 for report in reports: 970 for report in reports:
972 print >>self.out, report 971 print >>self.out, report
973 if len(reports) > 0: 972 if len(reports) > 0:
974 logging.info("RaceVerifier pass 1 of 2, found %i reports" % len(reports)) 973 logging.info("RaceVerifier pass 1 of 2, found %i reports" % len(reports))
975 return -1 974 return -1
976 return 0 975 return 0
977 976
978 def CloseOutputFile(self): 977 def CloseOutputFile(self):
979 self.out.close() 978 self.out.close()
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1198 return Asan() 1197 return Asan()
1199 try: 1198 try:
1200 platform_name = common.PlatformNames()[0] 1199 platform_name = common.PlatformNames()[0]
1201 except common.NotImplementedError: 1200 except common.NotImplementedError:
1202 platform_name = sys.platform + "(Unknown)" 1201 platform_name = sys.platform + "(Unknown)"
1203 raise RuntimeError, "Unknown tool (tool=%s, platform=%s)" % (tool_name, 1202 raise RuntimeError, "Unknown tool (tool=%s, platform=%s)" % (tool_name,
1204 platform_name) 1203 platform_name)
1205 1204
1206 def CreateTool(tool): 1205 def CreateTool(tool):
1207 return ToolFactory().Create(tool) 1206 return ToolFactory().Create(tool)
OLDNEW
« no previous file with comments | « tools/valgrind/tsan_analyze.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698