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 import logging, os, re | 5 import logging, os, re |
6 from autotest_lib.client.bin import site_login, site_ui_test | 6 from autotest_lib.client.bin import site_login, site_ui_test |
7 from autotest_lib.client.common_lib import error, site_ui, utils | 7 from autotest_lib.client.common_lib import error, site_ui, utils |
8 | 8 |
9 class graphics_GLAPICheck(site_ui_test.UITest): | 9 class graphics_GLAPICheck(site_ui_test.UITest): |
10 version = 1 | 10 version = 1 |
11 preserve_srcdir = True | 11 preserve_srcdir = True |
12 error_message = "" | 12 error_message = "" |
13 | 13 |
14 | 14 |
15 def setup(self): | 15 def setup(self): |
16 os.chdir(self.srcdir) | 16 os.chdir(self.srcdir) |
17 utils.system('make clean') | 17 utils.make('clean') |
18 utils.system('make all') | 18 utils.make('all') |
19 | 19 |
20 | 20 |
21 def __check_extensions(self, info, ext_entries): | 21 def __check_extensions(self, info, ext_entries): |
22 info_split = info.split() | 22 info_split = info.split() |
23 comply = True | 23 comply = True |
24 for extension in ext_entries: | 24 for extension in ext_entries: |
25 match = extension in info_split | 25 match = extension in info_split |
26 if not match: | 26 if not match: |
27 self.error_message += " " + extension | 27 self.error_message += " " + extension |
28 comply = False | 28 comply = False |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 self.error_message) | 165 self.error_message) |
166 else: | 166 else: |
167 raise error.TestFail('gles_APICheck error: ' + result) | 167 raise error.TestFail('gles_APICheck error: ' + result) |
168 | 168 |
169 # Check X11 extensions. | 169 # Check X11 extensions. |
170 self.error_message = "" | 170 self.error_message = "" |
171 check_result = self.__check_x_extensions(result) | 171 check_result = self.__check_x_extensions(result) |
172 if not check_result: | 172 if not check_result: |
173 raise error.TestFail('X extensions insufficient:' + | 173 raise error.TestFail('X extensions insufficient:' + |
174 self.error_message) | 174 self.error_message) |
OLD | NEW |