summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.examples
diff options
context:
space:
mode:
authorWilliam Cohen <wcohen@redhat.com>2008-08-01 15:52:44 -0400
committerWilliam Cohen <wcohen@redhat.com>2008-08-01 15:52:44 -0400
commitb4b53623632241970e1f3553e09332cdc5c754a0 (patch)
tree9aeb3b23a95118ede9ad23ba2ce5ff38d0daf053 /testsuite/systemtap.examples
parent161be0d9d13449d74de97327786dde83da24bd86 (diff)
downloadsystemtap-steved-b4b53623632241970e1f3553e09332cdc5c754a0.tar.gz
systemtap-steved-b4b53623632241970e1f3553e09332cdc5c754a0.tar.xz
systemtap-steved-b4b53623632241970e1f3553e09332cdc5c754a0.zip
Run both tests for installcheck tests.
Diffstat (limited to 'testsuite/systemtap.examples')
-rw-r--r--testsuite/systemtap.examples/ChangeLog4
-rw-r--r--testsuite/systemtap.examples/check.exp44
2 files changed, 27 insertions, 21 deletions
diff --git a/testsuite/systemtap.examples/ChangeLog b/testsuite/systemtap.examples/ChangeLog
index d75ad014..5d123cb7 100644
--- a/testsuite/systemtap.examples/ChangeLog
+++ b/testsuite/systemtap.examples/ChangeLog
@@ -1,3 +1,7 @@
+2008-08-01 William Cohen <wcohen@redhat.com>
+
+ * check.exp: Run both tests for installcheck tests.
+
2008-07-11 Mark Wielaard <mwielaard@redhat.com>
* traceio.meta: s/decending/descending/ in description.
diff --git a/testsuite/systemtap.examples/check.exp b/testsuite/systemtap.examples/check.exp
index 2ac43050..14d9a57e 100644
--- a/testsuite/systemtap.examples/check.exp
+++ b/testsuite/systemtap.examples/check.exp
@@ -32,6 +32,23 @@ proc extract_tag { META_DATA TAG } {
return $value
}
+proc run_command { test command } {
+ #FIXME tcl says that single quotes not dealt with
+ if { $command != "" } then {
+ verbose -log "attempting command $command"
+ set res [catch {eval exec $command} value]
+ verbose -log "OUT $value"
+ verbose -log "RC $res"
+ if {$res != 0 } {
+ fail $test
+ } else {
+ pass $test
+ }
+ } else {
+ untested $test
+ }
+}
+
set curdir [pwd]
set src_examples $srcdir/systemtap.examples
@@ -39,36 +56,21 @@ set meta_files [lsort [exec find $src_examples -path "*.meta"]]
foreach file $meta_files {
set dir [file dirname $file]
set test [regsub {.*/testsuite/} $file ""]
+ set test [regsub {.meta} $test ""]
cd $dir
set meta_data [get_meta_data $file]
set test_check [extract_tag "$meta_data" "test_check"]
+ set command $test_check
+ run_command "$test build" $command
set test_installcheck [extract_tag "$meta_data" "test_installcheck"]
- # Would like to run the tests (-p5), but pass fail logic too
- # simple and fails for many examples
- # FIXME following line prevents installcheck with "--tools_opts install"
- set test_installcheck ""
+ # The pass/fail logic too simple and fails for some examples
+ # FIXME would like to be able to run more complicated test code
if {[info procs installtest_p] != "" && [installtest_p]
&& $test_installcheck != "" } then {
set command $test_installcheck
- } else {
- set command $test_check
- }
-
- #FIXME tcl says that single quotes not dealt with
- if { $command != "" } then {
- verbose -log "attempting command $command"
- set res [catch {eval exec $command} value]
- verbose -log "OUT $value"
- verbose -log "RC $res"
- if {$res != 0 } {
- fail $test
- } else {
- pass $test
- }
- } else {
- untested $test
+ run_command "$test run" $command
}
}