Skip to content

SubProjects not reporting from single run #2993

@cmcknigh

Description

@cmcknigh

Bug report

When configuring a large multi-project cmake system.
Trying to implement a project setup so I can call 1 ctest command, and all sub projects will report as subprojects to one build in the dashboard.
This may be an issue with missing details in the cmake files, or an issue with ctest not creating/including the details cdash needs to display this data. I have tried just about everything I can find online for how this should be structured.

Results:

When I run ctest -V -S CTestRun.cmake from the sub projects directly the subproject is reported as expected,
But when running ctest from the root of the project...

Expected Behavior

...I would expect that all of the subprojects report with related subproject displayed on the dashboard

Actual Behavior

...I do not see subprojects when I run from the root, only when I run the subproject individually

Image

CDash Version

tried with v3.1.0 and v4.2.0

Additional Information

./CMakeLists.txt

project(SubProjectTests)
...
enable_testing()
include(CTest)
set(CTEST_PROJECT_SUBPROJECTS subproject1 subproject2 )

add_subdirectory(./subproject1)
add_subdirectory(./subproject2)
...

./CTestConfig.cmake

...
set(CTEST_PROJECT_SUBPROJECTS subproject1 subproject2)
...

./CTestRun.cmake

set(CTEST_USE_LAUNCHERS 1)
set(ENV{CTEST_USE_LAUNCHERS_DEFAULT} 1)

set(CTEST_BUILD_NAME "SubProjectTests")
set(CTEST_BUILD_TYPE "Experimental")
...
set(CTEST_PROJECT_SUBPROJECTS subproject1 subproject2)

...

./subproject1/CMakeLists.txt

...
add test (
    NAME  subproject1-test1
    COMMAND run-test1
) 
set_property(
    TEST subproject1-test1
    PROPERTY LABELS "subproject1"
)
...

./subproject1/CTestRun.cmake

set(CTEST_PROJECT_SUBPROJECTS subproject1)

./subproject2/CMakeLists.txt

...
add test (
    NAME  subproject2-test1
    COMMAND run-test1
) 
set_property(
    TEST subproject2-test1
    PROPERTY LABELS "subproject2"
)
...

./subproject2/CTestRun.cmake

...
set(CTEST_PROJECT_SUBPROJECTS subproject2)
...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions