Boost logo

Boost-Build :

From: peter_nordlundse (peter.l.nordlund_at_[hidden])
Date: 2002-01-10 18:43:17

Hi all,

Here comes a newbie question:

I am trying to put together a Jamfile ...

If I run a target
unit-test mtest2 ;

I get the following output:

Next I try to write some other jam-rules and then
I manage to produce a variable that contains:

I now gess that it is possible to convert this value to the first
path that was output during the unit-test somehow, that is:

How do I do that?

Maybe I should also explain my original problem:

I have 13 test-programs, that I want to run in a shellscript,
some of them with different input arguments.

With a bad compiler maybe not all test-programs will compile,
so the test suite must handle the case where a few test-programs
are missing.
My idea is to just let the summary of the tests show how many
of the tests that actually were run, thus showing if the compilation

I have followed the directory layout of boost/libs/python
for where I located my test directory and the rest of my code.

My plan is to redirect the output from the tests to file,
next I compare the output
with expected output that is located in files.
(I should now have 1 log-file and 1 expected-file per test).
There is at least 1 reason for running the tests in a shellscript,
instead of just relying on the unit-test target:
I want to sum up the number of performed tests and the
number of tests that passed and print the summary to stdout.
Depending on the counts I output different messages.

Below is how the output looked before I started to try to
convert my stuff to using a boost Jamfile instad of my old
Makefile ...

Compiled files with flags:"-I. -Wall -ansi -pedantic -fstrict-aliasing"
./ -------------------------------------
./ Starting test:Mon Mar 27 12:46:53 2000
./ Test 1 OK, command:mtest
./ Test 2 OK, command:mtest 2
./ Test 3 OK, command:mtest 2 3
./ Test 4 OK, command:mtest 2 3 4
./ Test 5 OK, command:mtest 2 3 4 5
./ Test 6 OK, command:nmtest
./ Test 7 OK, command:smtest
./ Test 8 OK, command:dmtest
./ Test 9 OK, command:sdmtest
./ Test 10 OK, command:nmtest 2
./ Test 11 OK, command:smtest 2
./ Test 12 OK, command:dmtest 2
./ Test 13 OK, command:sdmtest 2
./ Test 14 OK, command:bad1test
./ Test 15 OK, command:bad1test 2
./ Test 16 OK, command:bad2test
./ Test 17 OK, command:pmtest persistentstore
./ Test 18 OK, command:pmtest persistentstore
./ Test 19 OK, command:pmtest persistentstore
./ Test 20 OK, command:pmtest persistentstore
./ Test 21 OK, command:nmnttest
./ Test 22 OK, command:nmnttest 2
./ Test summary:------------------------
./ 22 out of 22 tests were performed.
./ ********* All tests passed! *********
./ -------------------------------------

My plan is now to get hold of all paths to the excutable test-programs
and use them as input arguments to my shellscript.
If you think this idea is stupid, do you have any better suggestion?
If so, please try to remember that I have severe difficulties to
understand jam ;-).

By the way, do you know of any over-commented easy-to-understand
Jamfile-examples? I have not found any, when browsing around
the Boost and Perforce Jam docs.

Best Regards,
Peter Nordlund


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