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

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: Rebasing Created 4 years, 11 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
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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 for expected_key, error in expected_keys.iteritems(): 557 for expected_key, error in expected_keys.iteritems():
557 if expected_key not in report: 558 if expected_key not in report:
558 _LOGGER.error('Missing expected "%s" crash key.', expected_key) 559 _LOGGER.error('Missing expected "%s" crash key.', expected_key)
559 raise Exception('"%s" integration appears broken.' % error) 560 raise Exception('"%s" integration appears broken.' % error)
560 561
561 return 0 562 return 0
562 563
563 564
564 if __name__ == '__main__': 565 if __name__ == '__main__':
565 sys.exit(Main()) 566 sys.exit(Main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698