Boost.Test - How to write a test that doesn't run automatically

288 views Asked by At

A project I am working on uses continuous integration (CI) system that automatically builds and runs all test suites. Auto tests are run without any command line arguments. I would like to add long running tests into existing suites and I don't want those test to be trigger by CI. What is the proper way to add tests that don't run automatically?

I am thinking to use custom command line arguments. Is there more explicit way to do it?

1

There are 1 answers

0
Alex Guteniev On BEST ANSWER

See Enabling or disabling test unit execution.

Essentially,

  BOOST_AUTO_TEST_CASE(test1, * boost::unit_test::disabled())
  {
     ...
  }

If you run without parameters, it will not execute.

With --run_test=test1 or --run_test=*, it still will execute.