From 123e00216898b1854e506389b49e1042a1b5bf6d Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 21 Jan 2025 14:51:37 -0500 Subject: Help: Document CTEST_NOTES_FILES variable --- Help/command/ctest_submit.rst | 6 ++++-- Help/manual/cmake-variables.7.rst | 1 + Help/variable/CTEST_NOTES_FILES.rst | 5 +++++ 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 Help/variable/CTEST_NOTES_FILES.rst diff --git a/Help/command/ctest_submit.rst b/Help/command/ctest_submit.rst index 3b6bf3a..c0e0c80 100644 --- a/Help/command/ctest_submit.rst +++ b/Help/command/ctest_submit.rst @@ -22,7 +22,9 @@ By default all available parts are submitted. The options are: ``PARTS ...`` - Specify a subset of parts to submit. Valid part names are:: + Specify a subset of parts to submit. Valid part names are: + + .. parsed-literal:: Start = nothing Update = ctest_update results, in Update.xml @@ -32,7 +34,7 @@ The options are: Coverage = ctest_coverage results, in Coverage.xml MemCheck = ctest_memcheck results, in DynamicAnalysis.xml and DynamicAnalysis-Test.xml - Notes = Files listed by CTEST_NOTES_FILES, in Notes.xml + Notes = Files listed by :variable:`CTEST_NOTES_FILES`, in Notes.xml ExtraFiles = Files listed by CTEST_EXTRA_SUBMIT_FILES Upload = Files prepared for upload by ctest_upload(), in Upload.xml Submit = nothing diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 087e0a9..89f67fb 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -738,6 +738,7 @@ Variables for CTest /variable/CTEST_MEMORYCHECK_SUPPRESSIONS_FILE /variable/CTEST_MEMORYCHECK_TYPE /variable/CTEST_NIGHTLY_START_TIME + /variable/CTEST_NOTES_FILES /variable/CTEST_P4_CLIENT /variable/CTEST_P4_COMMAND /variable/CTEST_P4_OPTIONS diff --git a/Help/variable/CTEST_NOTES_FILES.rst b/Help/variable/CTEST_NOTES_FILES.rst new file mode 100644 index 0000000..301b78a --- /dev/null +++ b/Help/variable/CTEST_NOTES_FILES.rst @@ -0,0 +1,5 @@ +CTEST_NOTES_FILES +----------------- + +Specify files for :command:`ctest_submit(PARTS Notes)` to submit +in a :manual:`ctest(1)` dashboard client script. -- cgit v0.12 From e7a90d0551df7609c6f11cd2ed9b5323681500ea Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 21 Jan 2025 14:55:14 -0500 Subject: Help: Document CTEST_EXTRA_SUBMIT_FILES variable --- Help/command/ctest_submit.rst | 2 +- Help/manual/cmake-variables.7.rst | 1 + Help/variable/CTEST_EXTRA_SUBMIT_FILES.rst | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 Help/variable/CTEST_EXTRA_SUBMIT_FILES.rst diff --git a/Help/command/ctest_submit.rst b/Help/command/ctest_submit.rst index c0e0c80..2b78dd9 100644 --- a/Help/command/ctest_submit.rst +++ b/Help/command/ctest_submit.rst @@ -35,7 +35,7 @@ The options are: MemCheck = ctest_memcheck results, in DynamicAnalysis.xml and DynamicAnalysis-Test.xml Notes = Files listed by :variable:`CTEST_NOTES_FILES`, in Notes.xml - ExtraFiles = Files listed by CTEST_EXTRA_SUBMIT_FILES + ExtraFiles = Files listed by :variable:`CTEST_EXTRA_SUBMIT_FILES` Upload = Files prepared for upload by ctest_upload(), in Upload.xml Submit = nothing Done = Build is complete, in Done.xml diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 89f67fb..c11ce49 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -725,6 +725,7 @@ Variables for CTest /variable/CTEST_DROP_SITE_PASSWORD /variable/CTEST_DROP_SITE_USER /variable/CTEST_EXTRA_COVERAGE_GLOB + /variable/CTEST_EXTRA_SUBMIT_FILES /variable/CTEST_GIT_COMMAND /variable/CTEST_GIT_INIT_SUBMODULES /variable/CTEST_GIT_UPDATE_CUSTOM diff --git a/Help/variable/CTEST_EXTRA_SUBMIT_FILES.rst b/Help/variable/CTEST_EXTRA_SUBMIT_FILES.rst new file mode 100644 index 0000000..21f801f --- /dev/null +++ b/Help/variable/CTEST_EXTRA_SUBMIT_FILES.rst @@ -0,0 +1,5 @@ +CTEST_EXTRA_SUBMIT_FILES +------------------------ + +Specify files for :command:`ctest_submit(PARTS ExtraFiles)` to submit +in a :manual:`ctest(1)` dashboard client script. -- cgit v0.12 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