diff options
author | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2002-04-27 18:01:27 +0000 |
---|---|---|
committer | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2002-04-27 18:01:27 +0000 |
commit | d27cb3b6fe35b2f202d034575b9ca6a17f50b9bb (patch) | |
tree | 6f19016b6f45cfe3e4f5b40deff8f817961c8ee1 /lib/sbin/RunTestUtils.pl | |
parent | 01fe2fe97dbfea193ae3f7aea73b2a7a355b2414 (diff) |
Added an option to rerun a test but show the Cactus output on screen
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2765 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/RunTestUtils.pl')
-rw-r--r-- | lib/sbin/RunTestUtils.pl | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/sbin/RunTestUtils.pl b/lib/sbin/RunTestUtils.pl index e1a70046..6f4d9823 100644 --- a/lib/sbin/RunTestUtils.pl +++ b/lib/sbin/RunTestUtils.pl @@ -371,7 +371,7 @@ sub CleanDir sub RunCactus { - my($testname,$command) = @_; + my($output,$testname,$command) = @_; my($retcode); printf "\n Issuing $command\n"; @@ -381,13 +381,16 @@ sub RunCactus while (<CMD>) { - print LOG; + print LOG if ($output =~ /log/); + print STDOUT if ($output =~ /stdout/); if( /Cactus exiting with return code (.*)/) { $retcode = $1 + 0; } } + print STDOUT "\n\n" if ($output =~ /stdout/); + close LOG; close CMD; $retcode = $? >> 8 if($retcode==0); @@ -744,7 +747,7 @@ sub ChooseTests sub RunTest { - my ($test,$inthorn,$config_data,$testdata) = @_; + my ($output,$test,$inthorn,$config_data,$testdata) = @_; my ($test_dir,$config); my ($retcode); @@ -767,7 +770,7 @@ sub RunTest chdir ($testdata->{"$inthorn $test TESTRUNDIR"}) ; $cmd = "$config_data->{\"COMMAND\"} $config_data->{\"EXE\"} $testdata->{\"$inthorn TESTSDIR\"}${sep}$parfile"; - $retcode = &RunCactus($test,$cmd); + $retcode = &RunCactus($output,$test,$cmd); chdir $config_data->{"CCTK_DIR"}; # Deal with the error code @@ -1205,7 +1208,7 @@ sub ViewResults $myfile = &defprompt(" Choose file by number or [c]ontinue","c"); - while ($myfile !~ /^c/i && $choice !~ /^c/i) + while ($myfile !~ /^[c]/i && $choice !~ /^[c]/i) { $choice = &defprompt(" Choose action [l]ist, [d]iff, [g]raph, [c]ontinue","c"); @@ -1248,6 +1251,8 @@ sub ViewResults } } + return; + } 1; |