set_tests_properties.rst 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. set_tests_properties
  2. --------------------
  3. Set a property of the tests.
  4. ::
  5. set_tests_properties(test1 [test2...] PROPERTIES prop1 value1 prop2 value2)
  6. Set a property for the tests. If the property is not found, CMake
  7. will report an error. Generator expressions will be expanded the same
  8. as supported by the test's add_test call. The properties include:
  9. WILL_FAIL: If set to true, this will invert the pass/fail flag of the
  10. test.
  11. PASS_REGULAR_EXPRESSION: If set, the test output will be checked
  12. against the specified regular expressions and at least one of the
  13. regular expressions has to match, otherwise the test will fail.
  14. ::
  15. Example: PASS_REGULAR_EXPRESSION "TestPassed;All ok"
  16. FAIL_REGULAR_EXPRESSION: If set, if the output will match to one of
  17. specified regular expressions, the test will fail.
  18. ::
  19. Example: PASS_REGULAR_EXPRESSION "[^a-z]Error;ERROR;Failed"
  20. Both PASS_REGULAR_EXPRESSION and FAIL_REGULAR_EXPRESSION expect a list
  21. of regular expressions.
  22. TIMEOUT: Setting this will limit the test runtime to the number of
  23. seconds specified.