Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

testing perl after it is installed

Tags:

perl

When you build perl from source, you have the option of running make test before installing perl in its final destination.

Is it possible to do the equivalent of make test after perl has been installed?

Note that I won't have the original source. What I'd like to do is to download the source tar archive for the same version of perl that I have installed and then run the tests (from the source tar archive) against the installed perl.

Possible/impossible? Easy/hard? How would I go about this?

like image 553
ErikR Avatar asked Aug 21 '11 23:08

ErikR


1 Answers

  • Possible.
  • Hard.
  • Not worth it.

Running the tests with the installed Perl instead of the just-built Perl would require you to understand how to persuade the testing system to ignore all the build it hasn't done and get on with running the test using the installed Perl. You'd not be able to say 'make test' because the first thing it would want to do is build Perl. Actually, more to the point, you'd not be able to say 'make test' because you wouldn't have a makefile.

Why do you want to do this? If you don't trust the system Perl, don't use it. Build your own, test it, and install it in your location instead of a system location. I do that most of the time; I don't risk breaking the system's Perl by modifying it and use my own. Of course, I have 5.10.0, 5.10.1, 5.12.1, 5.14.0 and 5.14.1 built (by me) for me to play with. I usually have at least one 5.8.x version too, but not on this machine at the moment.

Also, remember that the people installing a system Perl are sane. They run the tests and don't install Perl unless the tests all pass (or substantially all pass).

like image 200
Jonathan Leffler Avatar answered Sep 28 '22 08:09

Jonathan Leffler