|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2002-04-04 09:53:17
David Abrahams wrote:
> However, I would prefer this interface:
>
> class TestDirectory:
> __init__(source_path = None):
> """creates a temporary directory and, if
> source_path is supplied, copies the directory tree rooted at source_path
> to the temporary directory"""
>
> close():
>
> """deletes the contents of the temp directory if not already
> done"""
> __del__():
> """deletes the contents of the temp directory if not already
> done"""
>
> path():
> """returns the absolute path to the root of the scratch
> directory"""
>
> expect_addition(file):
> expect_removal(file):
> ... # as described in your doc
>
> class Tester:
>
> def __init__
> # does not create a scratch tree
>
> run_build_system(args, working_dir, ... )
> """runs build system in working_dir..."""
>
> We would need something like this in order to support testing
> ALL_LOCATE_TARGET (or whatever the equivalent will be). I realize this
> is a big change for you, so please use careful judgement about it. If it
> isn't obviously "more right" to you, please say so, and consider
> rejecting my suggestion.
I have not yet any final opinion, and surely won't have it till tomorrow.
Some questions:
1. Do you mean that class TestDirectory will also contain the changes made to
this directory during last build system run?
2. Do you mean that argument 'working_dir' to Tester.run_build_system should
be of type 'TestDirectory' and that argument will be modified to repsentend
the changes made to the dir?
3. I have a vague feeling that your design will leave class Tester with no
methods, except for __init__ and run_build_system. Have I missed something?
- Volodya
3.
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk