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

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/' ); system( 'my/dir/' ); system( 'my/dir/' );
which looks an *aweful* lot like a  make target to me.

the alternative is:  [ mybox ] --> ./ 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://493569]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2017-02-26 02:18 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (371 votes). Check out past polls.