MakeMaker and TESTS => 't/*.t t/*/*.t'

I'm maintaining a module (Regexp::Common) which has a large set of
tests. Therefore I decided to not put all the test scripts in t/,
but to make subdirectories in t/.

I added "test => {TESTS => 't/*.t t/*/*.t'}" to the call to WriteMakefile
in Makefile.PL, and all worked well. At least, so I thought. It works
fine on Unix, but it seems to fail under Windows. I got the following
report:

    Installing perl extension
    Writing Makefile for Regexp::Common

    Microsoft (R) Program Maintenance Utility Version 7.00.9466
    Copyright (C) Microsoft Corporation.  All rights reserved.

            C:\Programme\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e"
    "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/*/*.t
    t/*......t/*.t does not exist
    t/*/*....t/*/*.t does not exist
    FAILED--2 test scripts could be run, alas--no output ever seen
    NMAKE : fatal error U1077: 'C:\Programme\Perl\bin\perl.exe' : return
    code '0x2'
    Stop.


It looks like the Microsoft shell doesn't understand wildcards.
Does MakeMaker have a way to solve this? Or is my only way out
of this to list all the test files separately?



Abigail
0
abigail
2/2/2003 1:18:13 PM
perl.perl5.porters 48287 articles. 1 followers. Follow

5 Replies
1180 Views

Similar Articles

[PageSpeed] 39
Get it on Google Play
Get it on Apple App Store


abigail@abigail.nl wrote:
> I'm maintaining a module (Regexp::Common) which has a large set of
> tests. Therefore I decided to not put all the test scripts in t/,
> but to make subdirectories in t/.
> 
> I added "test => {TESTS => 't/*.t t/*/*.t'}" to the call to WriteMakefile
> in Makefile.PL, and all worked well. At least, so I thought. It works
> fine on Unix, but it seems to fail under Windows. I got the following
> report:
> 
>     Installing perl extension
>     Writing Makefile for Regexp::Common
> 
>     Microsoft (R) Program Maintenance Utility Version 7.00.9466
>     Copyright (C) Microsoft Corporation.  All rights reserved.
> 
>             C:\Programme\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e"
>     "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/*/*.t
>     t/*......t/*.t does not exist
>     t/*/*....t/*/*.t does not exist
>     FAILED--2 test scripts could be run, alas--no output ever seen
>     NMAKE : fatal error U1077: 'C:\Programme\Perl\bin\perl.exe' : return
>     code '0x2'
>     Stop.
> 
> 
> It looks like the Microsoft shell doesn't understand wildcards.
> Does MakeMaker have a way to solve this? Or is my only way out
> of this to list all the test files separately?

I think it's the forward slash part it doesn't like (actually, i'm quite 
sure of it -- in perl it 'does the right thing', but in cmd.exe, it gets 
mighty confused):


C:\>dir perl/bin
Parameter format not correct - "bin".

C:\>dir perl\bin
  Volume in drive C is HDA1
  Volume Serial Number is C056-ABCB

  Directory of C:\perl\bin

and so on...

try with

test => {TESTS => join ' ', map { File::Spec->catdir( @$_ ) [qw|t *.t|], 
[qw|t * *.t|] }

or an equivalent thereof...

hope that helps,


-- 

Jos Boumans

How do I prove I am not crazy to people who are?

CPANPLUS			http://cpanplus.sf.net

0
kane
2/2/2003 1:25:50 PM
Op een druilerige winterdag (Sunday 02 February 2003 14:25), schreef Jos =
I.=20
Boumans:

> abigail@abigail.nl wrote:
> > I'm maintaining a module (Regexp::Common) which has a large set of
> > tests. Therefore I decided to not put all the test scripts in t/,
> > but to make subdirectories in t/.
> >
> > I added "test =3D> {TESTS =3D> 't/*.t t/*/*.t'}" to the call to Write=
Makefile
> > in Makefile.PL, and all worked well. At least, so I thought. It works
> > fine on Unix, but it seems to fail under Windows. I got the following
> > report:
> >
> >     Installing perl extension
> >     Writing Makefile for Regexp::Common
> >
> >     Microsoft (R) Program Maintenance Utility Version 7.00.9466
> >     Copyright (C) Microsoft Corporation.  All rights reserved.
> >
> >             C:\Programme\Perl\bin\perl.exe "-MExtUtils::Command::MM" =
"-e"
> >     "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/*/*.t
> >     t/*......t/*.t does not exist
> >     t/*/*....t/*/*.t does not exist
> >     FAILED--2 test scripts could be run, alas--no output ever seen
> >     NMAKE : fatal error U1077: 'C:\Programme\Perl\bin\perl.exe' : ret=
urn
> >     code '0x2'
> >     Stop.
> >
> >
> > It looks like the Microsoft shell doesn't understand wildcards.
> > Does MakeMaker have a way to solve this? Or is my only way out
> > of this to list all the test files separately?
>
> I think it's the forward slash part it doesn't like (actually, i'm quit=
e
> sure of it -- in perl it 'does the right thing', but in cmd.exe, it get=
s
> mighty confused):

CMD.EXE will work with slashes if you dubble-quote the path.
I think it's a globbing issue, CMD.EXE doesn't glob like sh, so this:

=09my @tests =3D qw(t/*.t t/*/*.t);
=09WriteMakefile(
=09...
=09    test =3D> {TESTS =3D> $^O eq 'MSWin32'=20
=09                    ? "@{[ map glob( $_ ) =3D> @tests ]}" : "@tests" }
        );

