/[suikacvs]/messaging/manakai/bin/domts2perl.pl
Suika

Contents of /messaging/manakai/bin/domts2perl.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Sun Oct 10 06:09:47 2004 UTC (20 years ago) by wakaba
Branch: MAIN
File MIME type: text/plain
domtest2perl.pl: New

1 wakaba 1.1 #!/usr/bin/perl -w
2     use strict;
3    
4     use Getopt::Long;
5     my $dir;
6     my $out_dir;
7     my $file_pattern;
8     GetOptions (
9     'test-directory=s' => \$dir,
10     'test-file-pattern=s' => \$file_pattern,
11     'output-directory=s' => \$out_dir,
12     );
13     $dir or die "$0: test-directory must be specified";
14     $out_dir or die "$0: output-directory must be specified";
15     $file_pattern ||= qr/\.xml$/;
16    
17     opendir my $dirh, $dir or die "$0: $dir: $!";
18     for (grep {$_ ne 'alltests.xml'} grep /$file_pattern/, readdir $dirh) {
19     my @cmd = ('perl', map ({"-I$_"} @INC),
20     'domtest2perl.pl', $dir.'/'.$_,
21     '--output-file' => $out_dir.'/'.$_.'.pl');
22     print STDERR join " ", @cmd, "\n";
23     system @cmd and die "$0: domtest2perl.pl: $@";
24     }

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24