summaryrefslogtreecommitdiffstats
path: root/testsuite/lib
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/lib')
-rw-r--r--testsuite/lib/stap_compile.exp2
-rw-r--r--testsuite/lib/stap_run.exp2
-rw-r--r--testsuite/lib/stap_run2.exp2
-rw-r--r--testsuite/lib/stap_run_binary.exp2
-rw-r--r--testsuite/lib/stap_run_exact.exp2
-rw-r--r--testsuite/lib/systemtap.exp20
6 files changed, 24 insertions, 6 deletions
diff --git a/testsuite/lib/stap_compile.exp b/testsuite/lib/stap_compile.exp
index 8c6df0ee..8f82018f 100644
--- a/testsuite/lib/stap_compile.exp
+++ b/testsuite/lib/stap_compile.exp
@@ -4,7 +4,7 @@
# - script is the script to compile
# Additional arguments are passed to stap as-is.
proc stap_compile { TEST_NAME compile script args } {
- set cmd [concat {stap -v -p4 -e} $script $args]
+ set cmd [concat [stap_exec] {-v -p4 -e} $script $args]
verbose -log "running $cmd"
eval spawn $cmd
diff --git a/testsuite/lib/stap_run.exp b/testsuite/lib/stap_run.exp
index 43964d8e..5f67d773 100644
--- a/testsuite/lib/stap_run.exp
+++ b/testsuite/lib/stap_run.exp
@@ -26,7 +26,7 @@ proc stap_run { TEST_NAME {LOAD_GEN_FUNCTION ""} {OUTPUT_CHECK_STRING ""} args }
if {[info procs installtest_p] != "" && ![installtest_p]} { untested $TEST_NAME; return }
- set cmd [concat {stap -v} $args]
+ set cmd [concat [stap_exec] -v $args]
if [file readable $test_file_name] {
lappend cmd $test_file_name
}
diff --git a/testsuite/lib/stap_run2.exp b/testsuite/lib/stap_run2.exp
index 9849aefb..1d9dc0b3 100644
--- a/testsuite/lib/stap_run2.exp
+++ b/testsuite/lib/stap_run2.exp
@@ -15,7 +15,7 @@ proc stap_run2 { TEST_NAME args } {
if {[info procs installtest_p] != "" && ![installtest_p]} { untested $TEST_NAME; return }
- set cmd [concat stap $args $test_file_name]
+ set cmd [concat [stap_exec] $args $test_file_name]
catch {eval exec $cmd} res
set n 0
diff --git a/testsuite/lib/stap_run_binary.exp b/testsuite/lib/stap_run_binary.exp
index 1d31d817..a5e1195a 100644
--- a/testsuite/lib/stap_run_binary.exp
+++ b/testsuite/lib/stap_run_binary.exp
@@ -13,7 +13,7 @@ proc stap_run_binary { TEST_NAME} {
if {[info procs installtest_p] != "" && ![installtest_p]} {untested $TEST_NAME; return}
set hex_args {-ve 8/1 "%02x " "\n"}
- set res [exec stap $test_file_name | hexdump $hex_args]
+ set res [exec [stap_exec] $test_file_name | hexdump $hex_args]
if {[string compare $res $::result_string] == 0} {
pass "$TEST_NAME"
diff --git a/testsuite/lib/stap_run_exact.exp b/testsuite/lib/stap_run_exact.exp
index 6a473798..23c22ec0 100644
--- a/testsuite/lib/stap_run_exact.exp
+++ b/testsuite/lib/stap_run_exact.exp
@@ -12,7 +12,7 @@
proc stap_run_exact { TEST_NAME test_file_name args } {
if {[info procs installtest_p] != "" && ![installtest_p]} { untested $TEST_NAME; return }
- set cmd [concat stap $args $test_file_name]
+ set cmd [concat [stap_exec] $args $test_file_name]
catch {eval exec $cmd} res
set n 0
diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp
index 0f6a69dd..e74bd13c 100644
--- a/testsuite/lib/systemtap.exp
+++ b/testsuite/lib/systemtap.exp
@@ -2,11 +2,29 @@ load_lib site.exp
proc installtest_p {} {
global TOOL_OPTIONS
- if {[info exists TOOL_OPTIONS] && ($TOOL_OPTIONS == "install")} {
+ if {[info exists TOOL_OPTIONS] && [string match "*install*" $TOOL_OPTIONS]} {
return 1
} else { return 0 }
}
+
+proc use_server_p {} {
+ global TOOL_OPTIONS
+ if {[info exists TOOL_OPTIONS] && [string match "*server*" $TOOL_OPTIONS]} {
+ return 1
+ } else { return 0 }
+}
+
+
+proc stap_exec {} {
+ if {[info procs use_server_p] != "" && [use_server_p]} then {
+ return "stap-client"
+ } else {
+ return "stap"
+ }
+}
+
+
proc print_systemtap_version {} {
set version [exec /bin/uname -r]
set location "/boot/vmlinux-$version"