| 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 os | 5 import os |
| 6 | 6 |
| 7 from autotest_lib.client.bin import factory, test, utils | 7 from autotest_lib.client.bin import factory, test, utils |
| 8 from autotest_lib.client.common_lib import error | 8 from autotest_lib.client.common_lib import error |
| 9 from autotest_lib.client.common_lib import flashrom_util | 9 from autotest_lib.client.cros import flashrom_util, gpio |
| 10 from autotest_lib.client.cros import gpio | |
| 11 | 10 |
| 12 | 11 |
| 13 class hardware_EepromWriteProtect(test.test): | 12 class hardware_EepromWriteProtect(test.test): |
| 14 """ | 13 """ |
| 15 Autotest for EEPROM Write Protection status | 14 Autotest for EEPROM Write Protection status |
| 16 | 15 |
| 17 WARNING: DO NOT INTERRUPT THIS TEST OTHERWISE YOUR FLASHROM MAY BE CORRUPTED | 16 WARNING: DO NOT INTERRUPT THIS TEST OTHERWISE YOUR FLASHROM MAY BE CORRUPTED |
| 18 | 17 |
| 19 NOTE: This test only verifies write-protection status. | 18 NOTE: This test only verifies write-protection status. |
| 20 If you want to enable write protection, run factory_EnableWriteProtect. | 19 If you want to enable write protection, run factory_EnableWriteProtect. |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 (conf['name'], ','.join(rw_list))) | 203 (conf['name'], ','.join(rw_list))) |
| 205 self.check_write_protection(layout_map, rw_list, True, original) | 204 self.check_write_protection(layout_map, rw_list, True, original) |
| 206 | 205 |
| 207 # restore default selection. | 206 # restore default selection. |
| 208 if not self.flashrom.select_target(system_default_selection): | 207 if not self.flashrom.select_target(system_default_selection): |
| 209 raise error.TestError('ERROR: cannot restore target.') | 208 raise error.TestError('ERROR: cannot restore target.') |
| 210 | 209 |
| 211 | 210 |
| 212 if __name__ == "__main__": | 211 if __name__ == "__main__": |
| 213 print "please run this program with autotest." | 212 print "please run this program with autotest." |
| OLD | NEW |