diff options
-rwxr-xr-x | tools/valgrind/chrome_tests.py | 9 | ||||
-rwxr-xr-x | tools/valgrind/valgrind_test.py | 24 |
2 files changed, 22 insertions, 11 deletions
diff --git a/tools/valgrind/chrome_tests.py b/tools/valgrind/chrome_tests.py index de1dda4..8675c34 100755 --- a/tools/valgrind/chrome_tests.py +++ b/tools/valgrind/chrome_tests.py @@ -146,6 +146,8 @@ class ChromeTests: cmd.append("--show_all_leaks") if self._options.track_origins: cmd.append("--track_origins") + if self._options.generate_dsym: + cmd.append("--generate_dsym") if self._options.generate_suppressions: cmd.append("--generate_suppressions") if self._options.custom_valgrind_command: @@ -365,8 +367,9 @@ def _main(_): parser.add_option("", "--track_origins", action="store_true", default=False, help="Show whence uninit bytes came. 30% slower.") - parser.add_option("", "--no-reinstrument", action="store_true", default=False, - help="Don't force a re-instrumentation for ui_tests") + parser.add_option("", "--generate_dsym", action="store_true", + default=False, + help="Generate .dSYM file on Mac if needed. Slow!") parser.add_option("", "--generate_suppressions", action="store_true", default=False, help="Skip analysis and generate suppressions") @@ -377,7 +380,7 @@ def _main(_): # The CPU is mostly idle, so perhaps we can raise this when # we figure out how to run them more efficiently. parser.add_option("-n", "--num_tests", default=60, type="int", - help="for layout tests: number of subtests per run. 0 for all.") + help="for layout tests: # of subtests per run. 0 for all.") options, args = parser.parse_args() diff --git a/tools/valgrind/valgrind_test.py b/tools/valgrind/valgrind_test.py index 3c03dc4..e7a4e39 100755 --- a/tools/valgrind/valgrind_test.py +++ b/tools/valgrind/valgrind_test.py @@ -73,6 +73,9 @@ class Valgrind(object): self._parser.add_option("", "--track_origins", action="store_true", default=False, help="Show whence uninit bytes came. 30% slower.") + self._parser.add_option("", "--generate_dsym", action="store_true", + default=False, + help="Generate .dSYM file on Mac if needed. Slow!") self._parser.add_option("", "--generate_suppressions", action="store_true", default=False, help="Skip analysis and generate suppressions") @@ -300,17 +303,22 @@ class ValgrindMac(ValgrindLinux): shutil.copyfile(dsym_file, test_command) if needs_dsymutil: - # Remove the .dSYM bundle if it exists. - shutil.rmtree(dsym_bundle, True) + if self._options.generate_dsym: + # Remove the .dSYM bundle if it exists. + shutil.rmtree(dsym_bundle, True) - dsymutil_command = ['dsymutil', test_command] + dsymutil_command = ['dsymutil', test_command] - # dsymutil is crazy slow. Let it run for up to a half hour. I hope - # that's enough. - common.RunSubprocess(dsymutil_command, 30 * 60) + # dsymutil is crazy slow. Let it run for up to a half hour. I hope + # that's enough. + common.RunSubprocess(dsymutil_command, 30 * 60) - if saved_test_command: - os.rename(saved_test_command, test_command) + if saved_test_command: + os.rename(saved_test_command, test_command) + else: + logging.info("No real .dSYM for test_command. Line numbers will " + "not be shown. Either tell xcode to generate .dSYM " + "file, or use --generate_dsym option to this tool.") if __name__ == "__main__": if sys.platform == 'darwin': # Mac |