|
Revision 523, 511 bytes
(checked in by pennmush, 2 years ago)
|
|
PennMUSH 1.8.1p6 Archival
|
| Line | |
|---|
| 1 | #!/usr/bin/perl |
|---|
| 2 | |
|---|
| 3 | my $total_failed = 0; |
|---|
| 4 | |
|---|
| 5 | for my $file (<test*.pl>) { |
|---|
| 6 | print "Running $file ... "; |
|---|
| 7 | # This might be 'do' one day, but not until we get output right |
|---|
| 8 | my $output = `perl $file 2> /dev/null`; |
|---|
| 9 | $output =~ s/.*\D(\d+ tests, \d+ succeeded, (\d+) failed).*/$1/s; |
|---|
| 10 | print "$output\n"; |
|---|
| 11 | $total_failed += $2; |
|---|
| 12 | print " Try running the test manually (perl $file) to see failures\n" if $2; |
|---|
| 13 | } |
|---|
| 14 | |
|---|
| 15 | if ($total_failed) { |
|---|
| 16 | print "*** $total_failed tests failed\n"; |
|---|
| 17 | } else { |
|---|
| 18 | print "All tests successful\n"; |
|---|
| 19 | } |
|---|