diff options
author | Tim Moore <timoore@redhat.com> | 2009-12-23 09:14:02 +0100 |
---|---|---|
committer | Tim Moore <timoore@redhat.com> | 2009-12-23 09:14:02 +0100 |
commit | 69ce6c79dbcb2cec2d1245935ef20bf832ffe70a (patch) | |
tree | 0b6aea71ef4f3ca5c797494d062819bfba63e7f7 /testsuite/lib | |
parent | 72195f6b17c0ed2e508c58bf3cadd5b9dc4e28ac (diff) | |
parent | 0ee3adb42f2f6d8bffe177e77a415b3a74f3a777 (diff) | |
download | systemtap-steved-69ce6c79dbcb2cec2d1245935ef20bf832ffe70a.tar.gz systemtap-steved-69ce6c79dbcb2cec2d1245935ef20bf832ffe70a.tar.xz systemtap-steved-69ce6c79dbcb2cec2d1245935ef20bf832ffe70a.zip |
Merge remote branch 'origin/master'
Diffstat (limited to 'testsuite/lib')
-rw-r--r-- | testsuite/lib/systemtap.exp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp index 13e6d1a2..e0e01bcc 100644 --- a/testsuite/lib/systemtap.exp +++ b/testsuite/lib/systemtap.exp @@ -113,8 +113,8 @@ proc setup_server {} { # Make sure that the necessary resources are available to run the client/server. if {[installtest_p]} then { - if {[catch {exec /usr/bin/which stap-client-connect} dummy]} then { - print "Unable to start a server: stap-client-connect is not found in PATH" + if {! [file exists $env(PKGLIBDIR)/stap-client-connect]} then { + print "Unable to start a server: stap-client-connect is not installed" return 0 } } elseif {! [file exists [exec pwd]/../stap-client-connect]} then { @@ -134,14 +134,26 @@ proc setup_server {} { # Server management scripts and data are installed if this is an # install test, otherwise there is some setup to do. + # Make sure the server management scripts and tools are on the $PATH. if {! [installtest_p]} then { - # Make sure the server management scripts and tools are on the $PATH. set env(PATH) "$srcdir/..:[exec pwd]/..:$env(PATH)" set env(SYSTEMTAP_SERVER_SCRIPTS) "$srcdir/.." + } else { + set env(PATH) "$env(PKGLIBDIR):$env(PATH)" + set env(SYSTEMTAP_SERVER_SCRIPTS) $env(PKGLIBDIR) + } + + # Erase the old server log file. + set logfile "[exec pwd]/server.log" + if {[file exists $logfile]} then { + exec rm -f $logfile; } + # Create a new one and make sure it's world writable. + exec touch $logfile + exec chmod 666 $logfile # Try to find or start the server. - set server_pid [exec stap-start-server] + set server_pid [exec stap-start-server --log=$logfile] if { "$server_pid" == "" } then { print "Cannot start a systemtap server" set server_pid 0 @@ -155,7 +167,6 @@ proc setup_server {} { # The server does not call this instance of 'stap' if {[installtest_p]} then { exec /bin/cp -p [exec which stap-client] $net_path/stap - exec /bin/cp -p [exec which stap-env] $net_path/stap-env } else { exec /bin/cp -p $srcdir/../stap-client $net_path/stap exec /bin/cp -p $srcdir/../stap-env $net_path/stap-env |