summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2002-04-26 18:01:33 +0000
committerallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2002-04-26 18:01:33 +0000
commite883eb6a5c7e122d6c2a1990fdfe854de2780c61 (patch)
treef598a9453e327eb92df08799b697fc9bc8a9233c /lib
parentb310411cbcb24a657e29219c63d2491e337df05f (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')
-rw-r--r--lib/sbin/RunTest.pl20
-rw-r--r--lib/sbin/RunTestUtils.pl43
2 files changed, 44 insertions, 19 deletions
diff --git a/lib/sbin/RunTest.pl b/lib/sbin/RunTest.pl
index 08912f89..6963fa09 100644
--- a/lib/sbin/RunTest.pl
+++ b/lib/sbin/RunTest.pl
@@ -9,12 +9,12 @@ require "lib/sbin/RunTestUtils.pl";
$prompt = shift;
$prompt =~ tr/A-Z/a-z/;
$home_dir = shift;
-$config = shift;;
+$config = shift;
&PrintHeader;
# Set up RunTest configuration
-$config_data = &Configure($config,$home_dir);
+$config_data = &Configure($config,$home_dir,$prompt);
# Initialise testdata database
$testdata = &InitialiseTestData();
@@ -30,6 +30,8 @@ $testdata = &ParseAllParameterFiles($testdata);
# Print database
#&PrintDataBase($testdata);
+$haverunall = 0;
+
while ($choice !~ /^Q/i)
{
undef($thorn);
@@ -49,7 +51,16 @@ while ($choice !~ /^Q/i)
print " Compare all files in the test output directories [O]\n";
print " Customize testsuite checking [C]\n";
print " Quit [Q]\n\n";
- $choice = &defprompt(" Select choice: ","E");
+
+ if ($haverunall == 1)
+ {
+ $choice = &defprompt(" Select choice: ","Q");
+ }
+ else
+ {
+ $choice = &defprompt(" Select choice: ","E");
+ }
+
print "\n";
if ($choice =~ /^[EIO]/i)
@@ -82,6 +93,9 @@ while ($choice !~ /^Q/i)
# Write results of all tests
&WriteFullResults($rundata,$testdata);
+
+ $haverunall = 1;
+
}
elsif ($choice =~ /^[AT]/i)
{
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;
}