OLD | NEW |
1 #!/bin/env python | 1 #!/bin/env python |
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 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 | 6 |
7 """Module to setup and generate code coverage data | 7 """Module to setup and generate code coverage data |
8 | 8 |
9 This module first sets up the environment for code coverage, instruments the | 9 This module first sets up the environment for code coverage, instruments the |
10 binaries, runs the tests and collects the code coverage data. | 10 binaries, runs the tests and collects the code coverage data. |
(...skipping 18 matching lines...) Expand all Loading... |
29 import google.process_utils as proc | 29 import google.process_utils as proc |
30 | 30 |
31 | 31 |
32 # The list of binaries that will be instrumented for code coverage | 32 # The list of binaries that will be instrumented for code coverage |
33 # TODO(niranjan): Re-enable instrumentation of chrome.exe and chrome.dll once we | 33 # TODO(niranjan): Re-enable instrumentation of chrome.exe and chrome.dll once we |
34 # resolve the issue where vsinstr.exe is confused while reading symbols. | 34 # resolve the issue where vsinstr.exe is confused while reading symbols. |
35 windows_binaries = [#'chrome.exe', | 35 windows_binaries = [#'chrome.exe', |
36 #'chrome.dll', | 36 #'chrome.dll', |
37 'unit_tests.exe', | 37 'unit_tests.exe', |
38 'automated_ui_tests.exe', | 38 'automated_ui_tests.exe', |
39 'ui_tests.exe', | |
40 'installer_util_unittests.exe', | 39 'installer_util_unittests.exe', |
41 'ipc_tests.exe', | 40 'ipc_tests.exe', |
42 'memory_test.exe', | 41 'memory_test.exe', |
43 'page_cycler_tests.exe', | 42 'page_cycler_tests.exe', |
44 'perf_tests.exe', | 43 'perf_tests.exe', |
45 'plugin_tests.exe', | |
46 'reliability_tests.exe', | 44 'reliability_tests.exe', |
47 'security_tests.dll', | 45 'security_tests.dll', |
48 'startup_tests.exe', | 46 'startup_tests.exe', |
49 'tab_switching_test.exe', | 47 'tab_switching_test.exe', |
50 'test_shell_tests.exe', | 48 'test_shell.exe'] |
51 'test_shell.exe', | |
52 'activex_test_control.dll'] | |
53 | 49 |
54 # The list of [tests, args] that will be run. | 50 # The list of [tests, args] that will be run. |
55 # Failing tests have been commented out. | 51 # Failing tests have been commented out. |
56 # TODO(niranjan): Need to add layout tests that excercise the test shell. | 52 # TODO(niranjan): Need to add layout tests that excercise the test shell. |
57 windows_tests = [ | 53 windows_tests = [ |
58 ['unit_tests.exe', ''], | 54 ['unit_tests.exe', ''], |
59 # ['automated_ui_tests.exe', ''], | 55 # ['automated_ui_tests.exe', ''], |
60 ['ui_tests.exe', '--no-sandbox'], | |
61 ['installer_util_unittests.exe', ''], | 56 ['installer_util_unittests.exe', ''], |
62 ['ipc_tests.exe', ''], | 57 ['ipc_tests.exe', ''], |
63 ['page_cycler_tests.exe', '--gtest_filter=*File --no-sandbox'], | 58 ['page_cycler_tests.exe', '--gtest_filter=*File --no-sandbox'], |
64 ['plugin_tests.exe', '--no-sandbox'], | |
65 ['reliability_tests.exe', '--no-sandbox'], | 59 ['reliability_tests.exe', '--no-sandbox'], |
66 ['startup_tests.exe', '--no-sandbox'], | 60 ['startup_tests.exe', '--no-sandbox'], |
67 ['tab_switching_test.exe', '--no-sandbox'], | 61 ['tab_switching_test.exe', '--no-sandbox'], |
68 ['test_shell_tests.exe', ''] | |
69 ] | 62 ] |
70 | 63 |
71 | 64 |
72 def IsWindows(): | 65 def IsWindows(): |
73 """Checks if the current platform is Windows. | 66 """Checks if the current platform is Windows. |
74 """ | 67 """ |
75 return sys.platform[:3] == 'win' | 68 return sys.platform[:3] == 'win' |
76 | 69 |
77 | 70 |
78 class Coverage(object): | 71 class Coverage(object): |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 | 350 |
358 cov.Upload(list_coverage, | 351 cov.Upload(list_coverage, |
359 options.upload_path, | 352 options.upload_path, |
360 os.path.join(options.src_root, 'chrome', 'Release'), | 353 os.path.join(options.src_root, 'chrome', 'Release'), |
361 options.src_root) | 354 options.src_root) |
362 cov.TearDown() | 355 cov.TearDown() |
363 | 356 |
364 | 357 |
365 if __name__ == '__main__': | 358 if __name__ == '__main__': |
366 sys.exit(main()) | 359 sys.exit(main()) |
OLD | NEW |