OLD | NEW |
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 AUTHOR = "Chrome OS Team" | 5 AUTHOR = "Chrome OS Team" |
6 NAME = "BVT" | 6 NAME = "BVT" |
7 TIME = "SHORT" | 7 TIME = "SHORT" |
8 TEST_CATEGORY = "Functional" | 8 TEST_CATEGORY = "Functional" |
9 TEST_CLASS = "suite" | 9 TEST_CLASS = "suite" |
10 TEST_TYPE = "server" | 10 TEST_TYPE = "server" |
11 | 11 |
12 DOC = """ | 12 DOC = """ |
13 This test suite runs automated tests that should all pass and that verify | 13 This test suite runs automated tests that should all pass and that verify |
14 that a build has some minimal functionality. These are meant to run quickly | 14 that a build has some minimal functionality. These are meant to run quickly |
15 in less than 30 minutes and should maximize coverage. | 15 in less than 30 minutes and should maximize coverage. |
16 """ | 16 """ |
17 | 17 |
| 18 from autotest_lib.server import site_host_attributes |
| 19 |
18 client = hosts.create_host(machines[0]) | 20 client = hosts.create_host(machines[0]) |
| 21 client_attributes = site_host_attributes.HostAttributes(machines[0]) |
| 22 |
19 client_at = autotest.Autotest(client) | 23 client_at = autotest.Autotest(client) |
20 | 24 |
21 | 25 |
22 # | 26 # |
23 # Run server tests | 27 # Run server tests |
24 # | 28 # |
25 | 29 |
26 # Test the boot performance. Add a generous constraint (at least for | 30 # Test the boot performance. Add a generous constraint (at least for |
27 # x86 platforms) on the boot time. We just look at the time from | 31 # x86 platforms) on the boot time. We just look at the time from |
28 # kernel start to login prompt and require it to be under 18s. As of | 32 # kernel start to login prompt and require it to be under 18s. As of |
29 # 3/30/2010 the time is 13.5s on a slow HDD platform. Note that this | 33 # 3/30/2010 the time is 13.5s on a slow HDD platform. Note that this |
30 # may still fail if this is run on on a platform machine before | 34 # may still fail if this is run on on a platform machine before |
31 # /home/chronos is populated (that seems to add another 23s). But as | 35 # /home/chronos is populated (that seems to add another 23s). But as |
32 # BuildVerify tests are run after the boot after reimaging, the | 36 # BuildVerify tests are run after the boot after reimaging, the |
33 # home directory should already be populated. Once we are running | 37 # home directory should already be populated. Once we are running |
34 # these tests only on qualified systems we can lower the constraints | 38 # these tests only on qualified systems we can lower the constraints |
35 # to be in-line with suite_HWQual. Once we are running our own firmware | 39 # to be in-line with suite_HWQual. Once we are running our own firmware |
36 # and we have firmware timing support on ARM we can also add the | 40 # and we have firmware timing support on ARM we can also add the |
37 # constraint on firmware boot time. | 41 # constraint on firmware boot time. |
38 | 42 |
| 43 bootperf_constraints = [] |
| 44 if client_attributes.has_ssd: |
| 45 bootperf_constraints.append('seconds_kernel_to_login <= 8') |
| 46 else: |
| 47 bootperf_constraints.append('seconds_kernel_to_login <= 18') |
| 48 |
| 49 if client_attributes.has_chromeos_firmware: |
| 50 bootperf_constraints.append('seconds_firmware_boot <= 1.3') |
| 51 |
39 job.run_test("platform_BootPerfServer", | 52 job.run_test("platform_BootPerfServer", |
40 host=client, | 53 host=client, |
41 constraints=['seconds_kernel_to_login <= 18']) | 54 constraints=bootperf_constraints) |
42 | 55 |
43 job.run_test("platform_KernelErrorPaths", host=client) | 56 job.run_test("platform_KernelErrorPaths", host=client) |
44 | 57 |
45 | 58 |
46 # | 59 # |
47 # Run client tests that do not require specific parameters | 60 # Run client tests that do not require specific parameters or platforms |
48 # | 61 # |
49 | 62 |
50 # All client tests whose default parameters are adequate | 63 # All client tests whose default parameters are adequate |
51 TESTS = [ | 64 TESTS = [ |
52 'build_RootFilesystemSize', | 65 'build_RootFilesystemSize', |
53 'desktopui_ChromeFirstRender', | 66 'desktopui_ChromeFirstRender', |
54 'desktopui_IBusTest', | 67 'desktopui_IBusTest', |
55 'desktopui_ScreenSaverUnlock', | 68 'desktopui_ScreenSaverUnlock', |
56 'desktopui_WindowManagerFocusNewWindows', | 69 'desktopui_WindowManagerFocusNewWindows', |
57 'desktopui_WindowManagerHotkeys', | 70 'desktopui_WindowManagerHotkeys', |
58 'hardware_Backlight', | 71 'hardware_Backlight', |
59 'hardware_DiskSize', | 72 'hardware_DiskSize', |
60 'hardware_MemoryTotalSize', | 73 'hardware_MemoryTotalSize', |
61 # TODO(kmixter): Determine how to only run some tests on some | |
62 # platforms. Until then pick a conservative set of BVTs. | |
63 #'hardware_SsdDetection', | |
64 'login_AuthenticationTests', | 74 'login_AuthenticationTests', |
65 'login_PamModuleLoadTest', | 75 'login_PamModuleLoadTest', |
66 # crosbug.com/2314: network_Ping is disabled until fixed | 76 'network_Ping', |
67 #'network_Ping', | |
68 # Requires 802.11n | |
69 #'network_WiFiCaps', | |
70 'platform_CleanShutdown', | 77 'platform_CleanShutdown', |
71 'platform_DaemonsRespawn', | 78 'platform_DaemonsRespawn', |
72 'platform_DiskIterate', | 79 'platform_DiskIterate', |
73 'platform_FilePerms', | 80 'platform_FilePerms', |
74 'platform_KernelVersion', | 81 'platform_KernelVersion', |
75 'platform_MemCheck', | 82 'platform_MemCheck', |
76 'platform_NetParms', | 83 'platform_NetParms', |
77 'platform_OSLimits', | 84 'platform_OSLimits', |
78 'platform_PartitionCheck', | 85 'platform_PartitionCheck', |
79 'platform_Shutdown', | 86 'platform_Shutdown', |
80 'platform_TempFS', | 87 'platform_TempFS', |
81 'power_Resume', | |
82 ] | 88 ] |
83 | 89 |
84 for test in TESTS: | 90 for test in TESTS: |
85 client_at.run_test(test) | 91 client_at.run_test(test) |
86 | 92 |
87 | 93 |
88 # | 94 # |
89 # Run client tests with specific parameters | 95 # Run client tests with specific parameters or requiring specific |
| 96 # platforms |
90 # | 97 # |
91 | 98 |
92 | 99 |
93 # Run login tests, local first, then remote login | 100 # Run login tests, local first, then remote login |
94 client_at.run_test('desktopui_DoLogin', | 101 client_at.run_test('desktopui_DoLogin', |
95 script='backdoor_creds.json', | 102 script='backdoor_creds.json', |
96 tag='local') | 103 tag='local') |
97 client_at.run_test('desktopui_DoLogin', | 104 client_at.run_test('desktopui_DoLogin', |
98 script='autox_script.json', | 105 script='autox_script.json', |
99 tag='remote') | 106 tag='remote') |
100 | 107 |
101 client_at.run_test('desktopui_FailedLogin', script='bad_creds.json') | 108 client_at.run_test('desktopui_FailedLogin', script='bad_creds.json') |
102 | 109 |
103 client_at.run_test('desktopui_KillRestart', | 110 client_at.run_test('desktopui_KillRestart', |
104 binary='^session_manager$', | 111 binary='^session_manager$', |
105 tag='session') | 112 tag='session') |
106 client_at.run_test('desktopui_KillRestart', binary='^chrome$', tag='chrome') | 113 client_at.run_test('desktopui_KillRestart', binary='^chrome$', tag='chrome') |
107 | 114 |
108 client_at.run_test('hardware_MemoryThroughput', num_iteration=1, test_list='18') | 115 client_at.run_test('hardware_MemoryThroughput', num_iteration=1, test_list='18') |
109 | 116 |
110 client_at.run_test('hardware_SAT', seconds=20) | 117 client_at.run_test('hardware_SAT', seconds=20) |
111 | 118 |
| 119 if client_attributes.has_ssd: |
| 120 client_at.run_test('hardware_SsdDetection') |
| 121 |
112 client_at.run_test('login_CryptohomeMounted', tag='success') | 122 client_at.run_test('login_CryptohomeMounted', tag='success') |
113 | 123 |
114 # Check volume of logging, and expect less than 50% of this machine's | 124 # Check volume of logging, and expect less than 50% of this machine's |
115 # stateful partition is used. Also make sure there's not a serious | 125 # stateful partition is used. Also make sure there's not a serious |
116 # problem with the patterns being too permissive by assuming most were | 126 # problem with the patterns being too permissive by assuming most were |
117 # required. | 127 # required. |
118 client_at.run_test('logging_LogVolume', | 128 client_at.run_test('logging_LogVolume', |
119 constraints=['bytes_unexpected <= 100000', | 129 constraints=['bytes_unexpected <= 100000', |
120 'files_unexpected <= 50', | 130 'files_unexpected <= 50', |
121 'percent_stateful_used <= 50', | 131 'percent_stateful_used <= 50', |
122 'percent_unused_patterns <= 70']) | 132 'percent_unused_patterns <= 70']) |
123 | 133 |
124 client_at.run_test('network_DisableInterface', | 134 client_at.run_test('network_DisableInterface', |
125 iface_name='eth0', tag='eth0') | 135 iface_name='eth0', tag='eth0') |
126 client_at.run_test('network_DisableInterface', | 136 client_at.run_test('network_DisableInterface', |
127 iface_name='wlan0', tag='wlan0') | 137 iface_name='wlan0', tag='wlan0') |
128 # TODO(petkov): If Bluetooth is not available on the platform, this test will | 138 # TODO(petkov): If Bluetooth is not available on the platform, this test will |
129 # fail. Fix this once we have a way to run platform-dependent tests. | 139 # fail. Fix this once we have a way to run platform-dependent tests. |
130 client_at.run_test('network_DisableInterface', | 140 client_at.run_test('network_DisableInterface', |
131 iface_name='hci0', tag='hci0') | 141 iface_name='hci0', tag='hci0') |
132 | 142 |
| 143 if client_attributes.has_80211n: |
| 144 client_at.run_test('network_WiFiCaps') |
| 145 |
133 # Expect time is accurate within 1 minute from the NTP server. | 146 # Expect time is accurate within 1 minute from the NTP server. |
134 client_at.run_test('platform_AccurateTime', | 147 client_at.run_test('platform_AccurateTime', |
135 constraints=['seconds_offset < 60']) | 148 constraints=['seconds_offset < 60']) |
136 | 149 |
| 150 if not client_attributes.has_resume_bug: |
| 151 client_at.run_test('power_Resume') |
| 152 |
137 # Run process tests | 153 # Run process tests |
138 test_name = 'platform_ProcessPrivileges' | 154 test_name = 'platform_ProcessPrivileges' |
139 process_tests = [ | 155 process_tests = [ |
140 {'process': 'candidate_window', 'user': 'chronos', 'do_login': True}, | 156 {'process': 'candidate_window', 'user': 'chronos', 'do_login': True}, |
141 {'process': 'chrome'}, | 157 {'process': 'chrome'}, |
142 {'process': 'ibus-daemon', 'user': 'chronos', 'do_login': True}, | 158 {'process': 'ibus-daemon', 'user': 'chronos', 'do_login': True}, |
143 {'process': 'ibus-memconf', 'user': 'chronos', 'do_login': True}, | 159 {'process': 'ibus-memconf', 'user': 'chronos', 'do_login': True}, |
144 {'process': 'ibus-x11', 'user': 'chronos', 'do_login': True}, | 160 {'process': 'ibus-x11', 'user': 'chronos', 'do_login': True}, |
145 # TODO(yusukes): Change 'run_as_root' to False once super-user privileges for | 161 # TODO(yusukes): Change 'run_as_root' to False once super-user privileges for |
146 # X are dropped. | 162 # X are dropped. |
147 {'process': 'X', 'run_as_root': True}, | 163 {'process': 'X', 'run_as_root': True}, |
148 ] | 164 ] |
149 | 165 |
150 for process_test in process_tests: | 166 for process_test in process_tests: |
151 client_at.run_test(test_name, tag=process_test['process'], **process_test) | 167 client_at.run_test(test_name, tag=process_test['process'], **process_test) |
152 | 168 |
OLD | NEW |