summaryrefslogtreecommitdiffstats
path: root/testsuite/lib/systemtap.exp
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/lib/systemtap.exp')
-rw-r--r--testsuite/lib/systemtap.exp23
1 files changed, 13 insertions, 10 deletions
diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp
index 28129f0a..f399073e 100644
--- a/testsuite/lib/systemtap.exp
+++ b/testsuite/lib/systemtap.exp
@@ -37,7 +37,7 @@ proc print_systemtap_version {} {
proc setup_systemtap_environment {} {
- global srcdir prefix env server_pid client_path
+ global srcdir prefix env server_pid net_path
# need an absolute SRCDIR for the top-level src/ tree
# XXX: or, we could change nearby uses of ${SRCDIR}/testsuite to ${SRCDIR}
@@ -55,9 +55,14 @@ proc setup_systemtap_environment {} {
if {[use_server_p]} then {
print "Testing using a systemtap server"
- # Server management scripts are installed if this is an install test, otherwise
- # in the source directory. Make sure they are on the $PATH.
+ # A place for some temporary files and scripts.
+ set net_path [exec pwd]/net
+ exec /bin/mkdir -p $net_path
+
+ # Server management scripts and data are installed if this is an
+ # install test, otherwise there is some setup to do.
if {! [installtest_p]} then {
+ # Make sure the server management scripts are on the $PATH.
set env(PATH) "$srcdir/..:$env(PATH)"
}
@@ -76,14 +81,12 @@ proc setup_systemtap_environment {} {
# Make a copy of 'stap-client' as 'stap' and make sure it's at the
# beginning of the $PATH. Do this after starting the server so that
# The server does not call this instance of 'stap'
- set client_path [exec pwd]/net
- exec /bin/mkdir -p $client_path
if {[installtest_p]} then {
- exec /bin/cp -p [exec which stap-client] $client_path/stap
+ exec /bin/cp -p [exec which stap-client] $net_path/stap
} else {
- exec /bin/cp -p $srcdir/../stap-client $client_path/stap
+ exec /bin/cp -p $srcdir/../stap-client $net_path/stap
}
- set env(PATH) "$client_path:$env(PATH)"
+ set env(PATH) "$net_path:$env(PATH)"
}
# PATH, SYSTEMTAP_TAPSET, SYSTEMTAP_RUNTIME, LD_LIBRARY_PATH are already set.
@@ -121,7 +124,7 @@ proc systemtap_init {args} {}
proc systemtap_version {} {}
proc systemtap_exit {} {
- global server_pid client_path
+ global server_pid net_path
# Stop the stap server, if we started it.
if {[use_server_p]} then {
@@ -131,7 +134,7 @@ proc systemtap_exit {} {
}
# Remove the temporary stap script
- exec /bin/rm -fr $client_path
+ exec /bin/rm -fr $net_path
}
}