- Timestamp:
- 11/04/08 21:11:14 (2 months ago)
- Files:
-
- 1 modified
-
src/perl6/ETOOMUCHTIME (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/perl6/ETOOMUCHTIME
r22844 r22882 4 4 use warnings; 5 5 use English; 6 use feature qw(say); 6 7 use Benchmark; 7 8 use File::Path; … … 24 25 WARNING 25 26 27 #add a sanity check to make sure STD.pm is correctly built 28 unless(-r 'lex') { 29 die "Could not find 'lex' directory. Maybe you forgot to 'make'\n"; 30 } 31 unless(-r 'STD.pmc') { 32 die "Could not find 'STD.pmc'. Maybe your forgot to 'make'\n"; 33 } 34 26 35 my $dir_to_test = shift @ARGV || '../../t/spec/'; 27 36 my $fail = 0; 28 37 my $success = 0; 29 print "Finding *.t in $dir_to_test... Please wait\n";38 say "Finding *.t in $dir_to_test... Please wait"; 30 39 my @files = sort `find $dir_to_test -name '*.t'`; 31 40 chomp(@files); … … 33 42 34 43 my $total = 0+@files; 35 print "Going to run $total tests... Maybe watch a movie meanwhile?\n";44 say "Going to run $total tests... Maybe watch a movie meanwhile?"; 36 45 37 46 my $HILITE = "STD_syntax_highlight"; … … 58 67 "--full-html=$full_html $file"; 59 68 my $log = `$cmd 2>&1`; 60 print"It took " .61 timestr(timediff(new Benchmark,$t0),"nop") . "\n";69 say "It took " . 70 timestr(timediff(new Benchmark,$t0),"nop"); 62 71 63 72 if ($CHILD_ERROR) { … … 67 76 # catch those pesky CTRL-Cs 68 77 if($CHILD_ERROR &= 127) { 69 print "CTRL-C detected... bye bye\n";78 say "CTRL-C detected... bye bye"; 70 79 last; 71 80 } … … 92 101 print FULL_HTML $error_html; 93 102 close FULL_HTML; 94 103 say "error"; 95 104 } else { 96 105 $success++; 97 print "ok\n";106 say "ok"; 98 107 } 99 108 } 100 109 101 110 printf "\nPassed $success/$total, %6.2f%%\n", $success/$total * 100; 102 print"It took " .103 timestr(timediff(new Benchmark,$start_time),"noc") . "\n";111 say "It took " . 112 timestr(timediff(new Benchmark,$start_time),"noc"); 104 113 105 114 if (@failed) { 106 print "Failed tests:\n";115 say "Failed tests:"; 107 116 for my $file (@failed) { 108 print "$file\n";117 say $file; 109 118 } 110 119 } 111 120 112 121 #Copy javascript/css files and inform the user 113 print "\nCopying javascript and css files to html directory..\n";122 say "\nCopying javascript and css files to html directory.."; 114 123 copy("$HILITE.js","html/$HILITE.js") or die "Could not copy: $OS_ERROR\n"; 115 124 copy("$JQUERY_JS", "html/$JQUERY_JS") or die "Could not copy: $OS_ERROR\n"; 116 125 copy("$HILITE.css", "html/$HILITE.css") or die "Could not copy: $OS_ERROR\n"; 117 print "\nThe output is now in the html directory. Thanks for your time ;-)\n";126 say "\nThe output is now in the html directory. Thanks for your time ;-)"; 118 127
