Skip Menu |

This queue is for tickets about the ExtUtils-MakeMaker CPAN distribution.

Report information
The Basics
Id: 28883
Status: rejected
Priority: 0/
Queue: ExtUtils-MakeMaker

People
Owner: Nobody in particular
Requestors: jnh [...] cpan.org
Cc:
AdminCc:

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



Subject: Please tweak test => {TESTS => ...} to allow TESTS => undef
I'd like to be able to have a t/ directory with subtests in it, and a test.pl that runs them. This means not auto-magically running the contents of t/ with test_harness. This doesn't work, though, because of this sort of code in MM_Unix.pm: my($self, %attribs) = @_; my $tests = $attribs{TESTS} || ''; if (!$tests && -d 't') { $tests = $self->find_tests; } I can't usefully say "test => {TESTS => undef}", and "test => {TESTS => ' '}" (for example) creates a rule in the Makefile that attempts to run no tests, which produces a test_harness error. Of course, I don't *want* to run test_harness anyway. There should be only the rule that runs test.pl (and not from test_harness). Unless I'm missing something, the fix for me is to use a different directory than t/. But I don't know of a way to do that currently with MakeMaker. It's entirely possible that I *am* missing something, because I don't use MakeMaker that often. Thanks, -joseph
Subject: Re: [rt.cpan.org #28883] Please tweak test => {TESTS => ...} to allow TESTS => undef
Date: Fri, 17 Aug 2007 19:17:48 -0700
To: bug-ExtUtils-MakeMaker [...] rt.cpan.org
From: "Michael G Schwern" <schwern [...] pobox.com>
On 8/17/07, Joseph_N_Hall via RT <bug-ExtUtils-MakeMaker@rt.cpan.org> wrote: Show quoted text
> I'd like to be able to have a t/ directory with subtests in it, and a > test.pl that runs them. This means not auto-magically running the > contents of t/ with test_harness.
The usual way this is done is by overriding test_via_harness() which returns the command used to run the tests. Its documented-ish in ExtUtils::MM_Any. { package MY; sub test_via_harness { my($self, $perl, $tests) = @_; return qq{\t$your_command_here $tests\n}; }
I'm rejecting this ticket because a work around / right way to do it was supplied. For any further need for customizing how tests work, I point you to Module::Build and simply overriding ACTION_test().