From e26df1cb46bf61450a3e9569cd892c91fd52c0a7 Mon Sep 17 00:00:00 2001 From: Dave Brolley Date: Fri, 20 Feb 2009 16:58:57 -0500 Subject: Check for required resources and tools before attempting tests using the client/server. Ensure that tests run with/without the server have unique names. --- testsuite/systemtap.server/server.exp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'testsuite/systemtap.server/server.exp') diff --git a/testsuite/systemtap.server/server.exp b/testsuite/systemtap.server/server.exp index f82abc27..c2c60b97 100644 --- a/testsuite/systemtap.server/server.exp +++ b/testsuite/systemtap.server/server.exp @@ -1,12 +1,10 @@ # Don't attempt these tests if the client/server are not available -if {! [file exists [exec pwd]/../stap-client-connect]} then { - untested "Server Tests" - return - } - # Start a systemtap server, if one is not already started. if {! [use_server_p]} then { - setup_server + if {! [setup_server]} then { + untested "Server Tests" + return + } } # Run the buildok tests using the server @@ -30,8 +28,9 @@ foreach file [lsort [glob -nocomplain $srcdir/$self/*.stp]] { # If this is an installcheck, then run a basic execution test. if {[installtest_p]} then { - set test "add" - stap_run $srcdir/systemtap.base/$test.stp no_load $all_pass_string + set test "Hello from server" + set rc [stap_run_batch $srcdir/systemtap.server/hello.stp] + if {$rc == 0} { pass $test } else { fail $test } } # Shudown the server, if we started it. -- cgit