diff options
author | Nicholas Clark <nick@ccl4.org> | 2013-07-18 16:57:00 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2013-07-24 09:00:50 +0200 |
commit | 0daf6d09beaca77160cb8901e5f9ec1b050e88e8 (patch) | |
tree | b4d75d1e933eaf9aa0bf563449b8ee4c72ea6602 /regen.pl | |
parent | 32388cc3cb865653dde65b60b7ef1b606123c64a (diff) | |
download | perl-0daf6d09beaca77160cb8901e5f9ec1b050e88e8.tar.gz |
Refactor t/porting/regen.t to check everything (and the return values!).
Previously it was fire-and-forget for the 3 programs it ran (and for the
programs that regen.pl ran). Now we die if any program fails to return 0.
Also regen.t had an explicit list of programs to test. It turned out that it
was not testing regen/mk_invlists.pl. Now regen.t has a skip list of what
not to test, and everything not skipped it tested. This way any new
additions will not get missed.
This was implemented by refactoring regen.pl to read the list of programs it
runs from <DATA>, so that regen.t can open regen.pl to extract the same
list.
Diffstat (limited to 'regen.pl')
-rw-r--r-- | regen.pl | 18 |
1 files changed, 8 insertions, 10 deletions
@@ -13,9 +13,15 @@ require 5.004; # keep this compatible, an old perl is all we may have before use strict; -# Which scripts to run. +my $tap = $ARGV[0] && $ARGV[0] eq '--tap' ? '# ' : ''; +foreach my $pl (map {chomp; "regen/$_"} <DATA>) { + my @command = ($^X, $pl, @ARGV); + print "$tap@command\n"; + system @command + and die "@command failed: $?" +} -my @scripts = qw( +__END__ mg_vtable.pl opcode.pl overload.pl @@ -24,11 +30,3 @@ regcomp.pl warnings.pl embed.pl feature.pl -); - -my $tap = $ARGV[0] && $ARGV[0] eq '--tap' ? '# ' : ''; -foreach my $pl (map {"regen/$_"} @scripts) { - my @command = ($^X, $pl, @ARGV); - print "$tap@command\n"; - system @command; -} |