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

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

Issue 335026: Set GTEST_DEATH_TEST_USE_FORK environment variable to make death tests valgri... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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/valgrind.sh ('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 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # valgrind_test.py 6 # valgrind_test.py
7 7
8 '''Runs an exe through Valgrind and puts the intermediate files in a 8 '''Runs an exe through Valgrind and puts the intermediate files in a
9 directory. 9 directory.
10 ''' 10 '''
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 def Execute(self): 250 def Execute(self):
251 ''' Execute the app to be tested after successful instrumentation. 251 ''' Execute the app to be tested after successful instrumentation.
252 Full execution command-line provided by subclassers via proc.''' 252 Full execution command-line provided by subclassers via proc.'''
253 logging.info("starting execution...") 253 logging.info("starting execution...")
254 254
255 proc = self.ValgrindCommand() 255 proc = self.ValgrindCommand()
256 os.putenv("G_SLICE", "always-malloc") 256 os.putenv("G_SLICE", "always-malloc")
257 logging.info("export G_SLICE=always-malloc"); 257 logging.info("export G_SLICE=always-malloc");
258 os.putenv("NSS_DISABLE_ARENA_FREE_LIST", "1") 258 os.putenv("NSS_DISABLE_ARENA_FREE_LIST", "1")
259 logging.info("export NSS_DISABLE_ARENA_FREE_LIST=1"); 259 logging.info("export NSS_DISABLE_ARENA_FREE_LIST=1");
260 os.putenv("GTEST_DEATH_TEST_USE_FORK", "1")
261 logging.info("export GTEST_DEATH_TEST_USE_FORK=1");
260 262
261 common.RunSubprocess(proc, self._timeout) 263 common.RunSubprocess(proc, self._timeout)
262 264
263 # Always return true, even if running the subprocess failed. We depend on 265 # Always return true, even if running the subprocess failed. We depend on
264 # Analyze to determine if the run was valid. (This behaviour copied from 266 # Analyze to determine if the run was valid. (This behaviour copied from
265 # the purify_test.py script.) 267 # the purify_test.py script.)
266 return True 268 return True
267 269
268 def Analyze(self): 270 def Analyze(self):
269 raise RuntimeError, "This method should be implemented " \ 271 raise RuntimeError, "This method should be implemented " \
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 466
465 if __name__ == "__main__": 467 if __name__ == "__main__":
466 if sys.argv.count("-v") > 0 or sys.argv.count("--verbose") > 0: 468 if sys.argv.count("-v") > 0 or sys.argv.count("--verbose") > 0:
467 google.logging_utils.config_root(logging.DEBUG) 469 google.logging_utils.config_root(logging.DEBUG)
468 else: 470 else:
469 google.logging_utils.config_root() 471 google.logging_utils.config_root()
470 # TODO(timurrrr): valgrind tools may use -v/--verbose as well 472 # TODO(timurrrr): valgrind tools may use -v/--verbose as well
471 473
472 ret = RunTool(sys.argv) 474 ret = RunTool(sys.argv)
473 sys.exit(ret) 475 sys.exit(ret)
OLDNEW
« no previous file with comments | « tools/valgrind/valgrind.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698