Browse Source

Implemented specification of delay and repeat count

Alois Mahdal 12 years ago
parent
commit
d11ff72bae
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      bin/autotest.pl

+ 5
- 3
bin/autotest.pl View File

@@ -22,8 +22,10 @@ use warnings;
22 22
 use File::Spec;
23 23
 
24 24
 my $PLATFORM    = (-d "c:\\windows" ? 'windows' : 'unix' );
25
+my $DELAY       = 5;
25 26
 my $COLORS      = { windows => { ok => 'color 0a', nok => 'color 0c' } };
26 27
 my $DUMPS       = "dumps";
28
+my $REPEAT      = 1;
27 29
 my $TESTS       = "t";
28 30
 
29 31
 
@@ -86,7 +88,7 @@ sub freakout {
86 88
 
87 89
 mkdir $DUMPS unless -d $DUMPS;
88 90
 
89
-while (1) {
91
+do {
90 92
     my @paths = glob "$TESTS/*.t";
91 93
     &clear;
92 94
     color "ok";
@@ -97,6 +99,6 @@ while (1) {
97 99
     } else {
98 100
         &freakout();
99 101
     }
100
-    sleep 5;
101
-}
102
+    sleep $DELAY if $REPEAT;
103
+} while ($REPEAT);
102 104