Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: prove: parallel multiple shells

by almr (Sexton)
on Aug 18, 2021 at 17:23 UTC ( #11135930=note: print w/replies, xml ) Need Help??


in reply to Re: prove: parallel multiple shells
in thread prove: parallel multiple shells

Hey, cool. To my shame I can't quite figure out were the parallelization takes place... I see a NestedLoops call in WWW-Mechanize-Chrome, so that's sequential. Is it in system("$Config{ make } test"), which presumably calls prove... which looks for .t files?

Or is it in t::helper::run_across_instances call, in the snippet above?

Replies are listed 'Best First'.
Re^3: prove: parallel multiple shells
by Corion (Patriarch) on Aug 18, 2021 at 17:56 UTC

    Sorry - no, I leave all the parallelization still to prove. It runs all test files in parallel (well, up to a limit). prove is called by make test, as you correctly surmised.

    The run_across_instances just loops (single-tasked) through the Chrome instances.

      I see. In that case I'm not sure how I could apply your setup to my problem (multiple .t files that should run with different shells)?

        No - per prove-run, my approach would use the same shell for all runs. Maybe you can/want to use a shim in between your .t file and prove, that is something like:

        #!/bin/bash TESTSCRIPT=$1 for SHELL in ./test-shells/* ; do $SHELL $TESTSCRIPT if $? ; then exit $? fi done

        If you set this script as the interpreter of your test files, that should run each test with all shells (but still, single threaded). That way, you could at least achieve parallelism across your test files.

        I'm sure there is a bash-way of stopping the interpreter script when any subprocess fails. Maybe it's set -e or something, but I'm sure you know that far better than I do.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11135930]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2023-02-04 19:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (31 votes). Check out past polls.

    Notices?