From 9204721eda1350ccf266119cdd2b80c61b2e7ebf Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 21 Jan 2025 14:42:58 -0500 Subject: Help: Clarify 'ctest --extra-submit' Also fix its test to submit a valid file. Fixes: #26611 --- Help/manual/ctest.1.rst | 5 ++--- Tests/CTestTest2/test.cmake.in | 14 ++++++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst index e8aa08e..76d617a 100644 --- a/Help/manual/ctest.1.rst +++ b/Help/manual/ctest.1.rst @@ -795,9 +795,8 @@ The available ```` are the following: .. option:: --extra-submit [;] - Submit extra files to the dashboard. - - This option will submit extra files to the dashboard. + Submit extra ``.xml`` part files to the dashboard. + See the :command:`ctest_submit` command's ``PARTS ExtraFiles`` option. .. option:: --http-header
diff --git a/Tests/CTestTest2/test.cmake.in b/Tests/CTestTest2/test.cmake.in index 48fd82a..9132396 100644 --- a/Tests/CTestTest2/test.cmake.in +++ b/Tests/CTestTest2/test.cmake.in @@ -56,7 +56,13 @@ set(CTEST_DROP_LOCATION "@path@/submit.php?project=PublicDashboard") CTEST_SUBMIT(RETURN_VALUE res) -# Test submission of a subset of parts. -set(CTEST_EXTRA_SUBMIT_FILES ${CTEST_NOTES_FILES}) -CTEST_SUBMIT(RETURN_VALUE res PARTS ExtraFiles) -set(CTEST_EXTRA_SUBMIT_FILES) +set(notes_glob "${CTEST_BINARY_DIRECTORY}/Testing/20[0-9][0-9][0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]/Notes.xml") +file(GLOB notes_xml "${notes_glob}") +if(notes_xml) + list(GET notes_xml -1 notes_xml) + set(CTEST_EXTRA_SUBMIT_FILES ${notes_xml}) + CTEST_SUBMIT(RETURN_VALUE res PARTS ExtraFiles) + set(CTEST_EXTRA_SUBMIT_FILES) +else() + message(SEND_ERROR "Notes.xml not found:\n ${notes_glob}") +endif() -- cgit v0.12