From 0ecbca4cb58a9fc7057ff44cc4693010e7c3c7b7 Mon Sep 17 00:00:00 2001 From: fche Date: Sat, 9 Sep 2006 22:30:43 +0000 Subject: 2006-09-09 Frank Ch. Eigler * lib/systemtap.exp (stap_run_batch): New helper routine. * systemtap.pass1-4/*.exp: Use it instead of catch/exec/>>& hack. --- testsuite/lib/systemtap.exp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'testsuite/lib') diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp index 6bb578b4..888c685d 100644 --- a/testsuite/lib/systemtap.exp +++ b/testsuite/lib/systemtap.exp @@ -54,8 +54,16 @@ proc setup_systemtap_environment {} { setup_systemtap_environment print_systemtap_version - proc systemtap_init {args} {} proc systemtap_version {} {} proc systemtap_exit {} {} + +proc stap_run_batch {args} { + verbose -log "starting $args" + spawn $args + expect { -re .* { verbose -log $expect_out(1,string); exp_continue } eof { } } + set results [wait] + verbose -log "wait results: $results" + return [lindex $results 3] +} \ No newline at end of file -- cgit