1

I have a VC++ project which has two build configurations, each causes a different 3rd-party library to be used. e.g Release_A & Release_B use libraries A & B, and wrap their functionality.

We use a set of boost.test unit tests so we can be sure both versions work the same, so we compile a test-suite app against both build_configurations to give test_A.exe & test_B.exe, and these tests emit test_A.xml & test_B.xml.

The problem is that the test XML does not distinguish in any way which version was tested, so when we pull these two XML files into a tool like Jenkins, it's not possible to tell which configuration is to blame for any failures.

Is there a neat way to do this in the C++ testsuite code somehow?

Mr. Boy
  • 60,845
  • 93
  • 320
  • 589

1 Answers1

0

Well I found an easy answer... set a preprocessor #define in the project settings for each build configuration, and bake this into the BOOST_TEST_MODULE definition.

e.g.:

#define BOOST_TEST_MODULE MyAppName(SOME_PREPROCESSOR_VAR)
Mr. Boy
  • 60,845
  • 93
  • 320
  • 589