| OLD | NEW |
| 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 syzyasan=1 win_z7=0 chromium_win_pch=0 | 20 syzyasan=1 win_z7=0 chromium_win_pch=0 |
| 21 - build the release Chrome binaries: | 21 - build the release Chrome binaries: |
| 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 | 25 python chrome/test/kasko/kasko_integration_test.py |
| 25 """ | 26 """ |
| 26 | 27 |
| 27 import logging | 28 import logging |
| 28 import os | 29 import os |
| 29 import sys | 30 import sys |
| 30 | 31 |
| 31 # Bring in the Kasko module. | 32 # Bring in the Kasko module. |
| 32 KASKO_DIR = os.path.join(os.path.dirname(__file__), 'py') | 33 KASKO_DIR = os.path.join(os.path.dirname(__file__), 'py') |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 report = server.crash(0) | 81 report = server.crash(0) |
| 81 kasko.report.LogCrashKeys(report) | 82 kasko.report.LogCrashKeys(report) |
| 82 kasko.report.ValidateCrashReport(report, | 83 kasko.report.ValidateCrashReport(report, |
| 83 {'kasko-set-crash-key-value-impl': 'SetCrashKeyValueImpl'}) | 84 {'kasko-set-crash-key-value-impl': 'SetCrashKeyValueImpl'}) |
| 84 | 85 |
| 85 return 0 | 86 return 0 |
| 86 | 87 |
| 87 | 88 |
| 88 if __name__ == '__main__': | 89 if __name__ == '__main__': |
| 89 sys.exit(Main()) | 90 sys.exit(Main()) |
| OLD | NEW |