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.bin import factory_error as error |
11 from autotest_lib.client.common_lib import flashrom_util | 11 from autotest_lib.client.common_lib 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 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 # restore default selection. | 86 # restore default selection. |
87 if not self.flashrom.select_target(system_default_selection): | 87 if not self.flashrom.select_target(system_default_selection): |
88 raise error.TestError( | 88 raise error.TestError( |
89 'ERROR: cannot restore target.\n' \ | 89 'ERROR: cannot restore target.\n' \ |
90 '錯誤: 無法還原快閃記憶體目標') | 90 '錯誤: 無法還原快閃記憶體目標') |
91 print " - Complete." | 91 print " - Complete." |
92 | 92 |
93 | 93 |
94 if __name__ == "__main__": | 94 if __name__ == "__main__": |
95 print "please run this program with autotest." | 95 print "please run this program with autotest." |
OLD | NEW |