will work, but it could generate a *long* commandline for "make test", wh=
ich=20
could also give problems.

I just checked, and it works for Regexp::Common-2.105 (on WindowsXP)

Good luck,

Abe
--=20
"Crashes Perl (or Used To)" is not a really useful classifying=20
criterion, it's about as useful as "the number of characters in=20
the test is divisible by 73".
                                   -- Jarkko Hietaniemi on p5p @ 2001-10-=
30

0
abe
2/2/2003 3:09:15 PM
On Sun, Feb 02, 2003 at 04:09:15PM +0100, Abe Timmerman wrote:
> Op een druilerige winterdag (Sunday 02 February 2003 14:25), schreef Jos I. 
> Boumans:
> 
> > abigail@abigail.nl wrote:

> > > I added "test => {TESTS => 't/*.t t/*/*.t'}" to the call to WriteMakefile
> > > in Makefile.PL, and all worked well. At least, so I thought. It works
> > > fine on Unix, but it seems to fail under Windows. I got the following
> > > report:

> CMD.EXE will work with slashes if you dubble-quote the path.
> I think it's a globbing issue, CMD.EXE doesn't glob like sh, so this:
> 
> 	my @tests = qw(t/*.t t/*/*.t);
> 	WriteMakefile(
> 	...
> 	    test => {TESTS => $^O eq 'MSWin32' 
> 	                    ? "@{[ map glob( $_ ) => @tests ]}" : "@tests" }
>         );
> 
> will work, but it could generate a *long* commandline for "make test", which 
> could also give problems.
> 
> I just checked, and it works for Regexp::Common-2.105 (on WindowsXP)

This was the hack I was going to suggest. Does the VMS shell glob "correctly"
(ie in a Unix-like way)? If so, I think that you're sorted.
If not, I belive that you have some "fun", as VMS command line length is
quite limited (256 characters, IIRC)

Nicholas Clark
0
nick
2/3/2003 3:33:33 PM
>>>> I added "test => {TESTS => 't/*.t t/*/*.t'}" to the call to
>>>> WriteMakefile
>>>> in Makefile.PL, and all worked well. At least, so I thought. It

One of the things I've been thinking about is having Test::Harness
include some sort of globby mechanism so that the caller can specify a
directory, and T::H will recursively walk the directory looking for .t
files, a la find.

Thoughts?

xoa

--
Andy Lester, lead singer & driver of the Winnebago
andy@petdance.com, AIM:petdance
http://petdance.com/ http://use.perl.org/~petdance/

0
MAILER
2/4/2003 3:55:27 PM
On Tue, Feb 04, 2003 at 03:55:27PM -0000, MAILER-DAEMON@relay.pair.com wrote:
> >>>> I added "test => {TESTS => 't/*.t t/*/*.t'}" to the call to
> >>>> WriteMakefile
> >>>> in Makefile.PL, and all worked well. At least, so I thought. It
> 
> One of the things I've been thinking about is having Test::Harness
> include some sort of globby mechanism so that the caller can specify a
> directory, and T::H will recursively walk the directory looking for .t
> files, a la find.
> 
> Thoughts?

I don't see why not.  Two new functions would be nice.  One to do the 
equivalent of run_tests(glob("t/*.t")) and another to do a full recursive 
search.  It certainly would solve a lot of these silly glob compatibility 
problems.
0
schwern
2/5/2003 9:56:11 PM
Reply:

Similar Artilces:

I can't get no cache, I can't get no cache. 'Cause I try and I try and I try and, I can't get no, I can't get no cache.
I have fiddled out for days tinkering with the setting in about:config trying to get FireFox 12 to use the disk cache. I have NOT found the trick. This One Trick Pony ain't doing it like it used to up until recently. Pray tell anyone, What information can I share that will point a knowledgeable person to aid me in getting FF to disk.cache? I have also tried restarting FF with add-ons disabled, (There were NOT too many to do this to, so it was quick and easy) Here is my stab at trying to convey the information that MIGHT govern matters Using about:cache Informatio...

