develooper Front page | perl.perl5.porters | Postings from January 2022

Re: How to run a specific test from the testsuite?

Thread Previous | Thread Next
From:
James E Keenan
Date:
January 2, 2022 22:35
Subject:
Re: How to run a specific test from the testsuite?
Message ID:
6a0512ac-efd2-baab-bb26-4bbeddeec16f@pobox.com
On 1/2/22 5:01 PM, Dennis Clarke via perl5-porters wrote:
> 
> Dear Perl folks :
> 
> Well for the sake of fun over the holiday season I dragged out an old
> old Sun SPARCStation 20 and played around with it. Turns out that the
> latest Perl 5.34.0 will compile just fine. Slowly. Six hours in fact.
> However it does compile fine! Then I want to see the testsuite run.
> While watching Perl 5.34.0 running the testsuite I was surprised
> to see :
> 
> .
> .
> .
> cpan/autodie/t/utime ............................................. # 
> Failed test 'We can utime a file just fine.'
> #   at t/utime.t line 16.
> # Can't utime(undef, undef, 
> '/export/home/dclarke/local/build/perl-5.34.0_SunOS5.8_sun4m.002/cpan/autodie/t/touch_me'): 
> Permission denied at t/utime.t line 15
> #   Failed test 'utime fails correctly on a 'true' failure.'
> #   at t/utime.t line 20.
> #          got: '0'
> #     expected: '1'
> Can't utime('1641079886', '1592175685', 
> '/export/home/dclarke/local/build/perl-5.34.0_SunOS5.8_sun4m.002/cpan/autodie/t/touch_me'): 
> Not owner at t/utime.t line 24
> # Looks like your test exited with 1 just after 4.
> FAILED at test 2
> .
> .
> .
> 
> I am curious if there is a magic incantation wherein I can see the
> details of that test verbosely?  I am very surprised to see that I am
> not the owner of that file but perhaps this is because I am doing a
> build "out of tree" wherein the actual sources are located in the
> another path with whatever ownership was in the distribution tarball:
> 
> triton # ls -lad /export/home/dclarke/local/build/perl-5.34.0
> drwxr-xr-x  25 perl     perl        5120 May 20  2021 
> /export/home/dclarke/local/build/perl-5.34.0
> triton #
> 
> Yes I did create a group and user named "perl" with uid:gid equal to
> 1000:1000 which I saw within the extracted tarball. I am guessing that
> is the reason for the test failure. Seems strange given that the test is
> not going after the source path but the correct build and test path?
> Otherwise I see everything is going along swimmingly.
> 

Perhaps you're creating problems for yourself?  When I download and 
unpack a tarball (I'm on FreeBSD), I get:

#####
$ wget https://www.cpan.org/src/5.0/perl-5.34.0.tar.gz
$ tar xzvf perl-5.34.0.tar.gz
$ cd perl-5.34.0
$ ls -l cpan/autodie/t/utime.t
-r--r--r--  1 jkeenan  jkeenan  840 Jun 14  2020 cpan/autodie/t/utime.t
#####

... and at this point I've never had to create a new 'user:group' or had 
any problem saying:

#####
$ sh ./Configure -des -Dusedevel
$ make test_prep
$ make test_harness
#####

Once you've gotten as far as 'make test_prep' above, you should be able 
to run an individual test program (with verbose output) via:

#####
$ cd t; ./perl harness -v ../cpan/autodie/t/utime.t; cd -
#####


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About