summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.samples
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/systemtap.samples')
-rwxr-xr-xtestsuite/systemtap.samples/examples.exp12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/systemtap.samples/examples.exp b/testsuite/systemtap.samples/examples.exp
new file mode 100755
index 00000000..d8c43ecd
--- /dev/null
+++ b/testsuite/systemtap.samples/examples.exp
@@ -0,0 +1,12 @@
+foreach file [lsort [glob -nocomplain $srcdir/../examples/*.stp $srcdir/../examples/small_demos/*.stp]] {
+ set test [file tail $file]
+ switch $test {
+ {iostat-scsi.stp} {set cmd "stap -p4 $file 5"}
+ {sigmon.stp} {set cmd "stap -p4 -x 1234 $file SIGKILL"}
+ {keyhack.stp} {set cmd "stap -p4 -g $file"}
+ default {set cmd "stap -p4 $file"}
+ }
+ verbose -log "Running $cmd"
+ set rc [catch {eval "exec $cmd"} baz]
+ if {$rc} { fail $test; verbose -log $baz } else { pass $test }
+} \ No newline at end of file