From a238792343eba4fc3a752f8f44bd3ff99472ed33 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Mon, 11 Aug 2008 17:18:32 +0200 Subject: Redirect stderr gets redircted so warnings don't let example script run fail. --- testsuite/systemtap.examples/check.exp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'testsuite/systemtap.examples/check.exp') diff --git a/testsuite/systemtap.examples/check.exp b/testsuite/systemtap.examples/check.exp index 14d9a57e..482738cc 100644 --- a/testsuite/systemtap.examples/check.exp +++ b/testsuite/systemtap.examples/check.exp @@ -36,7 +36,10 @@ 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] + # Pipe both stdout and stderr to cat, otherwise any stderr + # output results in res being set to 1 (TCL_ERROR). This breaks + # scripts that have WARNINGS about for example skipped probes. + set res [catch {eval exec "$command |& cat"} value] verbose -log "OUT $value" verbose -log "RC $res" if {$res != 0 } { -- cgit