| OLD | NEW |
| 1 # -*- coding: utf-8 -*- | 1 # -*- coding: utf-8 -*- |
| 2 # | 2 # |
| 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 import os | 7 import os |
| 8 | 8 |
| 9 from autotest_lib.client.bin import test, utils | 9 from autotest_lib.client.bin import test, utils |
| 10 from autotest_lib.client.common_lib import error | 10 from autotest_lib.client.common_lib import error |
| 11 from autotest_lib.client.common_lib import flashrom_util | 11 from autotest_lib.client.cros import flashrom_util |
| 12 | 12 |
| 13 | 13 |
| 14 class factory_EnableWriteProtect(test.test): | 14 class factory_EnableWriteProtect(test.test): |
| 15 """ | 15 """ |
| 16 Factory test for enable EEPROM Write Protection | 16 Factory test for enable EEPROM Write Protection |
| 17 | 17 |
| 18 WARNING: THE RO SECTIONS OF YOUR FLASHROM WILL BECOME READONLY | 18 WARNING: THE RO SECTIONS OF YOUR FLASHROM WILL BECOME READONLY |
| 19 AFTER RUNNING THIS TEST. | 19 AFTER RUNNING THIS TEST. |
| 20 NOTE: This test only enables write protection. If you want to check | 20 NOTE: This test only enables write protection. If you want to check |
| 21 if the protection stuff is set correctly, use test | 21 if the protection stuff is set correctly, use test |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 # restore default selection. | 99 # restore default selection. |
| 100 if not self.flashrom.select_target(system_default_selection): | 100 if not self.flashrom.select_target(system_default_selection): |
| 101 raise error.TestError( | 101 raise error.TestError( |
| 102 'ERROR: cannot restore target.\n' | 102 'ERROR: cannot restore target.\n' |
| 103 '錯誤: 無法還原快閃記憶體目標') | 103 '錯誤: 無法還原快閃記憶體目標') |
| 104 print " - Complete." | 104 print " - Complete." |
| 105 | 105 |
| 106 | 106 |
| 107 if __name__ == "__main__": | 107 if __name__ == "__main__": |
| 108 print "please run this program with autotest." | 108 print "please run this program with autotest." |
| OLD | NEW |