|
1 | 1 | #!perl
|
2 | 2 | # this should be perl 5.8 compatible, since it will be used
|
3 | 3 | # with old perls while testing dist modules on those perls
|
| 4 | +# |
| 5 | +# see C<perldoc Porting/test-dist-modules.pl> |
| 6 | + |
4 | 7 | use strict;
|
5 | 8 | use warnings;
|
6 | 9 | use File::Temp "tempdir";
|
@@ -321,6 +324,87 @@ sub usage {
|
321 | 324 | exit;
|
322 | 325 | }
|
323 | 326 |
|
| 327 | +=head2 NAME |
| 328 | +
|
| 329 | +test-dist-modules.pl - test modules in dist/ against the perl invoked with |
| 330 | +
|
| 331 | +=head1 SYNOPSIS |
| 332 | +
|
| 333 | + # from a checked out clean perl source tree |
| 334 | + # test all dist/ modules, abort on first failure |
| 335 | + path/to/perl test-dist-modules.pl |
| 336 | +
|
| 337 | + # test all dist/ modules, continue on failure |
| 338 | + path/to/perl test-dist-modules.pl -c |
| 339 | +
|
| 340 | + # test all dist/ modules, and install into path/to/perl's site_perl |
| 341 | + path/to/perl test-dist-modules.pl -i |
| 342 | +
|
| 343 | +=head1 DESCRIPTION |
| 344 | +
|
| 345 | +F<Porting/test-dist-modules.pl> is used by the Github workflow to test |
| 346 | +modules from F<dist/> against the perl it is invoked with, within a |
| 347 | +git clone of a development perl. This clone must be a clean clone, |
| 348 | +ie. as with C<git clean -dxf> . |
| 349 | +
|
| 350 | +That perl should have any prerequisites needed by those modules |
| 351 | +installed, at this point this includes sufficiently recent versions |
| 352 | +of: |
| 353 | +
|
| 354 | + ExtUtils::MakeMaker |
| 355 | + Perl::OSType |
| 356 | + Scalar::Util |
| 357 | + Socket |
| 358 | + version |
| 359 | +
|
| 360 | +F<test-dist-modules.pl> will always test F<Devel::PPPort> first and |
| 361 | +then use that when testing the other modules, even if invoked with a |
| 362 | +distribution list. |
| 363 | +
|
| 364 | +=head1 INVOKING F<test-dist-modules.pl> |
| 365 | +
|
| 366 | +By default F<test-dist-modules.pl> will test each directory in |
| 367 | +F<dist/>, but you can test specific distributions by supplying them on |
| 368 | +the command-line: |
| 369 | +
|
| 370 | + path/to/perl test-dist-modules.pl threads |
| 371 | +
|
| 372 | +which will test F<Devel-PPPort> and F<threads>. |
| 373 | +
|
| 374 | +Options: |
| 375 | +
|
| 376 | +=over |
| 377 | +
|
| 378 | +=item * C<-i> |
| 379 | +
|
| 380 | +=item * C<-install> |
| 381 | +
|
| 382 | +Install the modules to the invoking perl's F<site_perl>. This may |
| 383 | +require privileges such as running as C<root>. |
| 384 | +
|
| 385 | +=item * C<-c> |
| 386 | +
|
| 387 | +=item * C<-continue> |
| 388 | +
|
| 389 | +Continue testing modules even if one fails. |
| 390 | +
|
| 391 | +=item * C<-s> |
| 392 | +
|
| 393 | +=item * C<-separate> |
| 394 | +
|
| 395 | +Install to a temp tree instead of to the invoking perl's F<site_perl>. |
| 396 | +This is now the default. |
| 397 | +
|
| 398 | +=item * C<-h> |
| 399 | +
|
| 400 | +=item * C<-help> |
| 401 | +
|
| 402 | +Produce a help message. |
| 403 | +
|
| 404 | +=back |
| 405 | +
|
| 406 | +=cut |
| 407 | + |
324 | 408 | __DATA__
|
325 | 409 | -- t/test.pl --
|
326 | 410 | #
|
|
0 commit comments