summaryrefslogtreecommitdiffstats
path: root/testsuite/lib
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2007-09-28 11:15:24 -0400
committerFrank Ch. Eigler <fche@elastic.org>2007-09-28 11:15:24 -0400
commit0194188e9feba28902bc256bd3a5fdcad37c32a6 (patch)
treef586bb7d49b31d8a9ddb3e4823aae56615122933 /testsuite/lib
parenta9dcc5fe87d65be6faf6267d27c4b4a058d26fff (diff)
parent9446a6d68e4cea3554ecbbacb673b1be9dc89919 (diff)
downloadsystemtap-steved-0194188e9feba28902bc256bd3a5fdcad37c32a6.tar.gz
systemtap-steved-0194188e9feba28902bc256bd3a5fdcad37c32a6.tar.xz
systemtap-steved-0194188e9feba28902bc256bd3a5fdcad37c32a6.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'testsuite/lib')
-rw-r--r--testsuite/lib/stap_run.exp11
-rw-r--r--testsuite/lib/systemtap.exp16
2 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/lib/stap_run.exp b/testsuite/lib/stap_run.exp
index ff93ed8a..c9131562 100644
--- a/testsuite/lib/stap_run.exp
+++ b/testsuite/lib/stap_run.exp
@@ -86,5 +86,16 @@ proc no_load {} {
return 0
}
+proc print_system_info {} {
+ global Host Snapshot Distro
+
+ clone_output "\nHost: $Host"
+ if {[string compare $Snapshot "unknown"]!=0} {
+ clone_output "Snapshot: $Snapshot"
+ }
+ clone_output "Distro: $Distro\n"
+}
+
+print_system_info
# tests better all be true
set all_pass_string "(systemtap test success\r\n)+$"
diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp
index 6c8ed540..5b08c233 100644
--- a/testsuite/lib/systemtap.exp
+++ b/testsuite/lib/systemtap.exp
@@ -49,9 +49,25 @@ proc setup_systemtap_environment {} {
}
}
+proc get_system_info {} {
+ global Host Snapshot Distro env
+
+ set Host [exec /bin/uname -a]
+ if [file exists $env(SRCDIR)/../SNAPSHOT] {
+ set Snapshot [exec /bin/cat $env(SRCDIR)/../SNAPSHOT]
+ } else {
+ set Snapshot "unknown"
+ }
+ set Distro "Linux"
+ if [file exists /etc/fedora-release] {set Distro [exec /bin/cat /etc/fedora-release]}
+ if [file exists /etc/redhat-release] {set Distro [exec /bin/cat /etc/redhat-release]}
+ if [file exists /etc/suse-release] {set Distro [exec /bin/cat /etc/suse-release]}
+ if [file exists /etc/debian_version] {set Distro [exec /bin/cat /etc/debian_version]}
+}
setup_systemtap_environment
print_systemtap_version
+get_system_info
proc systemtap_init {args} {}
proc systemtap_version {} {}