| OLD | NEW | 
|---|
| 1 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2009 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 logging, os, re | 5 import logging, os, re | 
| 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 hardware_StorageFio(test.test): | 10 class hardware_StorageFio(test.test): | 
| (...skipping 10 matching lines...) Expand all  Loading... | 
| 21 | 21 | 
| 22         self.job.setup_dep(['libaio']) | 22         self.job.setup_dep(['libaio']) | 
| 23         ldflags = '-L' + self.autodir + '/deps/libaio/lib' | 23         ldflags = '-L' + self.autodir + '/deps/libaio/lib' | 
| 24         cflags = '-I' + self.autodir + '/deps/libaio/include' | 24         cflags = '-I' + self.autodir + '/deps/libaio/include' | 
| 25         var_ldflags = 'LDFLAGS="' + ldflags + '"' | 25         var_ldflags = 'LDFLAGS="' + ldflags + '"' | 
| 26         var_cflags  = 'CFLAGS="' + cflags + '"' | 26         var_cflags  = 'CFLAGS="' + cflags + '"' | 
| 27 | 27 | 
| 28         os.chdir(self.srcdir) | 28         os.chdir(self.srcdir) | 
| 29         utils.system('patch -p1 < ../Makefile.patch') | 29         utils.system('patch -p1 < ../Makefile.patch') | 
| 30         utils.system('patch -p1 < ../arm.patch') | 30         utils.system('patch -p1 < ../arm.patch') | 
| 31         utils.system('%s %s make' % (var_ldflags, var_cflags)) | 31         utils.make(make='%s %s make' % (var_ldflags, var_cflags)) | 
| 32 | 32 | 
| 33 | 33 | 
| 34     def __find_free_root_partition(self): | 34     def __find_free_root_partition(self): | 
| 35         """Locate the spare root partition that we didn't boot off""" | 35         """Locate the spare root partition that we didn't boot off""" | 
| 36 | 36 | 
| 37         spare_root_map = { | 37         spare_root_map = { | 
| 38             '3': '5', | 38             '3': '5', | 
| 39             '5': '3', | 39             '5': '3', | 
| 40         } | 40         } | 
| 41         rootdev = utils.system_output('rootdev') | 41         rootdev = utils.system_output('rootdev') | 
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 200             results[units + '_' + test] = result[metric] | 200             results[units + '_' + test] = result[metric] | 
| 201 | 201 | 
| 202         # Output keys relevent to the performance, larger filesize will run | 202         # Output keys relevent to the performance, larger filesize will run | 
| 203         # slower, and sda5 should be slightly slower than sda3 on a rotational | 203         # slower, and sda5 should be slightly slower than sda3 on a rotational | 
| 204         # disk | 204         # disk | 
| 205         self.write_test_keyval({'filesize': self.__filesize, | 205         self.write_test_keyval({'filesize': self.__filesize, | 
| 206                                 'filename': self.__filename, | 206                                 'filename': self.__filename, | 
| 207                                 'device': self.__description}) | 207                                 'device': self.__description}) | 
| 208         logging.info('Device Description: %s' % self.__description) | 208         logging.info('Device Description: %s' % self.__description) | 
| 209         self.write_perf_keyval(results) | 209         self.write_perf_keyval(results) | 
| OLD | NEW | 
|---|