View | Details | Raw Unified | Return to bug 8244
Collapse All | Expand All

(-)a/xt/find-undefined-subroutines.pl (-1 / +16 lines)
Lines 61-66 Usage: Link Here
61
    --dest-path|-d PATH     Where you want to build the hierarchy of tests
61
    --dest-path|-d PATH     Where you want to build the hierarchy of tests
62
                            scripts and modules. Leave empty to use a temporary
62
                            scripts and modules. Leave empty to use a temporary
63
                            directory (will be removed automatically)
63
                            directory (will be removed automatically)
64
    --ignore PATTERN        Ignore files with a name matching the specified
65
                            pattern (note that this will only match on a
66
                            single component of a filename so you cannot
67
                            choose to ignore only one of two files with
68
                            identical names).
69
                            Must be a valid regular expression
64
    --verbose|-v            Print some progress informations
70
    --verbose|-v            Print some progress informations
65
    --help|-h               Print this help message
71
    --help|-h               Print this help message
66
72
Lines 76-86 my $src_path; Link Here
76
my $dest_path;
82
my $dest_path;
77
my $verbose = 0;
83
my $verbose = 0;
78
my $help = 0;
84
my $help = 0;
85
my @ignore;
86
my $ignore_regex;
79
87
80
my $options_ok = GetOptions(
88
my $options_ok = GetOptions(
81
    'src-path=s' => \$src_path,
89
    'src-path=s' => \$src_path,
82
    'dest-path=s' => \$dest_path,
90
    'dest-path=s' => \$dest_path,
83
    'verbose' => \$verbose,
91
    'verbose' => \$verbose,
92
    'ignore=s' => \@ignore,
84
    'help' => \$help
93
    'help' => \$help
85
);
94
);
86
95
Lines 89-94 if ($help) { Link Here
89
    exit 0;
98
    exit 0;
90
}
99
}
91
100
101
if (@ignore) {
102
    $ignore_regex = '(' . join ('|', @ignore) . ')';
103
}
104
92
if (!$src_path) {
105
if (!$src_path) {
93
    $src_path = $src_path_default;
106
    $src_path = $src_path_default;
94
}
107
}
Lines 133-138 find( sub { Link Here
133
    return $File::Find::prune = 1 if ($_ =~ /^$dest_path$/);
146
    return $File::Find::prune = 1 if ($_ =~ /^$dest_path$/);
134
    return $File::Find::prune = 1 if ($_ =~ /^t$/);
147
    return $File::Find::prune = 1 if ($_ =~ /^t$/);
135
    return $File::Find::prune = 1 if ($_ =~ /^blib$/);
148
    return $File::Find::prune = 1 if ($_ =~ /^blib$/);
149
    return $File::Find::prune = 1 if ($ignore_regex and $_ =~ /$ignore_regex/);
136
    return unless $_ =~ m/\.pm$/;
150
    return unless $_ =~ m/\.pm$/;
137
    my $file = $File::Find::name;
151
    my $file = $File::Find::name;
138
    $file =~ s#^$src_path##;
152
    $file =~ s#^$src_path##;
Lines 258-263 my @scripts; Link Here
258
find( sub {
272
find( sub {
259
    return $File::Find::prune = 1 if ($_ =~ /^t$/);
273
    return $File::Find::prune = 1 if ($_ =~ /^t$/);
260
    return $File::Find::prune = 1 if ($_ =~ /^$dest_path$/);
274
    return $File::Find::prune = 1 if ($_ =~ /^$dest_path$/);
275
    return $File::Find::prune = 1 if ($ignore_regex and $_ =~ /$ignore_regex/);
261
    return unless $_ =~ m/\.pl$/;
276
    return unless $_ =~ m/\.pl$/;
262
    my $file = $File::Find::name;
277
    my $file = $File::Find::name;
263
    $file =~ s#^$src_path##;
278
    $file =~ s#^$src_path##;
Lines 389-391 my $includes_param = join(' ', map { "-I$_" } @includedirs); Link Here
389
my $scripts_param = join(' ', map { "$dest_path/$_" } @scripts_to_run);
404
my $scripts_param = join(' ', map { "$dest_path/$_" } @scripts_to_run);
390
405
391
system("prove $includes_param $scripts_param");
406
system("prove $includes_param $scripts_param");
392
- 
407
exit $? >> 8;

Return to bug 8244