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

Side by Side Diff: chrome/test/kasko/hang_watcher_integration_test.py

Issue 1685233002: Fix the Kasko GN build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « chrome/chrome_watcher/BUILD.gn ('k') | components/crash/content/app/BUILD.gn » ('j') | 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/env python 1 #!/usr/bin/env python
2 # Copyright 2016 The Chromium Authors. All rights reserved. 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 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 """A Windows-only end-to-end integration test for the Chrome hang watcher. 6 """A Windows-only end-to-end integration test for the Chrome hang watcher.
7 7
8 This test ensures that the hang watcher is able to detect when Chrome hangs and 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 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. 10 test crash server. If a crash report is received then all is well.
11 11
12 Note that this test only works against non-component Release and Official builds 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 13 of Chrome with Chrome branding, and attempting to use it with anything else will
14 most likely lead to constant failures. 14 most likely lead to constant failures.
15 15
16 Typical usage (assuming in root 'src' directory): 16 Typical usage (assuming in root 'src' directory):
17 17 - generate project files with the following build variables:
18 - generate project files with the following GYP variables: 18 GYP variables:
19 branding=Chrome kasko=1 kasko_hang_reports=1 19 branding=Chrome kasko=1 kasko_hang_reports=1
20 GN variables:
21 target_cpu = "x86"
22 is_debug = false
23 is_chrome_branded = true
24 enable_kasko = true
25 enable_kasko_hang_reports = true
20 - build the release Chrome binaries: 26 - build the release Chrome binaries:
21 ninja -C out\Release chrome.exe chromedriver.exe 27 ninja -C {build_dir} chrome.exe chromedriver.exe
22 - run the test: 28 - run the test:
23 python chrome/test/kasko/hang_watcher_integration_test.py 29 python chrome/test/kasko/hang_watcher_integration_test.py
30 --chrome={build_dir}\chrome.exe
24 """ 31 """
25 32
26 import logging 33 import logging
27 import os 34 import os
28 import sys 35 import sys
29 36
30 # Bring in the Kasko module. 37 # Bring in the Kasko module.
31 KASKO_DIR = os.path.join(os.path.dirname(__file__), 'py') 38 KASKO_DIR = os.path.join(os.path.dirname(__file__), 'py')
32 sys.path.append(KASKO_DIR) 39 sys.path.append(KASKO_DIR)
33 import kasko 40 import kasko
(...skipping 10 matching lines...) Expand all
44 120, 51 120,
45 {'hung-process': 'DumpHungBrowserProcess()'}) 52 {'hung-process': 'DumpHungBrowserProcess()'})
46 53
47 _LOGGER.info('Test passed successfully!') 54 _LOGGER.info('Test passed successfully!')
48 55
49 return 0 56 return 0
50 57
51 58
52 if __name__ == '__main__': 59 if __name__ == '__main__':
53 sys.exit(Main()) 60 sys.exit(Main())
OLDNEW
« no previous file with comments | « chrome/chrome_watcher/BUILD.gn ('k') | components/crash/content/app/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698