| 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 firmware_hash | 5 import firmware_hash |
| 6 import glob | 6 import glob |
| 7 import logging | 7 import logging |
| 8 import os | 8 import os |
| 9 import pprint | 9 import pprint |
| 10 import re | 10 import re |
| 11 from autotest_lib.client.bin import factory | 11 from autotest_lib.client.bin import factory |
| 12 from autotest_lib.client.bin import test, utils | 12 from autotest_lib.client.bin import test, utils |
| 13 from autotest_lib.client.common_lib import error | 13 from autotest_lib.client.common_lib import error |
| 14 from autotest_lib.client.common_lib import flashrom_util | 14 from autotest_lib.client.cros import flashrom_util, gbb_util, vblock |
| 15 from autotest_lib.client.common_lib import gbb_util | |
| 16 from autotest_lib.client.common_lib import site_fmap | |
| 17 from autotest_lib.client.cros import vblock | |
| 18 | 15 |
| 19 | 16 |
| 20 class hardware_Components(test.test): | 17 class hardware_Components(test.test): |
| 21 version = 2 | 18 version = 2 |
| 22 # We divide all component IDs (cids) into 5 categories: | 19 # We divide all component IDs (cids) into 5 categories: |
| 23 # - enumable: able to get the results by running specific commands; | 20 # - enumable: able to get the results by running specific commands; |
| 24 # - PCI: PCI devices; | 21 # - PCI: PCI devices; |
| 25 # - USB: USB devices; | 22 # - USB: USB devices; |
| 26 # - probable: returns existed or not by given some pre-defined choices; | 23 # - probable: returns existed or not by given some pre-defined choices; |
| 27 # - not test: only data, don't test them. | 24 # - not test: only data, don't test them. |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 # hardware_Components may run without factory environment | 523 # hardware_Components may run without factory environment |
| 527 factory.log('Failed setting shared data, ignored: %s' % | 524 factory.log('Failed setting shared data, ignored: %s' % |
| 528 repr(e)) | 525 repr(e)) |
| 529 return | 526 return |
| 530 | 527 |
| 531 if only_cardreader_failed: | 528 if only_cardreader_failed: |
| 532 all_failures = ('You may forget to insert an SD card.\n' + | 529 all_failures = ('You may forget to insert an SD card.\n' + |
| 533 all_failures) | 530 all_failures) |
| 534 | 531 |
| 535 raise error.TestFail(all_failures) | 532 raise error.TestFail(all_failures) |
| OLD | NEW |