Skip to content

doctest_discover_tests ADD_LABELS not working  #859

Open
@hcw70

Description

Description

When doing
doctest_discover_tests(${UNIT_TESTS_EXE} ADD_LABELS unittest)

i would expect that there are actually labels attached to ctest.
Howerver, in my build-dir it shows:

> ctest --print-labels
Test project ./build-x86
No Labels Exist

Investigating the generated ctest file:

> cat unittest_tests-b858cb2.cmake
add_test( [==[Matrix3x3::upperLeft()]==] ./build-x86/unittest [==[--test-case=Matrix3x3::upperLeft()]==])
set_tests_properties( [==[Matrix3x3::upperLeft()]==] PROPERTIES WORKING_DIRECTORY ./build-x86 LABELS)

(shortened the build folder in the examples)
... shows empty LABELS value for set_test_properties.

Extra information

  • doctest version: v2.4.11
  • Operating System: Ubuntu 24
  • cmake version 3.28.3

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions