| 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 10 matching lines...) Expand all Loading... |
| 21 @param fsdir: Directory where file system tests will run | 21 @param fsdir: Directory where file system tests will run |
| 22 (defaults to standard test temp dir). | 22 (defaults to standard test temp dir). |
| 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 utils.system('patch -p1 < ../lmbench3.diff') | 31 p1 = 'patch -p1 < ../0001-Fix-build-issues-with-lmbench.patch' |
| 32 p2 = 'patch -p1 < ../0002-Changing-shebangs-on-lmbench-scripts.patch' |
| 33 utils.system(p1) |
| 34 utils.system(p2) |
| 32 | 35 |
| 33 # build lmbench | 36 # build lmbench |
| 34 utils.system('make') | 37 utils.system('make') |
| 35 | 38 |
| 36 # configure lmbench | 39 # configure lmbench |
| 37 utils.system('yes "" | make config') | 40 utils.system('yes "" | make config') |
| 38 | 41 |
| 39 # find the lmbench config file | 42 # find the lmbench config file |
| 40 config_files = utils.system_output('ls -1 bin/*/CONFIG*').splitlines() | 43 config_files = utils.system_output('ls -1 bin/*/CONFIG*').splitlines() |
| 41 if len(config_files) != 1: | 44 if len(config_files) != 1: |
| (...skipping 18 matching lines...) Expand all Loading... |
| 60 def run_once(self): | 63 def run_once(self): |
| 61 os.chdir(self.srcdir) | 64 os.chdir(self.srcdir) |
| 62 utils.system('make rerun') | 65 utils.system('make rerun') |
| 63 | 66 |
| 64 | 67 |
| 65 def postprocess(self): | 68 def postprocess(self): |
| 66 # Get the results: | 69 # Get the results: |
| 67 outputdir = self.srcdir + "/results" | 70 outputdir = self.srcdir + "/results" |
| 68 results = self.resultsdir + "/summary.txt" | 71 results = self.resultsdir + "/summary.txt" |
| 69 utils.system("make -C " + outputdir + " summary > " + results) | 72 utils.system("make -C " + outputdir + " summary > " + results) |
| OLD | NEW |