# from Philippe Bruhat (BooK) # on Wednesday 04 April 2007 05:42 am: >Usually because I want to run a specific subset of tests only. > >A typical example is: > > $ AMS_REMOTE=1 perl -Ilib t/90up2date.t simpsons > 1..26 > # Testing 13 themes using the network (may take a while) > ok 1 # skip Acme::MetaSyntactic::dilbert ignored upon request ... > ok 18 # skip Acme::MetaSyntactic::services ignored upon request > ok 19 - Acme::MetaSyntactic::simpsons has 246 items > ok 20 - Acme::MetaSyntactic::simpsons is up to date > ok 21 # skip Acme::MetaSyntactic::tmnt ignored upon request ... >(Even though the example is for an Acme:: module, I have the intention >to use this at work with a semi-intelligent wrapper around prove that >I'm working on.)
Well, I'm not sure about passing arbitrary parameters to test scripts via prove/runtests. If my tests take arguments, it is typically when I'm running them manually with some sort of non-batch-mode interaction or debugging enabled. Thus, prove would need to allow me to say which arguments went to which tests. That might be nice, but why would I be running the tests in a harness in anything other than batch mode? If you're passing the same argument to all of the tests, that is essentially equivalent to an environment variable, so I can't see the benefit in having prove/runtests supporting that. Further, if you really want it, the "everybody gets the same argument" mode is already supported via --exec as ovid mentioned. Now, the problem you're trying to solve appears to be "run only part of the tests". To me, that doesn't involve passing parameters to the scripts. Can we think about this in terms of the producer supporting some sort of dynamic skip concept involving labels or such? Possibly a bit of yaml shoved in an environment variable? --Eric -- "You can't win. You can't break even. You can't quit." --Ginsberg's Restatement of the Three Laws of Thermodynamics --------------------------------------------------- http://scratchcomputing.com ---------------------------------------------------