-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update VERSION.txt * update VERSION.txt * Add CTest add_test() processor and documentation type * Add config options for documenting undocumented add_test() invocations * Delete VERSION.txt * Add tests for documenting CTest tests * Add sample and corr RST for ctest add_test * Add documentation for documenting ctest add_test() * Add test for incorrect ctest add_test params * Add additional error checking test for documenting ctest add_test() * Fix minor comment issue Co-authored-by: cmakepp[bot] <cmakepp[bot]@github.com> Co-authored-by: Ryan Richard <[email protected]>
- Loading branch information
1 parent
b6436f0
commit 7184b41
Showing
16 changed files
with
249 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
.. Copyright 2021 CMakePP | ||
.. | ||
.. Licensed under the Apache License, Version 2.0 (the "License"); | ||
.. you may not use this file except in compliance with the License. | ||
.. You may obtain a copy of the License at | ||
.. | ||
.. http://www.apache.org/licenses/LICENSE-2.0 | ||
.. | ||
.. Unless required by applicable law or agreed to in writing, software | ||
.. distributed under the License is distributed on an "AS IS" BASIS, | ||
.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
.. See the License for the specific language governing permissions and | ||
.. limitations under the License. | ||
.. | ||
############################ | ||
Documenting a CTest Test | ||
############################ | ||
|
||
CMinx can be used to document a CTest test created by the | ||
`add_test() <https://cmake.org/cmake/help/latest/command/add_test.html>`_ command. | ||
Again, this is done analogous to other documentation use cases, *i.e.*, by | ||
proceeding the ``add_test()`` command with a | ||
documentation comment. For example, | ||
|
||
.. literalinclude:: ../../../tests/test_samples/ctest_add_test.cmake | ||
:language: cmake | ||
|
||
which generates: | ||
|
||
.. literalinclude:: ../../../tests/test_samples/corr_rst/ctest_add_test.rst | ||
:language: rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
########################### | ||
test_samples.ctest_add_test | ||
########################### | ||
|
||
.. module:: test_samples.ctest_add_test | ||
|
||
|
||
.. function:: example_test(COMMAND echo hello WORKING_DIRECTORY build/) | ||
|
||
|
||
.. warning:: This is a CTest test definition, do not call this manually. Use the "ctest" program to execute this test. | ||
|
||
This is how to document a CTest test. | ||
Note that this is not a CMakeTest, | ||
but rather a vanilla CMake add_test() command. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#[[[ | ||
# This is how to document a CTest test. | ||
# Note that this is not a CMakeTest, | ||
# but rather a vanilla CMake add_test() command. | ||
#]] | ||
add_test( | ||
NAME example_test | ||
COMMAND echo hello | ||
WORKING_DIRECTORY build/ | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters