Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,807
    • Issues 3,807
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 11
    • Merge requests 11
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMake
  • CMakeCMake
  • Issues
  • #16978

Closed
Open
Created Jun 15, 2017 by Francesco Stefanni@FStefanni

CTest regex strange behavior

CTest 3.9.0-rc3 under Linux/Ubuntu 14.04 runs also some un-matching tests. For example:

ctest -R AAAA_BBBB_C
Test project XXXXXXXXXXXXXXXXXXXXXXX
    Start 26: AAAA
1/5 Test #26: AAAA ..............***Failed    0.08 sec
    Start 29: AAAA_BBBB
Failed test dependencies: AAAA
2/5 Test #29: AAAA_BBBB .......***Not Run   0.00 sec
    Start 30: AAAA_BBBB_C
Failed test dependencies: AAAA_BBBB
3/5 Test #30: AAAA_BBBB_C .....***Not Run   0.00 sec
    Start 31: AAAA_BBBB_CD
Failed test dependencies: AAAA_BBBB_C
4/5 Test #31: AAAA_BBBB_CD ....***Not Run   0.00 sec
    Start 32: AAAA_BBBB_CDE
Failed test dependencies: AAAA_BBBB_CD
5/5 Test #32: AAAA_BBBB_CDE ...***Not Run   0.00 sec

0% tests passed, 5 tests failed out of 5

Label Time Summary:
XXXXXX    =   0.08 sec (5 tests)

Total Test time (real) =   1.13 sec

The following tests FAILED:
	 26 - AAAA (Failed)
	 29 - AAAA_BBBB (Not Run)
	 30 - AAAA_BBBB_C (Not Run)
	 31 - AAAA_BBBB_CD (Not Run)
	 32 - AAAA_BBBB_CDE (Not Run)
Errors while running CTest

In the example, as expected all tests fails, BUT the "-R AAAA_BBBB_C" expression should run only:

  • AAAA_BBBB_C
  • AAAA_BBBB_CD
  • AAAA_BBBB_CDE

Instead it tries also to run:

  • AAAA
  • AAAA_BBBB

I have seen that this behavior is enabled when I specify:

  set_tests_properties(${TEST_NAME} PROPERTIES FIXTURES_SETUP "${TEST_NAME}")
  set_tests_properties(${TEST_NAME} PROPERTIES FIXTURES_REQUIRED "${PARENT_TEST}")

I mean: the wrongly running two tests are set as "fixtures" of the running tests, but I am expecting they should not run if excluded by the "-R" expression. Btw, they runs even if "-E" expression explicitly disables them.

Edited Jun 15, 2017 by Francesco Stefanni
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking