Skip Menu |
 

This queue is for tickets about the File-Path CPAN distribution.

Report information
The Basics
Id: 105527
Status: resolved
Priority: 0/
Queue: File-Path

People
Owner: jkeenan [...] cpan.org
Requestors: jkeen [...] verizon.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: eg/setup-extra-tests: Should these be reformulated as 'author tests'?
Date: Sat, 27 Jun 2015 10:12:26 -0400
To: bug-File-Path [...] rt.cpan.org
From: James E Keenan <jkeen [...] verizon.net>
Download (untitled) / with headers
text/plain 1.5k
The File-Path distribution currently contains a directory 'eg/' which holds one file 'setup-extra-tests'. It appears that this file prepares extra tests to be run in t/Path.t when tests are being run by root: ##### $ head -6 eg/setup-extra-tests use strict; use File::Path; # heh use Getopt::Std; die "Not running as root (uid=$<)\n" if $<; ##### I haven't actually run the tests as root yet -- if only because as a developer I *never* run anything as root in my day-to-day work either for $job of for OS -- but I'm wondering if it would be better to follow current CPAN best practices and consider this an "author test" which should be placed in a directory called 'xt/'. We already have to exclude eg/setup-extra-tests from inclusion in the Perl 5 core distribution. From Porting/Maintainers.pl: ##### 'File::Path' => { 'DISTRIBUTION' => 'DLAND/File-Path-2.09.tar.gz', 'FILES' => q[cpan/File-Path], 'EXCLUDED' => [ qw( eg/setup-extra-tests t/pod.t ) ], 'MAP' => { '' => 'cpan/File-Path/lib/File/', 't/' => 'cpan/File-Path/t/', }, }, ##### If we were to move these tests to 'xt/', we could simplify the 'EXCLUDED' element above to '[ qr{^xt} ]', which many other dual-life distributions follow. Consider this a suggestion, not a full-fledged bug report or feature request. Some data we might want to gather when evaluating this suggestion: Do CPANtesters run these extra tests? Thank you very much. Jim Keenan
Subject: Re: [rt.cpan.org #105527] eg/setup-extra-tests: Should these be reformulated as 'author tests'?
Date: Sat, 27 Jun 2015 13:02:26 -0400
To: bug-File-Path [...] rt.cpan.org
From: Richard Elberger <rich [...] richelberger.com>
Download (untitled) / with headers
text/plain 2.4k
100% agree that any test expected to be run as root or maintainer mode only should be in xt/ which as you say is the norm today. To add, from an administrator’s perspective I wouldn’t want anything potentially destructive run as privileged user (root or Administrators group on Windows) … i.e. into system perl … so IMO the sooner the better. Show quoted text
> On Jun 27, 2015, at 10:12 AM, jkeen@verizon.net via RT <bug-File-Path@rt.cpan.org> wrote: > > Sat Jun 27 10:12:57 2015: Request 105527 was acted upon. > Transaction: Ticket created by jkeen@verizon.net > Queue: File-Path > Subject: eg/setup-extra-tests: Should these be reformulated as 'author tests'? > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: jkeen@verizon.net > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=105527 > > > > The File-Path distribution currently contains a directory 'eg/' which > holds one file 'setup-extra-tests'. It appears that this file prepares > extra tests to be run in t/Path.t when tests are being run by root: > > ##### > $ head -6 eg/setup-extra-tests > use strict; > use File::Path; # heh > use Getopt::Std; > > die "Not running as root (uid=$<)\n" if $<; > > ##### > > I haven't actually run the tests as root yet -- if only because as a > developer I *never* run anything as root in my day-to-day work either > for $job of for OS -- but I'm wondering if it would be better to follow > current CPAN best practices and consider this an "author test" which > should be placed in a directory called 'xt/'. > > We already have to exclude eg/setup-extra-tests from inclusion in the > Perl 5 core distribution. From Porting/Maintainers.pl: > > ##### > 'File::Path' => { > 'DISTRIBUTION' => 'DLAND/File-Path-2.09.tar.gz', > 'FILES' => q[cpan/File-Path], > 'EXCLUDED' => [ > qw( eg/setup-extra-tests > t/pod.t > ) > ], > 'MAP' => { > '' => 'cpan/File-Path/lib/File/', > 't/' => 'cpan/File-Path/t/', > }, > }, > ##### > > If we were to move these tests to 'xt/', we could simplify the > 'EXCLUDED' element above to '[ qr{^xt} ]', which many other dual-life > distributions follow. > > Consider this a suggestion, not a full-fledged bug report or feature > request. Some data we might want to gather when evaluating this > suggestion: Do CPANtesters run these extra tests? > > Thank you very much. > Jim Keenan > >
Download (untitled) / with headers
text/plain 2.7k
On Sat Jun 27 13:02:40 2015, rich@richelberger.com wrote: Show quoted text
> 100% agree that any test expected to be run as root or maintainer mode > only should be in xt/ which as you say is the norm today. > > To add, from an administrator’s perspective I wouldn’t want anything > potentially destructive run as privileged user (root or Administrators > group on Windows) … i.e. into system perl … so IMO the sooner the > better. > >
> > On Jun 27, 2015, at 10:12 AM, jkeen@verizon.net via RT <bug-File- > > Path@rt.cpan.org> wrote: > > > > Sat Jun 27 10:12:57 2015: Request 105527 was acted upon. > > Transaction: Ticket created by jkeen@verizon.net > > Queue: File-Path > > Subject: eg/setup-extra-tests: Should these be reformulated as > > 'author tests'? > > Broken in: (no value) > > Severity: (no value) > > Owner: Nobody > > Requestors: jkeen@verizon.net > > Status: new > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=105527 > > > > > > > The File-Path distribution currently contains a directory 'eg/' which > > holds one file 'setup-extra-tests'. It appears that this file > > prepares > > extra tests to be run in t/Path.t when tests are being run by root: > > > > ##### > > $ head -6 eg/setup-extra-tests > > use strict; > > use File::Path; # heh > > use Getopt::Std; > > > > die "Not running as root (uid=$<)\n" if $<; > > > > ##### > > > > I haven't actually run the tests as root yet -- if only because as a > > developer I *never* run anything as root in my day-to-day work either > > for $job of for OS -- but I'm wondering if it would be better to > > follow > > current CPAN best practices and consider this an "author test" which > > should be placed in a directory called 'xt/'. > > > > We already have to exclude eg/setup-extra-tests from inclusion in the > > Perl 5 core distribution. From Porting/Maintainers.pl: > > > > ##### > > 'File::Path' => { > > 'DISTRIBUTION' => 'DLAND/File-Path-2.09.tar.gz', > > 'FILES' => q[cpan/File-Path], > > 'EXCLUDED' => [ > > qw( eg/setup-extra-tests > > t/pod.t > > ) > > ], > > 'MAP' => { > > '' => 'cpan/File-Path/lib/File/', > > 't/' => 'cpan/File-Path/t/', > > }, > > }, > > ##### > > > > If we were to move these tests to 'xt/', we could simplify the > > 'EXCLUDED' element above to '[ qr{^xt} ]', which many other dual-life > > distributions follow. > > > > Consider this a suggestion, not a full-fledged bug report or feature > > request. Some data we might want to gather when evaluating this > > suggestion: Do CPANtesters run these extra tests? > > > > Thank you very much. > > Jim Keenan > > > >
I'll have to set aside time to study eg/setup-extra-tests more thoroughly. Once I'm confident I understand it, I'll prepare a patch. Thank you very much. Jim Keenan
Download (untitled) / with headers
text/plain 166b
I have removed author tests from Path.t and put them into xt/extra.t. Next I will take code from eg/ and put it in the file to setup those specific set of tests.
Download (untitled) / with headers
text/plain 409b
On Wed Jul 22 10:56:07 2015, RICHE wrote: Show quoted text
> I have removed author tests from Path.t and put them into xt/extra.t. > Next I will take code from eg/ and put it in the file to setup those > specific set of tests.
These tests have now been formed under xt/. author tests in Path.t have been pulled out and put into xt/extra.t. https://github.com/rpcme/File-Path/commit/8002080391b5c2e449a0c824817e4c7c791e7da7


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.