Commits

Palmer, 2E0EOL committed dd24059 Draft Merge

Merge unit test sorting

Comments (0)

Files changed (1)

t/check_disks_zpool.t

 
 	my $testdir = 'testdata/check_disks_zpool';
 	if ( opendir(my $d, $testdir) ) {
+		my @dentries = ( );
 		while ( my $ent = readdir($d) ) {
 			next if ( $ent =~ m/^\./ );
+			push(@dentries, $ent);
+		}
+		closedir($d);
+
+		foreach my $ent ( sort(@dentries) ) {
 			if ( $ent =~ m/^(\d{1,2})\_(\w+)\.txt$/ ) {
 				my $filename = "$testdir/$ent";
 				my $expect_exit = $fn_ec_map{$2};
 				warn "Not running unit test $ent";
 			}
 		}
-		closedir($d);
 	}
 	return 0;
 }