Permalink
Browse files

Remove .ph tests from perlivp

These tests were made optional in 2005 in commit 2a36bdc and
refer to files which are no longer generated during install.

To avoid confusion, the tests for these files have been removed.
  • Loading branch information...
xdg committed Jul 20, 2011
1 parent febdbc3 commit d08226e4eb246fd9184617a534f460a6d90a4d21
Showing with 3 additions and 70 deletions.
  1. +3 −70 utils/perlivp.PL
View
@@ -44,9 +44,8 @@ sub usage {
print << " EOUSAGE";
Usage:
- $0 [-a] [-p] [-v] | [-h]
+ $0 [-p] [-v] | [-h]
- -a Run all tests (default is to skip .ph tests)
-p Print a preface before each test telling what it will test.
-v Verbose mode in which extra information about test results
is printed. Test failures always print out some extra information
@@ -66,7 +65,7 @@ while ($ARGV[0] =~ /^-/) {
usage() if '?' =~ /\Q$flag/;
usage() if 'h' =~ /\Q$flag/;
usage() if 'H' =~ /\Q$flag/;
- usage("unknown flag: `$flag'") unless 'HhPpVva' =~ /\Q$flag/;
+ usage("unknown flag: `$flag'") unless 'HhPpVv' =~ /\Q$flag/;
warn "$0: `$flag' flag already set\n" if $opt{$flag}++;
}
shift;
@@ -330,62 +329,6 @@ else {
}
$tests_total++;
-
-if ($opt{'a'}) {
-print "## Checking installations of *.h -> *.ph header files.\n" if $opt{'p'};
-my $ph_there = 0;
-my $var = undef;
-my $val = undef;
-my $h_file = undef;
-# Just about "any" C implementation ought to have a stdio.h (even if
-# Config.pm may not list a i_stdio var).
-my @ph_files = qw(stdio.ph);
-# Add the ones that we know that perl thinks are there:
-while (($var, $val) = each %Config) {
- if ($var =~ m/i_(.+)/ && $val eq 'define') {
- $h_file = $1;
- # Some header and symbol names don't match for hysterical raisins.
- $h_file = 'arpa/inet' if $h_file eq 'arpainet';
- $h_file = 'netinet/in' if $h_file eq 'niin';
- $h_file = 'netinet/tcp' if $h_file eq 'netinettcp';
- $h_file = 'sys/resource' if $h_file eq 'sysresrc';
- $h_file = 'sys/select' if $h_file eq 'sysselct';
- $h_file = 'sys/security' if $h_file eq 'syssecrt';
- $h_file = 'rpcsvc/dbm' if $h_file eq 'rpcsvcdbm';
- # This ought to distinguish syslog from sys/syslog.
- # (NB syslog.ph is heavily used for the DBI pre-requisites).
- $h_file =~ s{^sys(\w.+)}{sys/$1} unless $h_file eq 'syslog';
- push(@ph_files, "$h_file.ph");
- }
-}
-#foreach (qw(stdio.ph syslog.ph)) {
-foreach (@ph_files) {
- $@ = undef;
- eval "require \"$_\";";
- if (!$@) {
- print "## Perl header `$_' appears to be installed.\n" if $opt{'v'};
- $ph_there++;
- }
- else {
- print "# Perl header `$_' does not appear to be properly installed.\n";
- }
- $@ = undef;
-}
-
-if (scalar(@ph_files) == $ph_there) {
- print "ok 7\n";
- $pass__total++;
-}
-else {
- print "not ok 7\n";
- $error_total++;
-}
-$tests_total++;
-}
-else {
- print "## Skip checking of *.ph header files.\n" if $opt{'p'};
-}
-
# Final report (rather than feed ousrselves to Test::Harness::runtests()
# we simply format some output on our own to keep things simple and
# easier to "fix" - at least for now.
@@ -407,7 +350,7 @@ perlivp - Perl Installation Verification Procedure
=head1 SYNOPSIS
-B<perlivp> [B<-a>] [B<-p>] [B<-v>] [B<-h>]
+B<perlivp> [B<-p>] [B<-v>] [B<-h>]
=head1 DESCRIPTION
@@ -433,11 +376,6 @@ etc.
Prints out a brief help message.
-=item B<-a> run all tests
-
-Normally tests for optional features are skipped. With -a all tests
-are executed.
-
=item B<-p> print preface
Gives a description of each test prior to performing it.
@@ -495,11 +433,6 @@ One or more files turned up missing according to a run of
C<ExtUtils::Installed -E<gt> validate()> over your installation.
Correct by conducting a proper installation.
-=item * print "# Perl header `$_' does not appear to be properly installed.\n";
-
-Correct by running B<h2ph> over your system's C header files. If necessary,
-edit the resulting *.ph files to eliminate perl syntax errors.
-
=back
For further information on how to conduct a proper installation consult the

0 comments on commit d08226e

Please sign in to comment.