ctest_start.rst 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. ctest_start
  2. -----------
  3. Starts the testing for a given model
  4. ::
  5. ctest_start(<model> [<source> [<binary>]] [GROUP <group>] [QUIET])
  6. ctest_start([<model> [<source> [<binary>]]] [GROUP <group>] APPEND [QUIET])
  7. Starts the testing for a given model. The command should be called
  8. after the binary directory is initialized.
  9. The parameters are as follows:
  10. ``<model>``
  11. Set the dashboard model. Must be one of ``Experimental``, ``Continuous``, or
  12. ``Nightly``. This parameter is required unless ``APPEND`` is specified.
  13. ``<source>``
  14. Set the source directory. If not specified, the value of
  15. :variable:`CTEST_SOURCE_DIRECTORY` is used instead.
  16. ``<binary>``
  17. Set the binary directory. If not specified, the value of
  18. :variable:`CTEST_BINARY_DIRECTORY` is used instead.
  19. ``GROUP <group>``
  20. If ``GROUP`` is used, the submissions will go to the specified group on the
  21. CDash server. If no ``GROUP`` is specified, the name of the model is used by
  22. default.
  23. .. versionchanged:: 3.16
  24. This replaces the deprecated option ``TRACK``. Despite the name
  25. change its behavior is unchanged.
  26. ``APPEND``
  27. If ``APPEND`` is used, the existing ``TAG`` is used rather than creating a new
  28. one based on the current time stamp. If you use ``APPEND``, you can omit the
  29. ``<model>`` and ``GROUP <group>`` parameters, because they will be read from
  30. the generated ``TAG`` file. For example:
  31. .. code-block:: cmake
  32. ctest_start(Experimental GROUP GroupExperimental)
  33. Later, in another ``ctest -S`` script:
  34. .. code-block:: cmake
  35. ctest_start(APPEND)
  36. When the second script runs ``ctest_start(APPEND)``, it will read the
  37. ``Experimental`` model and ``GroupExperimental`` group from the ``TAG`` file
  38. generated by the first ``ctest_start()`` command. Please note that if you
  39. call ``ctest_start(APPEND)`` and specify a different model or group than
  40. in the first ``ctest_start()`` command, a warning will be issued, and the
  41. new model and group will be used.
  42. ``QUIET``
  43. .. versionadded:: 3.3
  44. If ``QUIET`` is used, CTest will suppress any non-error messages that it
  45. otherwise would have printed to the console.
  46. The parameters for ``ctest_start()`` can be issued in any order, with the
  47. exception that ``<model>``, ``<source>``, and ``<binary>`` have to appear
  48. in that order with respect to each other. The following are all valid and
  49. equivalent:
  50. .. code-block:: cmake
  51. ctest_start(Experimental path/to/source path/to/binary GROUP SomeGroup QUIET APPEND)
  52. ctest_start(GROUP SomeGroup Experimental QUIET path/to/source APPEND path/to/binary)
  53. ctest_start(APPEND QUIET Experimental path/to/source GROUP SomeGroup path/to/binary)
  54. However, for the sake of readability, it is recommended that you order your
  55. parameters in the order listed at the top of this page.
  56. If the :variable:`CTEST_CHECKOUT_COMMAND` variable (or the
  57. :variable:`CTEST_CVS_CHECKOUT` variable) is set, its content is treated as
  58. command-line. The command is invoked with the current working directory set
  59. to the parent of the source directory, even if the source directory already
  60. exists. This can be used to create the source tree from a version control
  61. repository.