| OLD | NEW |
| (Empty) | |
| 1 #!/usr/bin/env python |
| 2 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. |
| 5 |
| 6 """A Windows-only end-to-end integration test for the Chrome hang watcher. |
| 7 |
| 8 This test ensures that the hang watcher is able to detect when Chrome hangs and |
| 9 to generate a Kasko report. The report is then delivered to a locally hosted |
| 10 test crash server. If a crash report is received then all is well. |
| 11 |
| 12 Note that this test only works against non-component Release and Official builds |
| 13 of Chrome with Chrome branding, and attempting to use it with anything else will |
| 14 most likely lead to constant failures. |
| 15 |
| 16 Typical usage (assuming in root 'src' directory): |
| 17 |
| 18 - generate project files with the following GYP variables: |
| 19 branding=Chrome kasko=1 kasko_hang_reports=1 |
| 20 - build the release Chrome binaries: |
| 21 ninja -C out\Release chrome.exe chromedriver.exe |
| 22 - run the test: |
| 23 python chrome/test/kasko/hang_watcher_integration_test.py |
| 24 """ |
| 25 |
| 26 import logging |
| 27 import os |
| 28 import sys |
| 29 |
| 30 # Bring in the Kasko module. |
| 31 KASKO_DIR = os.path.join(os.path.dirname(__file__), 'py') |
| 32 sys.path.append(KASKO_DIR) |
| 33 import kasko |
| 34 |
| 35 |
| 36 _LOGGER = logging.getLogger(os.path.basename(__file__)) |
| 37 |
| 38 |
| 39 def Main(): |
| 40 options = kasko.config.ParseCommandLine() |
| 41 |
| 42 kasko.integration_test.RunTest(options, |
| 43 'chrome://delayeduithreadhang', |
| 44 120, |
| 45 None) |
| 46 |
| 47 _LOGGER.info('Test passed successfully!') |
| 48 |
| 49 return 0 |
| 50 |
| 51 |
| 52 if __name__ == '__main__': |
| 53 sys.exit(Main()) |
| OLD | NEW |