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

Side by Side Diff: client/tests/systemtap/systemtap.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/sysbench/sysbench.py ('k') | client/tests/tbench/tbench.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 import os, shutil, re 1 import os, shutil, re
2 from autotest_lib.client.bin import test, utils 2 from autotest_lib.client.bin import test, utils
3 from autotest_lib.client.common_lib import error 3 from autotest_lib.client.common_lib import error
4 4
5 5
6 class systemtap(test.test): 6 class systemtap(test.test):
7 """ 7 """
8 This autotest module runs the systemtap test suite. 8 This autotest module runs the systemtap test suite.
9 9
10 @author Anton Blanchard <anton@au.ibm.com> 10 @author Anton Blanchard <anton@au.ibm.com>
(...skipping 25 matching lines...) Expand all
36 depdir = os.path.join(self.autodir, 'deps/systemtap') 36 depdir = os.path.join(self.autodir, 'deps/systemtap')
37 if os.path.exists(os.path.join(depdir, tarball_systemtap)): 37 if os.path.exists(os.path.join(depdir, tarball_systemtap)):
38 tarball = utils.unmap_url(depdir, tarball_systemtap, self.tmpdir) 38 tarball = utils.unmap_url(depdir, tarball_systemtap, self.tmpdir)
39 else: 39 else:
40 tarball = utils.unmap_url(self.bindir, tarball_systemtap, self.tmpdi r) 40 tarball = utils.unmap_url(self.bindir, tarball_systemtap, self.tmpdi r)
41 utils.extract_tarball_to_dir(tarball_systemtap, self.srcdir) 41 utils.extract_tarball_to_dir(tarball_systemtap, self.srcdir)
42 42
43 testsuite = os.path.join(self.srcdir, 'testsuite') 43 testsuite = os.path.join(self.srcdir, 'testsuite')
44 os.chdir(testsuite) 44 os.chdir(testsuite)
45 45
46 utils.system('./configure') 46 utils.configure()
47 utils.system('make') 47 utils.make()
48 48
49 # Run a simple systemtap script to make sure systemtap and the 49 # Run a simple systemtap script to make sure systemtap and the
50 # kernel debuginfo packages are correctly installed 50 # kernel debuginfo packages are correctly installed
51 script = "PATH=%s/bin:$PATH stap -c /bin/true -e 'probe syscall.read { e xit() }'" % self.systemtap_dir 51 script = "PATH=%s/bin:$PATH stap -c /bin/true -e 'probe syscall.read { e xit() }'" % self.systemtap_dir
52 try: 52 try:
53 utils.system(script) 53 utils.system(script)
54 except: 54 except:
55 raise error.TestError('simple systemtap test failed, kernel debuginf o package may be missing: %s' % script) 55 raise error.TestError('simple systemtap test failed, kernel debuginf o package may be missing: %s' % script)
56 56
57 57
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 for line in f: 93 for line in f:
94 result = r.match(line) 94 result = r.match(line)
95 if result: 95 if result:
96 key = result.group(1) 96 key = result.group(1)
97 key = key.strip().replace(' ', '_') 97 key = key.strip().replace(' ', '_')
98 value = result.group(2) 98 value = result.group(2)
99 keyval[key] = value 99 keyval[key] = value
100 f.close() 100 f.close()
101 101
102 self.write_perf_keyval(keyval) 102 self.write_perf_keyval(keyval)
OLDNEW
« no previous file with comments | « client/tests/sysbench/sysbench.py ('k') | client/tests/tbench/tbench.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698