OLD | NEW |
1 # This will need more work on the configuration stuff before it will function | 1 # This will need more work on the configuration stuff before it will function |
2 import os | 2 import os |
3 from autotest_lib.client.bin import test, utils | 3 from autotest_lib.client.bin import test, utils |
4 from autotest_lib.client.common_lib import error | 4 from autotest_lib.client.common_lib import error |
5 | 5 |
6 | 6 |
7 class lmbench(test.test): | 7 class lmbench(test.test): |
8 version = 4 | 8 version = 4 |
9 | 9 |
10 def initialize(self): | 10 def initialize(self): |
(...skipping 12 matching lines...) Expand all Loading... |
23 @param file: Path to the file lmbench will use for status output | 23 @param file: Path to the file lmbench will use for status output |
24 (defaults to a random named file inside standard test temp dir). | 24 (defaults to a random named file inside standard test temp dir). |
25 @see: http://www.bitmover.com/lm/lmbench/lmbench3.tar.gz | 25 @see: http://www.bitmover.com/lm/lmbench/lmbench3.tar.gz |
26 (original tarball, shipped as is in autotest). | 26 (original tarball, shipped as is in autotest). |
27 """ | 27 """ |
28 tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) | 28 tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) |
29 utils.extract_tarball_to_dir(tarball, self.srcdir) | 29 utils.extract_tarball_to_dir(tarball, self.srcdir) |
30 os.chdir(self.srcdir) | 30 os.chdir(self.srcdir) |
31 p1 = 'patch -p1 < ../0001-Fix-build-issues-with-lmbench.patch' | 31 p1 = 'patch -p1 < ../0001-Fix-build-issues-with-lmbench.patch' |
32 p2 = 'patch -p1 < ../0002-Changing-shebangs-on-lmbench-scripts.patch' | 32 p2 = 'patch -p1 < ../0002-Changing-shebangs-on-lmbench-scripts.patch' |
| 33 p3 = 'patch -p1 < ../0003-makefile.patch' |
33 utils.system(p1) | 34 utils.system(p1) |
34 utils.system(p2) | 35 utils.system(p2) |
| 36 utils.system(p3) |
35 | 37 |
36 # build lmbench | 38 # build lmbench |
37 utils.make() | 39 utils.make() |
38 | 40 |
39 # configure lmbench | 41 # configure lmbench |
40 utils.system('yes "" | make config') | 42 utils.system('yes "" | make config') |
41 | 43 |
42 # find the lmbench config file | 44 # find the lmbench config file |
43 config_files = utils.system_output('ls -1 bin/*/CONFIG*').splitlines() | 45 config_files = utils.system_output('ls -1 bin/*/CONFIG*').splitlines() |
44 if len(config_files) != 1: | 46 if len(config_files) != 1: |
(...skipping 18 matching lines...) Expand all Loading... |
63 def run_once(self): | 65 def run_once(self): |
64 os.chdir(self.srcdir) | 66 os.chdir(self.srcdir) |
65 utils.make('rerun') | 67 utils.make('rerun') |
66 | 68 |
67 | 69 |
68 def postprocess(self): | 70 def postprocess(self): |
69 # Get the results: | 71 # Get the results: |
70 outputdir = self.srcdir + "/results" | 72 outputdir = self.srcdir + "/results" |
71 results = self.resultsdir + "/summary.txt" | 73 results = self.resultsdir + "/summary.txt" |
72 utils.make("-C " + outputdir + " summary > " + results) | 74 utils.make("-C " + outputdir + " summary > " + results) |
OLD | NEW |