59
59
60
60
sub test ($$$$$) {
61
61
my ($name , $test , $t_level , $cmd , $ign ) = @_ ;
62
- my ($level , $input , $options , @results ) = load(" $name / $ test" );
62
+ my ($level , $input , $options , @results ) = load(" $test " );
63
63
$options =~ s / $ign// g if (defined ($ign ));
64
64
65
65
my $output = $input ;
@@ -107,7 +107,7 @@ ($$$$$)
107
107
my $r ;
108
108
$result =~ s /\\ / \\\\ / g ;
109
109
$result =~ s / ([^\\ ])\$ / $1 \\ r\\\\ ?\$ / ;
110
- system (" bash" , " -c" , " grep \$ '$result ' ' $name /$output ' >/dev/null" );
110
+ system (" bash" , " -c" , " grep \$ '$result ' \" $name /$output \" >/dev/null" );
111
111
$r = ($included ? $? != 0 : $? == 0);
112
112
if ($r ) {
113
113
print LOG " $result [FAILED]\n " ;
@@ -212,7 +212,11 @@ ($$$$)
212
212
213
213
print " Loading\n " ;
214
214
my @tests = @ARGV != 0 ? @ARGV : dirs();
215
- my $count = @tests ;
215
+ my $count = 0;
216
+ for (@tests ){
217
+ my @testfiles = glob " $_ /*desc" ;
218
+ $count += $#testfiles +1;
219
+ }
216
220
print " $count " . (1==$count ?" test" :" tests" ) . " found\n\n " ;
217
221
218
222
use Cwd qw( getcwd) ;
@@ -225,20 +229,22 @@ ($)
225
229
{
226
230
my ($test ) = @_ ;
227
231
my $failed_skipped = 0;
228
-
229
- defined ($pool ) or print " Running $test " ;
230
- $failed_skipped = test($test , " test.desc" , $t_level , $opt_c , $opt_i );
231
-
232
- lock($skips );
233
- defined ($pool ) and print " Running $test " ;
234
- if (2 == $failed_skipped ) {
235
- $skips ++;
236
- print " [SKIPPED]\n " ;
237
- } elsif (0 == $failed_skipped ) {
238
- print " [OK]\n " ;
239
- } else {
240
- $failures ++;
241
- print " [FAILED]\n " ;
232
+ my @files = glob " $test /*.desc" ;
233
+ for (0..$#files ){
234
+ defined ($pool ) or print " Running $files [$_ ]" ;
235
+ $failed_skipped = test($test , $files [$_ ], $t_level , $opt_c , $opt_i );
236
+
237
+ lock($skips );
238
+ defined ($pool ) and print " Running $test $files [$_ ]" ;
239
+ if (2 == $failed_skipped ) {
240
+ $skips ++;
241
+ print " [SKIPPED]\n " ;
242
+ } elsif (0 == $failed_skipped ) {
243
+ print " [OK]\n " ;
244
+ } else {
245
+ $failures ++;
246
+ print " [FAILED]\n " ;
247
+ }
242
248
}
243
249
}
244
250
0 commit comments