Re: I can't get no cache, I can't get no cache. ' Cause I try and I try and I try and, I can't get no, I can't get no cache.
<div>please com e see me about htis<br /> <br /> ------- Original Message f= rom the Global Relay Archive -------<br /> From: Hp &lt;ferd@farkel.net&gt;= <br /> To: "support-firefox@lists.mozilla.org" &lt;support-firefox@lists.mo= zilla.org&gt;<br /> Sent: Sun, 27 May 2012 18:30:18 -0700<br /> Subject: I = can't get no cache, I can't get no cache. 'Cause I try and I try and I try = and, I can't get no, I can't get no cache.<br /> <br /></div> <pre class=3D"gr-maex-body-pre&qu...

2010: Can't register - can't download the software - can't register until I have the software
I have active maintenance on Rad Studio: From: Vicky Rassmisaengthong [mailto:Vicky.Rassmisaengthong@EMBARCADERO.COM] Sent: Wednesday, February 25, 2009 1:58 PM To: rgrossman Cc: amer.supportadmin@codegear.com; Ashley Cosentino Subject: Software Assurance Support for Tech III Inc PO# Credit Card Dear Embarcadero Technologies Support Customer, Welcome! You have been registered as the primary contact on support account number AM####### Herewith we confirm your Embarcadero Technologies support agreement covering: Qty 1 RAD Studio Enterprise Named User licens...

Why I can't or won't use T-bird
Name: John Colman Email: cdbookieatsbcglobaldotnet Product: Thunderbird Summary: Why I can't or won't use T-bird Comments: It is late at night, I'm frustrated. I've spent hours over the past three days trying to get Thunderbird to run. As you can see I have a Yahoo account using Outlook (mine is getting buggy) for e-mail. I'm a confirmed Firefox user, so T-bird seemed the next step. I've use YPOP and webmail. Can't seem to get through the username/password screen. I've searched your faq's, read the tutorial. I'm really not a stupid p...

Won't send, won't receive, won't do anything but send me rejection messages!
I keep getting messages such as these: Unable to connect to your IMAP server. You may have exceeded the maximum c= onnections to this server. If so, use the IMAP server settings dialog to re= duce the number of cached connections. Sending of the message failed. The message could not be sent because the connection to Outgoing server (SM= TP) smtp.google.com was lost in the middle of the transaction. Try again. I have used Thunderbird for years, and have really liked it. Sometimes one = of the top of the pages goes up way too high above the top of the screen, s= o there is no way...

superreview granted: [Bug 245619] Don't bother converting result of scripts into a string when the caller doesn't care about the value. : [Attachment 150056] Don't convert the result to a string if t
Brendan Eich <brendan@mozilla.org> has granted Johnny Stenback <jst@mozilla.jstenback.com>'s request for superreview: Bug 245619: Don't bother converting result of scripts into a string when the caller doesn't care about the value. http://bugzilla.mozilla.org/show_bug.cgi?id=245619 Attachment 150056: Don't convert the result to a string if the caller doesn't care about the return value. http://bugzilla.mozilla.org/attachment.cgi?id=150056&action=edit ------- Additional Comments from Brendan Eich <brendan@mozilla.org> Duh, thanks. r+sr=me....

"chdir 't' if -d 't'" is evil?
Hi, I'm working on a release of PathTools, including File::Spec and Cwd. I've been told (though I never quite grokked it) to put the following code in the test scripts: BEGIN { chdir 't' if -d 't'; if ($ENV{PERL_CORE}) { @INC = '../lib'; } } use Cwd; However, I've just realized that this messes up @INC, because the Cwd.pm we need to test is in blib/lib/, which is added to the path by -Mblib, but it won't be found if we chdir('t'). I would really like to remove that whole block and make Tes...

[PATCH t/cmd/for.t] Regression tests for 'for reverse ..'
--Bn2rw/3z4jIqBvZU Content-Type: multipart/mixed; boundary="sm4nu43k4a2Rpi4c" Content-Disposition: inline --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Nicholas pointed out on #p5p that we do not have regressions tests=20 for the combination of 'for', 'reverse' and '..'. Hence, this patch. Abigail --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=diff Content-Transfer-Encoding: quoted-printa...

[PATCH t/pod/find.t t/TEST] fixing t/pod/find.t, running t/pod
I just noticed t/pod and that its not run with "make test". This appears to have come up before and was an oversight. http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2000-09/msg00730.html Looks like people just gave up on fixing t/pod/find.t and I don't blame them, its a mess. I'm tempted to just chuck it and start over. Well, the fundemental problem is that Pod::Find is doing all sorts of gyrations to look at the source code. This is fundementally unmaintainable (tests should not break when we add new files to the dist). Instead, I've added t/pod/test...

