Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-03-11 03:16:47

On Thursday 10 March 2005 20:48, Niklaus Giger wrote:

> I wondered why the point 2 in test_system.html describing run_build_system
> didn't work. It says "Changes to subdir, if it is specified. If it is not
> absolute path, it is relative to the working dir."
> After peeking into the source code this small patches allowed me to test
> scripts directly in their directory without having to create a temporary
> copy.

I see, you want to use some existing directory for testing, right?

> Otherwise the test_system is very good for my needs and my tests begin to
> consume hours of CPU time,

Do you mean you're writing some tests of your own using the

> but I am happy with it as the most decisive
> tests are run at the beginning and the rest gives me the confidence that
> our whole build infrastructure works as it should. Thanks a lot.
> 263a264
> >         if not os.path.isabs(subdir):
> 264a266,268
> >         else:
> >             self.previous_tree = build_tree(subdir)
> 321a326
> >         if not os.path.isabs(subdir):
> 322a328,329
> >         else:
> >             self.tree = build_tree(subdir)

Two points:

1. Please send patches as unified diff. ("diff -u" or "cvs diff -u").
2. I'm worried about the different behaviour of relative and absolute paths

- if you specify relative path, we track the changes to the entire working
- if you specify absolute path (even if it points inside the working
direcotory), we track changes only to the specified directory

Maybe, a better approach would be:

- outlaw absolute paths as value of 'subdir'
- allows to specify working dir, but adding 'workdir' argument to __init__
and passing it to TestCmd.__init__

Or, in fact, you can do this:

t = Tester()

just like does, but it's ugly.

What do you think?

- Volodya


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at