Sfoglia il codice sorgente

Help: Clarify 'ctest --extra-submit'

Also fix its test to submit a valid file.

Fixes: #26611
Brad King 1 anno fa
parent
commit
9204721eda
2 ha cambiato i file con 12 aggiunte e 7 eliminazioni
  1. 2 3
      Help/manual/ctest.1.rst
  2. 10 4
      Tests/CTestTest2/test.cmake.in

+ 2 - 3
Help/manual/ctest.1.rst

@@ -795,9 +795,8 @@ The available ``<dashboard-options>`` are the following:
 
 .. option:: --extra-submit <file>[;<file>]
 
- 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 <header>
 

+ 10 - 4
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()