Two things,Why do I keep getting emails that I don't want. can't get rid of them? Why can't I get my email when I am out of town? Or can I?
Name: Ed Leech Email: ELCraftatzoominternetdotnet Product: Thunderbird Summary: Two things,Why do I keep getting emails that I don't want. can't get rid of them? Why can't I get my email when I am out of town? Or can I? Comments: I am getting frusted with all the emails coming in that I do not want, I am using the tools to get thme out but they keep coming. They just use different names or whatever. I have been thinking of just switching to something else but my business intrusts know this email and it is tooo confusing to change. Every time I go out of town on bu...

Can't get the Web Controls to work.. The Build.Bat file doesn't work? HELP>> ARGGG>.
Hi.. I was wanting to use the IE Web Controls, the Tab Strip, etc, and play with it.. Since I have IIS 5, I thought I'd copy them there using the Read me.txt instructions and then copy to a dev server that I use at a web host.. Well, everything worked except the Build file doesn't build the Microsoft.UI.Webcontrols.DLL file? When I try to run it by double clicking on it, it runs really fast in  the DOS window, but I can't see what it says and it closes.. So I tried to do so manually and I received an error that the "cse.exe is not recognized as an internal or external command or batch...

I don't care if 'The document has moved here', and CAPTCHA doesn't show up
Name: Charles Green Email: CharlesWGreenJrataimdotcom Product: Minefield Summary: I don't care if 'The document has moved here', and CAPTCHA doesn't show up Comments: I've suddenly started to get a lot of screens saying 'The document has moved here' and so forth. I do NOT have 'Warn me when web sites try to redirect or reload the page' checked. Also, the CAPTCHA "Humanness Check" is not shown on the Hendrix page, so I had to use Internet Explorer (gak!) to enter this feedback... Mozilla/5.0 (Windows NT 5.1; rv:2.0b4pre) ...

cpan>install NET::SSH ----> Can't install NET::SSH don't know what it is?
Good day! This is the first time I'll be using the cpan to install modules. I run: perl -MCPAN -e shell and answer the questions one by one. When its done, I issued install NET::SSH at the cpan> prompt and I got the message: Can't install NET::SSH Don't know what it is. Question: How will I make cpan> know what NET::SSH is? Is there something I have to update first? How can I search for some useful modules using cpan> rather than using cpan search in www.cpan.org? What is auto bundle? And what does 'cpan -a' does? When I ran it, I can some...

[PATCH] t/pmc/os.t 'mkdir' test can fail
. . . depending on where Parrot is located. Mine is in /usr/src/parrot, so the code expected /usr/xpto/parrot/src instead of /usr/src/parrot/xpto . . . -- Bob Rogers http://rgrjr.dyndns.org/ ------------------------------------------------------------------------ index: t/pmc/os.t =================================================================== --- t/pmc/os.t (revision 10854) +++ t/pmc/os.t (working copy) @@ -86,7 +86,7 @@ # Test mkdir my $xpto = $upcwd; -$xpto =~ s/src/xpto/; +$xpto =~ s/src$/xpto/; pir_output_is(<<'CODE', <<...

Web resources about - MakeMaker and TESTS => 't/*.t t/*/*.t' - perl.perl5.porters

Hottest 'configuration-files' Answers - Stack Overflow
current community chat blog Stack Overflow Meta Stack Overflow Stack Overflow Careers your communities Sign up or log in to customize your list. ...

CPAN - Wikipedia, the free encyclopedia
Like many programming languages , Perl has mechanisms to use external libraries of code, making one file contain common routines used by several ...


apache/trafficserver · GitHub
trafficserver - Mirror of Apache Traffic Server

July 2006 Archives
It has been common practice within the Perl community for ages to ship distributions with a Makefile.PL so that the user will be able to install ...

Perlbuzz
What's happening in the world of Perl programming, including Perl 5, Perl 6, the CPAN and Parrot? news roundup for 2013-07-15 By Andy Lester ...

Chronological `perl5-porters' 2008-01 (1/15) Mailing List Archive
[ First Page ][Prev Page][ Next Page ][ Last Page ] [ Thread Index ][ Top&Search] [ Archives ] [PATCH] Small documentation nits From : Sébastien ...

Michael G Schwern - search.cpan.org
Home · Authors · Recent · News · Mirrors · FAQ · Feedback in All Modules Distributions Authors Michael G Schwern CPAN Directory MSCHWERN [ Archive ...

debian-devel Apr 2014 by thread
debian-devel Apr 2014 by thread [ previous month ] [ first page ] [ previous page ] Page 2 of 2 "> [next page] - "> [ last page ] [ next month ...

The package-announce September 2014 Archive by subject
September 2014 Archives by subject Messages sorted by: [ thread ] [ author ] [ date ] More info on this list... Starting: Tue Sep 2 06:39:11 ...

Resources last updated: 1/6/2016 11:05:01 AM