Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 320 logging.info("No real .dSYM for test_command. Line numbers will " | 320 logging.info("No real .dSYM for test_command. Line numbers will " |
| 321 "not be shown. Either tell xcode to generate .dSYM " | 321 "not be shown. Either tell xcode to generate .dSYM " |
| 322 "file, or use --generate_dsym option to this tool.") | 322 "file, or use --generate_dsym option to this tool.") |
| 323 | 323 |
| 324 def PrepareForTestWine(self): | 324 def PrepareForTestWine(self): |
| 325 """Set up the Wine environment. | 325 """Set up the Wine environment. |
| 326 | 326 |
| 327 We need to run some sanity checks, set up a Wine prefix, and make sure | 327 We need to run some sanity checks, set up a Wine prefix, and make sure |
| 328 wineserver is running by starting a dummy win32 program. | 328 wineserver is running by starting a dummy win32 program. |
| 329 """ | 329 """ |
| 330 if not os.path.exists('/usr/share/ca-certificates/root_ca_cert.crt'): | |
| 331 logging.warning('WARNING: SSL certificate missing! SSL tests will fail.') | |
| 332 logging.warning('You need to run:') | |
| 333 logging.warning('sudo cp src/net/data/ssl/certificates/root_ca_cert.crt ' | |
| 334 '/usr/share/ca-certificates/') | |
| 335 logging.warning('sudo vi /etc/ca-certificates.conf') | |
| 336 logging.warning(' (and add the line root_ca_cert.crt)') | |
| 337 logging.warning('sudo update-ca-certificates') | |
|
wtc
2010/12/08 19:58:22
IMPORTANT: I don't know what this code is for. Is
Ryan Sleevi
2010/12/09 05:49:55
Wine's way of implementing trusted root certs. Rat
| |
| 338 | |
| 339 # Shutdown the Wine server in case the last run got interrupted. | 330 # Shutdown the Wine server in case the last run got interrupted. |
| 340 common.RunSubprocess([os.environ.get('WINESERVER'), '-k']) | 331 common.RunSubprocess([os.environ.get('WINESERVER'), '-k']) |
| 341 | 332 |
| 342 # Yes, this can be dangerous if $WINEPREFIX is set incorrectly. | 333 # Yes, this can be dangerous if $WINEPREFIX is set incorrectly. |
| 343 shutil.rmtree(os.environ.get('WINEPREFIX'), ignore_errors=True) | 334 shutil.rmtree(os.environ.get('WINEPREFIX'), ignore_errors=True) |
| 344 | 335 |
| 345 winetricks = os.path.join(self._source_dir, 'tools', 'valgrind', | 336 winetricks = os.path.join(self._source_dir, 'tools', 'valgrind', |
| 346 'wine_memcheck', 'winetricks') | 337 'wine_memcheck', 'winetricks') |
| 347 common.RunSubprocess(['sh', winetricks, | 338 common.RunSubprocess(['sh', winetricks, |
| 348 'nocrashdialog', 'corefonts', 'gecko']) | 339 'nocrashdialog', 'corefonts', 'gecko']) |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 920 platform_name = sys.platform + "(Unknown)" | 911 platform_name = sys.platform + "(Unknown)" |
| 921 raise RuntimeError, "Unknown tool (tool=%s, platform=%s)" % (tool_name, | 912 raise RuntimeError, "Unknown tool (tool=%s, platform=%s)" % (tool_name, |
| 922 platform_name) | 913 platform_name) |
| 923 | 914 |
| 924 def CreateTool(tool): | 915 def CreateTool(tool): |
| 925 return ToolFactory().Create(tool) | 916 return ToolFactory().Create(tool) |
| 926 | 917 |
| 927 if __name__ == '__main__': | 918 if __name__ == '__main__': |
| 928 logging.error(sys.argv[0] + " can not be run from command line") | 919 logging.error(sys.argv[0] + " can not be run from command line") |
| 929 sys.exit(1) | 920 sys.exit(1) |
| OLD | NEW |