This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Deparse: Emit package before use
[perl5.git] / t / TEST
diff --git a/t/TEST b/t/TEST
index 8026c53..7c26372 100755 (executable)
--- a/t/TEST
+++ b/t/TEST
@@ -1,4 +1,4 @@
-#!./perl -w
+#!./perl
 
 # This is written in a peculiar style, since we're trying to avoid
 # most of the constructs we'll be testing for.  (This comment is
@@ -14,6 +14,9 @@
 # In which case, we need to stop t/TEST actually running tests, as all
 # t/harness needs are its subroutines.
 
+# Measure the elapsed wallclock time.
+my $t0 = time();
+
 # If we're doing deparse tests, ignore failures for these
 my $deparse_failures;
 
@@ -108,7 +111,7 @@ my %skip = (
           );
 
 
-if ($::do_nothing || $::do_nothing) { # set by harness b4 requiring us
+if ($::do_nothing) {
     return 1;
 }
 
@@ -163,8 +166,7 @@ if ($show_elapsed_time) { require Time::HiRes }
 my %timings = (); # testname => [@et] pairs if $show_elapsed_time.
 
 # Roll your own File::Find!
-our @found;
-sub _find_tests { @found = (); push @ARGV, _find_files('\.t$', $_[0]) }
+sub _find_tests { our @found=(); push @ARGV, _find_files('\.t$', $_[0]) }
 sub _find_files {
     my($patt, @dirs) = @_;
     for my $dir (@dirs) {
@@ -779,6 +781,7 @@ SHRDLU_5
            }
        }
     }
+    printf "Elapsed: %d sec\n", time() - $t0;
     my ($user,$sys,$cuser,$csys) = times;
     my $tot = sprintf("u=%.2f  s=%.2f  cu=%.2f  cs=%.2f  scripts=%d  tests=%d",
                      $user,$sys,$cuser,$csys,$tested_files,$totmax);