Commits

Palmer, 2E0EOL committed 963e573 Draft

check_disks_zpool; Sort the execution order of the unit tests.

  • Participants
  • Parent commits 57a3cda
  • Branches develop

Comments (0)

Files changed (1)

File 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)\_(\w+)\.txt$/ ) {
 				my $filename = "$testdir/$ent";
 				my $expect_exit = $fn_ec_map{$2};
 				warn "Not running unit test $ent";
 			}
 		}
-		closedir($d);
 	}
 	return 0;
 }