pic11
pic11

Reputation: 14943

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

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?

Upvotes: 0

Views: 409

Answers (1)

Alex Guteniev
Alex Guteniev

Reputation: 13634

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.

Upvotes: 1

Related Questions