Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3eb1f4d

Browse files
committed
Doc: update testing recipe in src/test/perl/README.
The previous text didn't provide any clear explanation of our policyaround TAP test portability. The recipe for using perlbrew had someproblems, too: it resulted in a non-shared libperl (preventingtesting of plperl) and it caused some modules to be updated tocurrent when the point of the recipe is to build an old environment.Discussion:https://postgr.es/m/E1mYY6Z-0006OL-QN@gemulon.postgresql.org
1 parent2ae5d72 commit3eb1f4d

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

‎src/test/perl/README

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,36 @@ perldoc for the test modules, e.g.:
7070

7171
perldoc src/test/perl/PostgresNode.pm
7272

73-
Required Perl
74-
-------------
73+
Portability
74+
-----------
75+
76+
Avoid using any bleeding-edge Perl features. We have buildfarm animals
77+
running Perl versions as old as 5.8.3, so your tests will be expected
78+
to pass on that.
7579

76-
Tests must run on perl 5.8.3 and newer. perlbrew is a good way to obtain such
77-
a Perl; see http://perlbrew.pl .
80+
Also, do not use any non-core Perl modules except IPC::Run. Or, if you
81+
must do so for a particular test, arrange to skip the test when the needed
82+
module isn't present. If unsure, you can consult Module::CoreList to find
83+
out whether a given module is part of the Perl core, and which module
84+
versions shipped with which Perl releases.
7885

79-
Just install and
86+
One way to test for compatibility with old Perl versions is to use
87+
perlbrew; see http://perlbrew.pl . After installing that, do
8088

89+
export PERLBREW_CONFIGURE_FLAGS='-de -Duseshrplib'
8190
perlbrew --force install 5.8.3
8291
perlbrew use 5.8.3
8392
perlbrew install-cpanm
84-
cpanm install IPC::Run
93+
cpanm install Test::Simple@0.87_01
94+
cpanm install IPC::Run@0.79
95+
cpanm install ExtUtils::MakeMaker@6.50 # downgrade
8596

86-
then re-run configure to ensure the correct Perl is used when running
87-
tests. To verify that the right Perl was found:
97+
Then re-runPostgres'configure to ensure the correct Perl is used when
98+
runningtests. To verify that the right Perl was found:
8899

89100
grep ^PERL= config.log
101+
102+
Due to limitations of cpanm, this recipe doesn't exactly duplicate the
103+
module list of older buildfarm animals. The discrepancies should seldom
104+
matter, but if you want to be sure, bypass cpanm and instead manually
105+
install the desired versions of Test::Simple and IPC::Run.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp