summaryrefslogtreecommitdiffstats
path: root/tests/auto/test.pl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/test.pl')
-rwxr-xr-xtests/auto/test.pl41
1 files changed, 14 insertions, 27 deletions
diff --git a/tests/auto/test.pl b/tests/auto/test.pl
index 7c3708472c..48166e1c30 100755
--- a/tests/auto/test.pl
+++ b/tests/auto/test.pl
@@ -138,35 +138,22 @@ sub handleDir {
my ($dir) = @_;
my $currentDir = getcwd();
- chdir($dir) || die("Could not chdir to $dir");
- my @components;
- my $command;
- @components = split(/\//, $dir);
- my $component = $components[$#components];
-
- $command = "tst_".$component;
-
- if ( -e $command.$EXE_SUFFIX )
- {
- executeTestCurrentDir($command);
- } else {
- opendir(DIR, $dir);
- my @files = readdir(DIR);
- closedir DIR;
- my $file;
- foreach $file (@files)
- {
- #skip hidden files
- next if (substr($file,0,1) eq ".");
-
- if ( -d $dir."/".$file)
- {
- handleDir($dir."/".$file)
- }
-
+ opendir(DIR, $dir);
+ my @files = readdir(DIR);
+ closedir DIR;
+ my $file;
+ foreach $file (@files) {
+ #skip hidden files
+ next if (substr($file,0,1) eq ".");
+
+ if ( -d $dir."/".$file) {
+ handleDir($dir."/".$file)
+ } elsif ( $file =~ /^tst_/ and -x $dir."/".$file ) {
+ chdir($dir) || die("Could not chdir to $dir");
+ executeTestCurrentDir($file);
+ chdir($currentDir);
}
}
- chdir($currentDir);
}
sub executeTestCurrentDir {