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

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

Issue 155305: Make sure we end up with an executable binary when juggling stripped binaries... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 # purify_test.py 6 # purify_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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 needs_dsymutil = False 301 needs_dsymutil = False
302 else: 302 else:
303 # fake_dsym is set. dsym_file is a copy of the original test_command 303 # fake_dsym is set. dsym_file is a copy of the original test_command
304 # before it was stripped. Copy it back to test_command so that 304 # before it was stripped. Copy it back to test_command so that
305 # dsymutil has unstripped input to work with. Move the stripped 305 # dsymutil has unstripped input to work with. Move the stripped
306 # test_command out of the way, it will be restored when this is 306 # test_command out of the way, it will be restored when this is
307 # done. 307 # done.
308 saved_test_command = test_command + '.stripped' 308 saved_test_command = test_command + '.stripped'
309 os.rename(test_command, saved_test_command) 309 os.rename(test_command, saved_test_command)
310 shutil.copyfile(dsym_file, test_command) 310 shutil.copyfile(dsym_file, test_command)
311 shutil.copymode(saved_test_command, test_command)
311 312
312 if needs_dsymutil: 313 if needs_dsymutil:
313 if self._options.generate_dsym: 314 if self._options.generate_dsym:
314 # Remove the .dSYM bundle if it exists. 315 # Remove the .dSYM bundle if it exists.
315 shutil.rmtree(dsym_bundle, True) 316 shutil.rmtree(dsym_bundle, True)
316 317
317 dsymutil_command = ['dsymutil', test_command] 318 dsymutil_command = ['dsymutil', test_command]
318 319
319 # dsymutil is crazy slow. Let it run for up to a half hour. I hope 320 # dsymutil is crazy slow. Let it run for up to a half hour. I hope
320 # that's enough. 321 # that's enough.
(...skipping 11 matching lines...) Expand all
332 valgrind = ValgrindMac() 333 valgrind = ValgrindMac()
333 retcode = valgrind.Main() 334 retcode = valgrind.Main()
334 sys.exit(retcode) 335 sys.exit(retcode)
335 elif sys.platform == 'linux2': # Linux 336 elif sys.platform == 'linux2': # Linux
336 valgrind = ValgrindLinux() 337 valgrind = ValgrindLinux()
337 retcode = valgrind.Main() 338 retcode = valgrind.Main()
338 sys.exit(retcode) 339 sys.exit(retcode)
339 else: 340 else:
340 logging.error("Unknown platform: %s" % sys.platform) 341 logging.error("Unknown platform: %s" % sys.platform)
341 sys.exit(1) 342 sys.exit(1)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698