| 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 test, utils | 7 from autotest_lib.client.bin import test, utils |
| 8 from autotest_lib.client.common_lib import error | 8 from autotest_lib.client.common_lib import error |
| 9 | 9 |
| 10 class firmware_VbootCrypto(test.test): | 10 class firmware_VbootCrypto(test.test): |
| 11 """ | 11 """ |
| 12 Tests for correctness of verified boot reference crypto implementation. | 12 Tests for correctness of verified boot reference crypto implementation. |
| 13 """ | 13 """ |
| 14 version = 1 | 14 version = 1 |
| 15 preserve_srcdir = True | 15 preserve_srcdir = True |
| 16 | 16 |
| 17 # TODO(gauravsh): Disable this autotest until we have a way | 17 # TODO(gauravsh): Disable this autotest until we have a way |
| 18 # of running these in a 64-bit environment (since for x86, this | 18 # of running these in a 64-bit environment (since for x86, this |
| 19 # code is run in 64-bit mode. | 19 # code is run in 64-bit mode. |
| 20 # | 20 # |
| 21 # This issue is tracked as Issue 3792 on the Chromium OS Bug Tracker. | 21 # This issue is tracked as Issue 3792 on the Chromium OS Bug Tracker. |
| 22 # http://code.google.com/p/chromium-os/issues/detail?id=3792 | 22 # http://code.google.com/p/chromium-os/issues/detail?id=3792 |
| 23 def setup_Disabled(self): | 23 def setup_Disabled(self): |
| 24 os.chdir(self.srcdir) | 24 os.chdir(self.srcdir) |
| 25 utils.system('make clean all') | 25 utils.make('clean all') |
| 26 | 26 |
| 27 | 27 |
| 28 # Parses the [result] and output the key-value pairs. | 28 # Parses the [result] and output the key-value pairs. |
| 29 def __output_result_keyvals(self, results): | 29 def __output_result_keyvals(self, results): |
| 30 for keyval in results.splitlines(): | 30 for keyval in results.splitlines(): |
| 31 if keyval.strip().startswith('#'): | 31 if keyval.strip().startswith('#'): |
| 32 continue | 32 continue |
| 33 key, val = keyval.split(':') | 33 key, val = keyval.split(':') |
| 34 self.keyvals[key.strip()] = float(val) | 34 self.keyvals[key.strip()] = float(val) |
| 35 | 35 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 | 181 |
| 182 def run_splicing(self): | 182 def run_splicing(self): |
| 183 success = self.__splicing_tests() | 183 success = self.__splicing_tests() |
| 184 if not success: | 184 if not success: |
| 185 raise error.TestFail("Splicing Tests Failed") | 185 raise error.TestFail("Splicing Tests Failed") |
| 186 | 186 |
| 187 | 187 |
| 188 def run_once(self, suite='crypto'): | 188 def run_once(self, suite='crypto'): |
| 189 self.__generate_test_cases() | 189 self.__generate_test_cases() |
| 190 getattr(self, 'run_' + suite)() | 190 getattr(self, 'run_' + suite)() |
| OLD | NEW |