From: peter_nordlundse (peter.l.nordlund_at_[hidden])
Date: 2002-01-10 18:43:17
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
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
Compiled files with flags:"-I. -Wall -ansi -pedantic -fstrict-aliasing"
./test.sh: Starting test:Mon Mar 27 12:46:53 2000
./test.sh: Test 1 OK, command:mtest
./test.sh: Test 2 OK, command:mtest 2
./test.sh: Test 3 OK, command:mtest 2 3
./test.sh: Test 4 OK, command:mtest 2 3 4
./test.sh: Test 5 OK, command:mtest 2 3 4 5
./test.sh: Test 6 OK, command:nmtest
./test.sh: Test 7 OK, command:smtest
./test.sh: Test 8 OK, command:dmtest
./test.sh: Test 9 OK, command:sdmtest
./test.sh: Test 10 OK, command:nmtest 2
./test.sh: Test 11 OK, command:smtest 2
./test.sh: Test 12 OK, command:dmtest 2
./test.sh: Test 13 OK, command:sdmtest 2
./test.sh: Test 14 OK, command:bad1test
./test.sh: Test 15 OK, command:bad1test 2
./test.sh: Test 16 OK, command:bad2test
./test.sh: Test 17 OK, command:pmtest persistentstore
./test.sh: Test 18 OK, command:pmtest persistentstore
./test.sh: Test 19 OK, command:pmtest persistentstore
./test.sh: Test 20 OK, command:pmtest persistentstore
./test.sh: Test 21 OK, command:nmnttest
./test.sh: Test 22 OK, command:nmnttest 2
./test.sh: Test summary:------------------------
./test.sh: 22 out of 22 tests were performed.
./test.sh: ********* 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.
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