Add systemtap as a dependency. Some tests may want to use tapsets for
profiling or debugging, so it's worth adding it here and not as a test.
Signed-off-by: Anton Blanchard <anton@samba.org>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@3008 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/deps/systemtap/systemtap.py b/client/deps/systemtap/systemtap.py
new file mode 100755
index 0000000..2eb2452
--- /dev/null
+++ b/client/deps/systemtap/systemtap.py
@@ -0,0 +1,32 @@
+#!/usr/bin/python
+
+import os
+import common
+import shutil
+from autotest_lib.client.bin import utils
+
+version = 1
+
+def setup(tarball_systemtap, tarball_elfutils, topdir):
+ srcdir = os.path.join(topdir, 'src')
+
+ utils.extract_tarball_to_dir(tarball_systemtap, 'src')
+ utils.extract_tarball_to_dir(tarball_elfutils, 'elfutils')
+ shutil.move('elfutils', 'src')
+
+ os.chdir(srcdir)
+
+ utils.system('./configure --with-elfutils=elfutils ' \
+ '--prefix=%s/systemtap' % topdir)
+ utils.system('make -j %d' % utils.count_cpus())
+ utils.system('make install')
+
+ os.chdir(topdir)
+
+pwd = os.getcwd()
+# http://sourceware.org/systemtap/ftp/releases/systemtap-0.9.5.tar.gz
+tarball_systemtap = os.path.join(pwd, 'systemtap-0.9.5.tar.gz')
+# https://fedorahosted.org/releases/e/l/elfutils/elfutils-0.140.tar.bz2
+tarball_elfutils = os.path.join(pwd, 'elfutils-0.140.tar.bz2')
+utils.update_version(pwd+'/src', False, version, setup, tarball_systemtap,
+ tarball_elfutils, pwd)