From 1cde83a3abd3d16e32bce7ec96629db339d60fa8 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Wed, 1 Dec 2010 08:59:07 +0000 Subject: * interp/sys-driver.boot (executeSpadScript): Handle --test option. * interp/setvars.boot (setOutputAlgebra): Control informative message about algebra stream redirection by $verbose. --- src/interp/setvars.boot | 3 ++- src/interp/sys-driver.boot | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src/interp') diff --git a/src/interp/setvars.boot b/src/interp/setvars.boot index ed8423ab..d53769a6 100644 --- a/src/interp/setvars.boot +++ b/src/interp/setvars.boot @@ -1016,7 +1016,8 @@ setOutputAlgebra arg == SHUT $algebraOutputStream $algebraOutputStream := testStream $algebraOutputFile := object2String filename - sayKeyedMsg("S2IV0004",['"Algebra",$algebraOutputFile]) + -- Inform of redirection only if verbosity is desired. + $verbose and sayKeyedMsg("S2IV0004",['"Algebra",$algebraOutputFile]) sayKeyedMsg("S2IV0003",[fn,ft,fm]) sayKeyedMsg("S2IV0005",NIL) diff --git a/src/interp/sys-driver.boot b/src/interp/sys-driver.boot index f450e397..80512847 100644 --- a/src/interp/sys-driver.boot +++ b/src/interp/sys-driver.boot @@ -252,7 +252,8 @@ executeSpadScript(progname,options,file) == $verbose: local := false initializeGlobalState() outfile := getOptionValue "output" - talkative := outfile or $verbose + testing := getOptionValue "test" + talkative := outfile or testing or $verbose setOutputAlgebra [(talkative => 'on; 'off)] -- FIXME: redirect standard output to null if not talkative $printVoidIfTrue: local := talkative @@ -264,6 +265,9 @@ executeSpadScript(progname,options,file) == if outfile ~= nil then setOutputAlgebra [outfile] setStandardOutputToAlgebraStream() + -- Accomodate for testsuite stream. + if testing then + set ["message","testing","on"] CATCH($intCoerceFailure, CATCH($SpadReaderTag,read [file])) coreQuit (errorCount()> 0 => 1; 0) -- cgit v1.2.3