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

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

Issue 1543803005: Added an integration test for kasko hang reports (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 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 Kasko, Chrome and Crashpad. 6 """A Windows-only end-to-end integration test for Kasko, Chrome and Crashpad.
7 7
8 This test ensures that the interface between Kasko and Chrome and Crashpad works 8 This test ensures that the interface between Kasko and Chrome and Crashpad works
9 as expected. The test causes Kasko to set certain crash keys and invoke a crash 9 as expected. The test causes Kasko to set certain crash keys and invoke a crash
10 report, which is in turn delivered to a locally hosted test crash server. If the 10 report, which is in turn delivered to a locally hosted test crash server. If the
11 crash report is received intact with the expected crash keys then all is well. 11 crash report is received intact with the expected crash keys then all is well.
12 12
13 Note that this test only works against non-component Release and Official builds 13 Note that this test only works against non-component Release and Official builds
14 of Chrome with Chrome branding, and attempting to use it with anything else will 14 of Chrome with Chrome branding, and attempting to use it with anything else will
15 most likely lead to constant failures. 15 most likely lead to constant failures.
16 16
17 Typical usage (assuming in root 'src' directory): 17 Typical usage (assuming in root 'src' directory):
18 18
19 - generate project files with the following GYP variables: 19 - generate project files with the following GYP variables:
20 branding=Chrome syzyasan=1 win_z7=0 chromium_win_pch=0 20 branding=Chrome syzyasan=1 win_z7=0 chromium_win_pch=0
21 - build the release Chrome binaries: 21 - build the release Chrome binaries and driver:
22 ninja -C out\Release chrome.exe 22 ninja -C out\Release chrome.exe
23 ninja -C out\Release chromedriver.exe
23 - run the test: 24 - run the test:
24 python chrome/test/kasko/kasko_integration_test.py --chrome-dir=out/Release 25 python chrome/test/kasko/kasko_integration_test.py
25 26
26 Many of the components in this test could be reused in other end-to-end crash 27 Many of the components in this test could be reused in other end-to-end crash
27 testing. Feel free to open them up for reuse, but please CC chrisha@chromium.org 28 testing. Feel free to open them up for reuse, but please CC chrisha@chromium.org
28 on any associated reviews or bugs! 29 on any associated reviews or bugs!
29 """ 30 """
30 31
31 import BaseHTTPServer 32 import BaseHTTPServer
32 import cgi 33 import cgi
33 import logging 34 import logging
34 import os 35 import os
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 kasko_key = 'kasko-set-crash-key-value-impl' 553 kasko_key = 'kasko-set-crash-key-value-impl'
553 if kasko_key not in report: 554 if kasko_key not in report:
554 _LOGGER.error('Missing expected "%s" crash key.', kasko_key) 555 _LOGGER.error('Missing expected "%s" crash key.', kasko_key)
555 raise Exception('SendCrashKeyValueImpl integration appears broken.') 556 raise Exception('SendCrashKeyValueImpl integration appears broken.')
556 557
557 return 0 558 return 0
558 559
559 560
560 if __name__ == '__main__': 561 if __name__ == '__main__':
561 sys.exit(Main()) 562 sys.exit(Main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698