[tahoe-lafs-trac-stream] [tahoe-lafs] #1296: 'tahoe debug trial' command
tahoe-lafs
trac at tahoe-lafs.org
Tue Jan 18 04:32:00 UTC 2011
#1296: 'tahoe debug trial' command
-----------------------------------+----------------------------------------
Reporter: davidsarah | Owner: davidsarah
Type: defect | Status: assigned
Priority: major | Milestone: 1.8.2
Component: code-frontend-cli | Version: 1.8.1
Resolution: | Keywords: bbfreeze setuptools review-needed
Launchpad Bug: |
-----------------------------------+----------------------------------------
Comment (by davidsarah):
Replying to [comment:9 warner]:
> A preliminary review pass looks good. I definitely prefer the
> {{{sys.argv=['trial'..]}}} and {{{twisted_trial.run()}}} approach: it
> feels like that should be reliable. I think I'd rather get the extra
> arguments from {{{parseArgs()}}} instead of {{{sys.argv[3:]}}} though,
> as the latter feels fragile. Something like:
>
> {{{
> def parseArgs(self, *args):
> self.trial_args = args
> ...
> def trial(config):
> sys.argv = ['trial'] + list(config.trial_args)
> # This does not return
> twisted_trial.run(); sys.exit(0)
> }}}
Your feeling was right; {{{sys.argv[3:]}}} is fragile. In particular it
breaks when there are options to tahoe, for example:
{{{
bin/tahoe --quiet debug trial allmydata.test.test_base62
}}}
will pass "{{{trial allmydata.test.test_base62}}}", to Trial, causing it
to attempt to run a non-existent testsuite called "trial", in addition to
test_base62. I'll find a more robust solution.
--
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1296#comment:12>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list