Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Side by Side Diff: client/tests/lmbench/lmbench.py

Issue 3554003: Merge remote branch 'cros/upstream' into tempbranch3 (Closed) Base URL: http://git.chromium.org/git/autotest.git
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « client/tests/libhugetlbfs/libhugetlbfs.py ('k') | client/tests/ltp/ltp.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 16 matching lines...) Expand all
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 utils.system(p1) 33 utils.system(p1)
34 utils.system(p2) 34 utils.system(p2)
35 35
36 # build lmbench 36 # build lmbench
37 utils.system('make') 37 utils.make()
38 38
39 # configure lmbench 39 # configure lmbench
40 utils.system('yes "" | make config') 40 utils.system('yes "" | make config')
41 41
42 # find the lmbench config file 42 # find the lmbench config file
43 config_files = utils.system_output('ls -1 bin/*/CONFIG*').splitlines() 43 config_files = utils.system_output('ls -1 bin/*/CONFIG*').splitlines()
44 if len(config_files) != 1: 44 if len(config_files) != 1:
45 raise error.TestError('Failed to find a single lmbench config file,' 45 raise error.TestError('Failed to find a single lmbench config file,'
46 ' found: %s' % config_files) 46 ' found: %s' % config_files)
47 config_file = config_files[0] 47 config_file = config_files[0]
48 48
49 if not fsdir: 49 if not fsdir:
50 fsdir = self.tmpdir 50 fsdir = self.tmpdir
51 if not file: 51 if not file:
52 file = os.path.join(self.tmpdir, 'XXX') 52 file = os.path.join(self.tmpdir, 'XXX')
53 53
54 # patch the resulted config to use the proper temporary directory and 54 # patch the resulted config to use the proper temporary directory and
55 # file locations 55 # file locations
56 tmp_config_file = config_file + '.tmp' 56 tmp_config_file = config_file + '.tmp'
57 utils.system("sed 's!^FSDIR=.*$!FSDIR=%s!' '%s' > '%s'" % 57 utils.system("sed 's!^FSDIR=.*$!FSDIR=%s!' '%s' > '%s'" %
58 (fsdir, config_file, tmp_config_file)) 58 (fsdir, config_file, tmp_config_file))
59 utils.system("sed 's!^FILE=.*$!FILE=%s!' '%s' > '%s'" % 59 utils.system("sed 's!^FILE=.*$!FILE=%s!' '%s' > '%s'" %
60 (file, tmp_config_file, config_file)) 60 (file, tmp_config_file, config_file))
61 61
62 62
63 def run_once(self): 63 def run_once(self):
64 os.chdir(self.srcdir) 64 os.chdir(self.srcdir)
65 utils.system('make rerun') 65 utils.make('rerun')
66 66
67 67
68 def postprocess(self): 68 def postprocess(self):
69 # Get the results: 69 # Get the results:
70 outputdir = self.srcdir + "/results" 70 outputdir = self.srcdir + "/results"
71 results = self.resultsdir + "/summary.txt" 71 results = self.resultsdir + "/summary.txt"
72 utils.system("make -C " + outputdir + " summary > " + results) 72 utils.make("-C " + outputdir + " summary > " + results)
OLDNEW
« no previous file with comments | « client/tests/libhugetlbfs/libhugetlbfs.py ('k') | client/tests/ltp/ltp.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698