diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-03-13 14:44:54 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-03-13 14:44:54 +0100 |
commit | fafd79e3a65854c8e7b3c0048e044af9741a0fff (patch) | |
tree | 8c04e970890c08164a87a0ba40d4db0455a44585 | |
parent | 96b030fe8a0bb0297d23638e2975a3e9eb2b85b6 (diff) | |
download | systemtap-steved-fafd79e3a65854c8e7b3c0048e044af9741a0fff.tar.gz systemtap-steved-fafd79e3a65854c8e7b3c0048e044af9741a0fff.tar.xz systemtap-steved-fafd79e3a65854c8e7b3c0048e044af9741a0fff.zip |
Introduce stap_run3 for distinct test names.
* testsuite/lib/stap_run2.exp: Add stap_run3, called from stap_run2.
* testsuite/systemtap.base/sdt.exp: Use stap_run3, for distinct test names.
-rw-r--r-- | testsuite/lib/stap_run2.exp | 23 | ||||
-rw-r--r-- | testsuite/systemtap.base/sdt.exp | 6 |
2 files changed, 21 insertions, 8 deletions
diff --git a/testsuite/lib/stap_run2.exp b/testsuite/lib/stap_run2.exp index cb1c6615..b734a1e7 100644 --- a/testsuite/lib/stap_run2.exp +++ b/testsuite/lib/stap_run2.exp @@ -10,12 +10,27 @@ proc stap_run2 { TEST_NAME args } { # zap the srcdir prefix - set test_file_name $TEST_NAME + set TEST_FILE $TEST_NAME set TEST_NAME [regsub {.*/testsuite/} $TEST_NAME ""] - + if {[llength $args] == 0} { + stap_run3 $TEST_NAME $TEST_FILE + } else { + stap_run3 $TEST_NAME $TEST_FILE $args + } +} + +# stap_run3 TEST_NAME TEST_FILE +# TEST_NAME is the name of the test as shown in PASS/FAIL/SKIPPED messages. +# TEST_FILE is the path to the current test +# Additional arguments are passed to stap as-is. +# +# global result_string must be set to the expected output + +proc stap_run3 { TEST_NAME TEST_FILE args } { if {[info procs installtest_p] != "" && ![installtest_p]} { untested $TEST_NAME; return } - - set cmd [concat stap $args $test_file_name] + + set cmd [concat stap $args $TEST_FILE] + send_log "executing: $cmd\n" catch {eval exec $cmd} res set n 0 diff --git a/testsuite/systemtap.base/sdt.exp b/testsuite/systemtap.base/sdt.exp index 74818beb..9e5dfc37 100644 --- a/testsuite/systemtap.base/sdt.exp +++ b/testsuite/systemtap.base/sdt.exp @@ -33,8 +33,7 @@ if { $res != "" } { } if {[installtest_p]} { -# XXX: we need distinct test names for these - stap_run2 $srcdir/$subdir/$test.stp -c ./$test.prog + stap_run3 "$test $extra_flag" $srcdir/$subdir/$test.stp -c ./$test.prog } else { untested "$test $extra_flag" } @@ -56,8 +55,7 @@ if { $res != "" } { } if {[installtest_p]} { -# XXX: we need distinct test names for these - stap_run2 $srcdir/$subdir/$test.stp -c ./$test.prog + stap_run3 "$test c++ $extra_flag" $srcdir/$subdir/$test.stp -c ./$test.prog } else { untested "$test c++ $extra_flag" } |