+2007-09-28 Wenji Huang <wenji.huang@oracle.com>
+
+ * lib/systemtap.exp: New proc get_system_info.
+ * lib/stap_run.exp: New proc print_system_info.
+
2007-09-27 Masami Hiramatsu <mhiramat@redhat.com>
PR3916
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)+$"
}
}
+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 {} {}