diff options
author | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2002-04-26 18:01:33 +0000 |
---|---|---|
committer | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2002-04-26 18:01:33 +0000 |
commit | e883eb6a5c7e122d6c2a1990fdfe854de2780c61 (patch) | |
tree | f598a9453e327eb92df08799b697fc9bc8a9233c /lib/sbin/RunTestUtils.pl | |
parent | b310411cbcb24a657e29219c63d2491e337df05f (diff) |
Added back prompt command to scripts this means that
gmake <config>-testsuite PROMPT=no
will run through with the defaults for everything, including running all
the tests, and then stop.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2757 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/RunTestUtils.pl')
-rw-r--r-- | lib/sbin/RunTestUtils.pl | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/lib/sbin/RunTestUtils.pl b/lib/sbin/RunTestUtils.pl index a7109d33..ec674baf 100644 --- a/lib/sbin/RunTestUtils.pl +++ b/lib/sbin/RunTestUtils.pl @@ -1,11 +1,14 @@ sub Configure { - my($config,$home_dir) = @_; + my($config,$home_dir,$prompt) = @_; my($configs_dir,$tests_dir); # Cactus home directory $config_data->{"CCTK_DIR"} = $home_dir; + # Interactive of not + $config_data->{"PROMPT"} = $prompt; + # Cactus configurations directory if($ENV{"CONFIGS_DIR"}) { @@ -259,20 +262,27 @@ sub defprompt my ($pr, $de) = @_; my ($res); - print "$pr [$de] \n"; - print " --> "; - - $res = <STDIN> if ($prompt eq "yes"); - if ($res =~ m/^$/) + if ($config_data->{"PROMPT"} eq "no") { $res = $de; } - elsif ($res =~ m/^ $/) + else { - $res = ""; + print "$pr [$de] \n"; + print " --> "; + + $res = <STDIN> if ($prompt eq "yes"); + if ($res =~ m/^$/) + { + $res = $de; + } + elsif ($res =~ m/^ $/) + { + $res = ""; + } + $res =~ s/\n//; + print "\n"; } - $res =~ s/\n//; - print "\n"; return $res; } @@ -439,13 +449,14 @@ sub WriteFullResults my ($rundata,$testdata) = @_; my ($separator,$show_warnings); - $separator = "==========================================================\n\n"; + $separator1 = "========================================================================\n\n"; + $separator2 = "------------------------------------------------------------------------\n\n"; $show_warnings = 1; if ($show_warnings) { - print $separator; + print $separator2; print " Warnings for configuration $config\n --------\n\n"; # Missing thorns for tests @@ -491,7 +502,7 @@ sub WriteFullResults } - print $separator; + print $separator2; print " Testsuite Summary for configuration $config\n"; print " -----------------\n\n"; @@ -536,7 +547,7 @@ sub WriteFullResults print "$nottested\n\n"; } - print $separator; + print $separator2; print " Run details for configuration $config\n\n"; @@ -556,7 +567,7 @@ sub WriteFullResults } print "\n"; - print $separator; + print $separator1; print " Summary for configuration $config\n\n"; @@ -587,7 +598,7 @@ sub WriteFullResults print "\n"; - print $separator; + print $separator1; } |