瀏覽代碼

Merge topic 'ctest-extra-submit'

9204721eda Help: Clarify 'ctest --extra-submit'
e7a90d0551 Help: Document CTEST_EXTRA_SUBMIT_FILES variable
123e002168 Help: Document CTEST_NOTES_FILES variable

Acked-by: Kitware Robot <[email protected]>
Acked-by: buildbot <[email protected]>
Merge-request: !10212
Brad King 9 月之前
父節點
當前提交
1828074ad7

+ 5 - 3
Help/command/ctest_submit.rst

@@ -22,7 +22,9 @@ By default all available parts are submitted.
 The options are:
 
 ``PARTS <part>...``
-  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,8 +34,8 @@ 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
-    ExtraFiles = Files listed by CTEST_EXTRA_SUBMIT_FILES
+    Notes      = Files listed by :variable:`CTEST_NOTES_FILES`, in Notes.xml
+    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

+ 2 - 0
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
@@ -738,6 +739,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

+ 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>
 

+ 5 - 0
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.

+ 5 - 0
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.

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