Update the Systemtap tests to allow a user to test any version of
systemtap/elfutils. A different version can be specified using tarball_systemtap
and tarball_elfutils options to run_test.
For example :
job.run_test(url='systemtap', local=False, tarball_systemtap='http://sourceware.org/systemtap/ftp/releases/systemtap-1.0.tar.gz', tarball_elfutils='https://fedorahosted.org/releases/e/l/elfutils/elfutils-0.143.tar.bz2')
Risk: Low
Visibility: Change only applicable to systemtap test.
Signed-off-by: Sachin Sant <sachinp@in.ibm.com>
diff -Naurp autotest-0.11.0/client/deps/systemtap/systemtap.py autotest-0.11.0-new//client/deps/systemtap/systemtap.py
git-svn-id: http://test.kernel.org/svn/autotest/trunk@3912 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/tests/systemtap/systemtap.py b/client/tests/systemtap/systemtap.py
index 4072eae..f220045 100644
--- a/client/tests/systemtap/systemtap.py
+++ b/client/tests/systemtap/systemtap.py
@@ -19,18 +19,26 @@
self.systemtap_dir = os.path.join(self.autodir,
'deps/systemtap/systemtap')
- def setup(self, tarball='systemtap-0.9.5.tar.gz', local=False):
+ def setup(self, local=False, tarball_systemtap='systemtap-0.9.5.tar.gz', tarball_elfutils='elfutils-0.140.tar.bz2'):
+ depdir = os.path.join(self.autodir, 'deps/systemtap')
+ tarball_systemtap = utils.unmap_url(depdir, tarball_systemtap, self.tmpdir)
+ tarball_elfutils = utils.unmap_url(depdir, tarball_elfutils, self.tmpdir)
+ srcdir = os.path.join(depdir, 'src')
+ utils.extract_tarball_to_dir(tarball_systemtap, srcdir)
+ elfdir = os.path.join(srcdir, 'elfutils')
+ utils.extract_tarball_to_dir(tarball_elfutils, elfdir)
+
self.job.setup_dep(['dejagnu'])
if local == False:
self.job.setup_dep(['systemtap'])
# Try grabbing the systemtap tarball out of the deps directory
depdir = os.path.join(self.autodir, 'deps/systemtap')
- if os.path.exists(os.path.join(depdir, tarball)):
- tarball = utils.unmap_url(depdir, tarball, self.tmpdir)
+ if os.path.exists(os.path.join(depdir, tarball_systemtap)):
+ tarball = utils.unmap_url(depdir, tarball_systemtap, self.tmpdir)
else:
- tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
- utils.extract_tarball_to_dir(tarball, self.srcdir)
+ tarball = utils.unmap_url(self.bindir, tarball_systemtap, self.tmpdir)
+ utils.extract_tarball_to_dir(tarball_systemtap, self.srcdir)
testsuite = os.path.join(self.srcdir, 'testsuite')
os.chdir(testsuite)