|
Boost-Build : |
Subject: [Boost-build] [boost-build] bjam helper: unit-test and testing/run - able to define environment variable?
From: Steve Lorimer (steve.lorimer_at_[hidden])
Date: 2014-11-26 19:17:29
When boost-build automatically runs unit tests using either the unit-test
or the testing/run jam rule, is it possible to have an environment variable
automatically defined?
We have a cpu frequency calc calibration routine which bails out if we
can't calibrate within a certain tolerance level.
This is acceptable behaviour in production, and in practice never happens.
However we get intermittent failures on our build server due to box
pressure, pressure which we just don't get on the production servers.
I'd like to put in a check for an environment variable which can prevent
the calibration failure only during unit tests.
Something along the lines of:
char* testing = getenv("BJAM_UNIT_TEST");
if (!testing)
throw std::runtime_exception("frequency calibration failure");
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