Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 ....


Comment on Re^2: organizing/ running non-module related tests
Select or Download Code
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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (14)
As of 2015-07-01 21:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (22 votes), past polls