summaryrefslogtreecommitdiff
path: root/lib/sbin/RunTest.pl
diff options
context:
space:
mode:
authorallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2002-04-14 16:25:56 +0000
committerallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2002-04-14 16:25:56 +0000
commit839034e9c22b67d0977747e860ebb767d6fec5af (patch)
tree7e40a619629cb3524db060cda1e554b2f70b9902 /lib/sbin/RunTest.pl
parentebe169c20aa6be2ad8a73e569518d4c40aed9065 (diff)
Change to user interface. Unfortunately now I replaced the choice
"All" with "Entire" so as not to clash with "Arrangement", but the default is still to run all tests so it shouldn't be too bad. Will add soon an option to run all the tests for a thorn/arrangement. Closes Cactus/802 git-svn-id: http://svn.cactuscode.org/flesh/trunk@2717 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/RunTest.pl')
-rw-r--r--lib/sbin/RunTest.pl156
1 files changed, 65 insertions, 91 deletions
diff --git a/lib/sbin/RunTest.pl b/lib/sbin/RunTest.pl
index a3f13eb8..a317d277 100644
--- a/lib/sbin/RunTest.pl
+++ b/lib/sbin/RunTest.pl
@@ -43,121 +43,95 @@ else
# Parse test parameter files
%testdata = &ParseAllParameterFiles(%testdata);
-# Reset/Initialise Test Statistics
-%testdata = &ResetTestStatistics(%testdata);
-
# Print database
#&PrintDataBase(%testdata);
-$loop = 1;
-$run = 1;
-
-$tests = &defprompt(" Run All tests or go to Menu","All");
-while ($loop == 1)
+while ($choice !~ /^Q/i)
{
- if ($tests =~ /^A/i)
+ undef($thorn);
+ undef($test);
+ undef($choice);
+
+ while (!($choice =~ /^Q/i) )
{
- # Run all parameter files
- foreach $thorn (split(" ",$testdata{"RUNNABLETHORNS"}))
+
+ print " --- Menu ---\n\n";
+
+ print " Run entire set of tests [E]\n";
+ print " Choose test from [T]horn or [A]rrangement\n";
+ print " Rerun previous test [R]\n";
+ 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 ($choice =~ /^[EO]/i)
{
- foreach $test (split(" ",$testdata{"$thorn RUNNABLE"}))
- {
- print " Test $thorn: $test \n";
- print " \"$testdata{\"$thorn $test DESC\"}\"\n";
- if ($run)
- {
- %testdata = &RunTest($test,$thorn,%testdata);
- }
- %testdata = &CompareTestFiles($test,$thorn,%testdata);
- }
- }
-
- # Write results of all tests
- &WriteFullResults(%testdata);
-
- $loop = 0;
- }
- elsif ($tests =~ /^M/i)
- {
- undef($thorn);
- undef($test);
- undef($choice);
- while (!($choice =~ /^[EOQ]/i) )
- {
+ # Reset/Initialise Test Statistics
+ %testdata = &ResetTestStatistics(%testdata);
- print "\n --- Menu ---\n\n";
-
- print " Choose test from [T]horn or [A]rrangement\n";
- print " Rerun previous test [R]\n";
- print " Run entire set of tests [E]\n";
- 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: ","T");
-
- if ($choice =~ /^[ATC]/i)
- {
- ($test,$thorn) = &ChooseTest($choice,%testdata);
- %testdata = &RunTest($test,$thorn,%testdata);
- %testdata = &CompareTestFiles($test,$thorn,%testdata);
- }
- elsif ($choice =~ /^R/i)
+ # Run all parameter files
+ foreach $thorn (split(" ",$testdata{"RUNNABLETHORNS"}))
{
- if ($thorn && $test)
+ foreach $test (split(" ",$testdata{"$thorn RUNNABLE"}))
{
- print " Running $thorn: $test \n";
+ print " Test $thorn: $test \n";
print " \"$testdata{\"$thorn $test DESC\"}\"\n";
- %testdata = &RunTest($test,$thorn,%testdata);
+ if ($choice =~ /^O/i)
+ {
+ %testdata = &RunTest($test,$thorn,%testdata);
+ }
%testdata = &CompareTestFiles($test,$thorn,%testdata);
}
- else
- {
- print " No previous test has been run\n";
- }
}
- elsif ($choice =~ /^C/i)
- {
- print " Options for customization\n";
- if ($test)
- {
- print " Change tolerance for this run ($test) [R]\n";
- }
- print " Change tolerance from $testdata{\"TOLERANCE\"} for all further runs [T]\n";
- $choice = &defprompt(" Select choice: ","");
- if ($choice =~ /T/i)
- {
- $testdata{"TOLERANCE"} = &defprompt(" New tolerance: ","$testdata{\"TOLERANCE\"}");
- }
- }
- elsif ($choice =~ /^Q/i)
+
+ # Write results of all tests
+ &WriteFullResults(%testdata);
+ }
+ elsif ($choice =~ /^[AT]/i)
+ {
+ ($test,$thorn) = &ChooseTest($choice,%testdata);
+ %testdata = &RunTest($test,$thorn,%testdata);
+ %testdata = &CompareTestFiles($test,$thorn,%testdata);
+ }
+ elsif ($choice =~ /^R/i)
+ {
+ if ($thorn && $test)
{
- $loop = 0;
+ print " Running $thorn: $test \n";
+ print " \"$testdata{\"$thorn $test DESC\"}\"\n";
+ %testdata = &RunTest($test,$thorn,%testdata);
+ %testdata = &CompareTestFiles($test,$thorn,%testdata);
}
- elsif ($choice =~ /^E/i)
+ else
{
- $tests = "A";
+ print " No previous test has been run\n";
}
- elsif ($choice =~ /^O/i)
+ }
+ elsif ($choice =~ /^C/i)
+ {
+ print " Options for customization\n";
+ if ($test)
{
- $tests = "A";
- $run = 0;
+ print " Change tolerance for this run ($test) [R]\n";
}
- else
+ print " Change tolerance from $testdata{\"TOLERANCE\"} for all further runs [T]\n";
+ $choice = &defprompt(" Select choice: ","");
+ if ($choice =~ /T/i)
{
- print " Choice not recognized, try again!\n";
+ $testdata{"TOLERANCE"} = &defprompt(" New tolerance: ","$testdata{\"TOLERANCE\"}");
}
}
+ elsif ($choice =~ /^Q/i)
+ {
+ $loop = 0;
+ }
+ else
+ {
+ print " Choice not recognized, try again!\n";
+ }
}
- elsif ($tests =~ /^Q/i)
- {
- $loop = 0;
- }
- else
- {
- print " Choice not recognized, try again!\n";
- }
-
print "\n";
}