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 | 7 from autotest_lib.client.bin import factory |
8 from autotest_lib.client.bin import test, utils | 8 from autotest_lib.client.bin import test, utils |
9 from autotest_lib.client.common_lib import error | 9 from autotest_lib.client.bin import factory_error as error |
10 | 10 |
11 | 11 |
12 class factory_Wipe(test.test): | 12 class factory_Wipe(test.test): |
13 version = 3 | 13 version = 3 |
14 | 14 |
15 def wipe_stateful_partition(self, secure_wipe): | 15 def wipe_stateful_partition(self, secure_wipe): |
16 # Stub test to switch to boot from the release image, | 16 # Stub test to switch to boot from the release image, |
17 # and tag stateful partition to indicate wipe on reboot. | 17 # and tag stateful partition to indicate wipe on reboot. |
18 os.chdir(self.srcdir) | 18 os.chdir(self.srcdir) |
19 | 19 |
(...skipping 24 matching lines...) Expand all Loading... |
44 test_name = factory.FINAL_VERIFICATION_TEST_UNIQUE_NAME | 44 test_name = factory.FINAL_VERIFICATION_TEST_UNIQUE_NAME |
45 if only_run_from_factory_finalize_unless_testing: | 45 if only_run_from_factory_finalize_unless_testing: |
46 if factory.lookup_status_by_unique_name( | 46 if factory.lookup_status_by_unique_name( |
47 test_name, test_list, status_file_path) != factory.PASSED: | 47 test_name, test_list, status_file_path) != factory.PASSED: |
48 raise error.TestFail('You need to pass %s first.' % test_name) | 48 raise error.TestFail('You need to pass %s first.' % test_name) |
49 else: | 49 else: |
50 factory.log('WARNING: Final Verification is bypassed.\n' + | 50 factory.log('WARNING: Final Verification is bypassed.\n' + |
51 'THIS DEVICE CANNOT BE QUALIFIED.') | 51 'THIS DEVICE CANNOT BE QUALIFIED.') |
52 | 52 |
53 self.wipe_stateful_partition(secure_wipe) | 53 self.wipe_stateful_partition(secure_wipe) |
OLD | NEW |