Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: organizing/ running non-module related tests

by geektron (Curate)
on Sep 20, 2005 at 18:55 UTC ( #493569=note: print w/replies, xml ) Need Help??


in reply to Re: organizing/ running non-module related tests
in thread organizing/ running non-module related tests

hrm ... maybe more detail would have helped.

the tests are similar to what goes on in a module distro. i have a t/ directory that's filling up with DBI-based scripts.

what i'm looking for is an alternative to running each test (or each step of the migration) by hand. the "wrapper" would basically be something like:

system( 'my/dir/01_step1.pl' ); system( 'my/dir/01_step2.pl' ); system( 'my/dir/01_step3.pl' );
which looks an *aweful* lot like a  make target to me.

the alternative is:  [ mybox ] --> ./01_step1.pl ad nauseam.

and it's one DB to another .. so there's no real need for files ....

Replies are listed 'Best First'.
Re^3: organizing/ running non-module related tests
by graff (Chancellor) on Sep 20, 2005 at 19:10 UTC
    If that's all you're doing, it's not such a big thing to roll on your own:
    my @tests = sort <my/dir/*.pl>; #update: need to sort the glob list my $return = my $testid = 0; while ( $return == 0 ) { warn "Running $tests[$testid]...\n"; $return = system( $tests[$testid++] ); }
    But learning to use MM is bound to be a good thing anyway, so why ask us whether you should do it?

    update: if your scripts are actually moving data, then of course you'll need to prefix that loop with whatever steps are needed to clear out the destination db before the loop starts -- unless the first script in your list takes care of that.

      each script clears out the relevant tables. because of foreign key constraints and such, i need to clean tables backwards, but i have that under control.

      i'm asking if it's the right tool for the job, and as diotalevi pointed out, Test::Harness may in fact be better suited for what i'm trying to do.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://493569]
help
Chatterbox?
marioroy On a large dairy farm, almost went off the road with a 10 wheeler from exhaustion. On the farm, almost went off the silo with a big tractor. At the Fransiscan monastery, almost slipped off the dome while painting it.
[marioroy]: In Saudi Arabia caught fire but didn't burn. I think angels exist.
Lady_Aleena clean up after dinner finally.
[Discipulus]: uch! so we are twice lucky to have MCE..;=)
[marioroy]: Working a midnight graveyard shift, on the way home ran out of gas. just 2 minutes later somebody stops with a small tank of gas. It's wierd. There's always someone nearby for some reason.
[Lady_Aleena]: I was the one who stop[ed in the middle of a cold night to pick up a small family walking to a gas station. I got a few gallons of free gas for the round trip, and the grandmother said she'd pray for me.
[marioroy]: Folks do not know it, but MCE was ridiculously difficult. At Niagra Falls, heard a voice on enabling Grace while in the mist boat. That 10x performance is possible.
[marioroy]: Lady_Aleena Angels on earth are real people. That's awesome.
[Lady_Aleena]: marioroy, what does MCE stand for in this instance? There are 3 pages of abbreviations to go through.

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (11)
As of 2017-05-29 08:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?