Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Removing a test script from perl source

by syphilis (Archbishop)
on Nov 17, 2017 at 11:59 UTC ( [id://1203656]=perlquestion: print w/replies, xml ) Need Help??

syphilis has asked for the wisdom of the Perl Monks concerning the following question:

Hi,
This question relates to a transient, ongoing problem that I have running 'make test' when building perl from source on Windows using mingw-w64 64-bit ports of gcc.
(Never any such problem with the mingw-w64 32-bit ports of gcc.)

In a nutshell, I often (but not always, depending upon the version of gcc) strike the problem that an IO-Compress test script will hang during 'make test'.
My only means of escape from this hang (AFAIK) is to hit Ctrl-C, which kills the entire 'make test' process - meaning that none of the other ensuing tests are run.

Currently, the offender is cpan/IO-Compress/t/105oneshot-rawdeflate.t when building 64-bit blead.
No problem with 'make test' when blead is built using 64-bit gcc-7.1.0, but that script hangs when blead is built with 64-bit gcc-7.2.0.

My question:
How do I re-arrange the source so that 'make test' will skip cpan/IO-Compress/t/105oneshot-rawdeflate.t, and yet run all of the other test scripts ?

I should add that AFAICS there's really no problem with either the actual hanging test script, or the perl that has been built.
These hangs only ever occur when running the script under 'make test'.

Cheers,
Rob
  • Comment on Removing a test script from perl source

Replies are listed 'Best First'.
Re: Removing a test script from perl source
by 1nickt (Canon) on Nov 17, 2017 at 12:43 UTC

    Hi syphilis, is there an environment variable set when running under 'make test'? If there is you could use that to control a skip_all directive in the test file. (Assumes that make test uses the Test::More harness).

    I have used this technique to skip tests requiring external resources when running under CI. Perhaps it contains a clue.


    The way forward always starts with a minimal test.
Re: Removing a test script from perl source
by salva (Canon) on Nov 17, 2017 at 14:51 UTC
    My only means of escape from this hang (AFAIK) is to hit Ctrl-C, which kills the entire 'make test' process - meaning that none of the other ensuing tests are run.

    You could just kill the offending test script process using the task manager or some other similar tool. For instance, I like Sysinternals Process Explorer (procexp) which shows processes as a tree and so it is easy to find the blocking child and kill it.

      You could just kill the offending test script process using the task manager or some other similar tool

      Yes, my original post was built around a false assumption - namely, that Ctrl-C was the only way I could escape from the hang.
      As salva suggested, procexp, makes it quite easy to select and kill the appropriate process.
      One can even double check that one has selected the correct perl process (prior to killing that process) by looking at its command line, which is displayed under its "Properties".

      Thank you, salva.
      Thanks also to 1nickt for a handy idea. (1nickt's idea was more in line with what I initially expected was going to be needed.)

      Cheers,
      Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1203656]
Approved by marto
Front-paged by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-16 14:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found