summaryrefslogtreecommitdiffstats
path: root/testsuite/lib/systemtap.exp
diff options
context:
space:
mode:
authorfche <fche>2006-08-12 05:13:09 +0000
committerfche <fche>2006-08-12 05:13:09 +0000
commit814bc89d4635f101b2c0077598f31aad95ed15b7 (patch)
tree407a49dbaf446af4751f5068607a7fb8dad0611d /testsuite/lib/systemtap.exp
parent6b6d04673a1ef175821afc7d4fabdb496698e8e3 (diff)
downloadsystemtap-steved-814bc89d4635f101b2c0077598f31aad95ed15b7.tar.gz
systemtap-steved-814bc89d4635f101b2c0077598f31aad95ed15b7.tar.xz
systemtap-steved-814bc89d4635f101b2c0077598f31aad95ed15b7.zip
2006-08-12 Frank Ch. Eigler <fche@elastic.org>
* configure.ac, Makefile.am: Descend into testsuite/ directory. Remove local test logic. * configure, Makefile.in: Regenerated. * runtest.sh: Not yet removed. * HACKING: Update for new testsuite layout. 2006-08-12 Frank Ch. Eigler <fche@elastic.org> * all: Reorganized old pass-1..4 tests one dejagnu bucket. Moved over old pass-5 tests, except for disabled syscalls tests. * Makefile (installcheck): New target for running pass-1..5 tests against installed systemtap.
Diffstat (limited to 'testsuite/lib/systemtap.exp')
-rw-r--r--testsuite/lib/systemtap.exp61
1 files changed, 61 insertions, 0 deletions
diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp
new file mode 100644
index 00000000..6bb578b4
--- /dev/null
+++ b/testsuite/lib/systemtap.exp
@@ -0,0 +1,61 @@
+load_lib site.exp
+
+proc installtest_p {} {
+ global TOOL_OPTIONS
+ if {[info exists TOOL_OPTIONS] && ($TOOL_OPTIONS == "install")} {
+ return 1
+ } else { return 0 }
+}
+
+proc print_systemtap_version {} {
+ set version [exec /bin/uname -r]
+ set location "/boot/vmlinux-$version"
+ if {! [file exists $location]} {
+ # try the debuginfo location
+ set location "/usr/lib/debug/lib/modules/$version/vmlinux"
+ if {! [file exists $location]} { set location "" }
+ }
+
+ print "kernel location: $location"
+ print "kernel version: $version"
+
+ set location [exec /usr/bin/which stap]
+ regexp {version [^)]*} [exec stap -V 2>@ stdout] version
+
+ print "systemtap location: $location"
+ print "systemtap version: $version"
+}
+
+
+proc setup_systemtap_environment {} {
+ global srcdir prefix env
+
+ # need an absolute SRCDIR for the top-level src/ tree
+ if {[string index $srcdir 0] != "/"} then {
+ set env(SRCDIR) [exec pwd]/$srcdir/..
+ } else {
+ set env(SRCDIR) $srcdir/..
+ }
+
+ if [installtest_p] {
+ set env(LD_LIBRARY_PATH) $prefix/lib/systemtap
+ set env(SYSTEMTAP_TAPSET) $prefix/share/systemtap/tapset
+ set env(SYSTEMTAP_RUNTIME) $prefix/share/systemtap/runtime
+ set env(PATH) $prefix/bin:$env(PATH)
+ } else {
+ set env(LD_LIBRARY_PATH) ../lib-elfutils:../lib-elfutils/systemtap
+ set env(SYSTEMTAP_TAPSET) $env(SRCDIR)/tapset
+ set env(SYSTEMTAP_RUNTIME) $env(SRCDIR)/runtime
+ set env(PATH) ..:$env(PATH)
+ }
+}
+
+
+setup_systemtap_environment
+print_systemtap_version
+
+
+proc systemtap_init {args} {}
+proc systemtap_version {} {}
+proc systemtap_exit {} {}
+