ctest_start.rst 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. This replaces the deprecated option ``TRACK``. Despite the name
  23. change its behavior is unchanged.
  24. ``APPEND``
  25. If ``APPEND`` is used, the existing ``TAG`` is used rather than creating a new
  26. one based on the current time stamp. If you use ``APPEND``, you can omit the
  27. ``<model>`` and ``GROUP <group>`` parameters, because they will be read from
  28. the generated ``TAG`` file. For example:
  29. .. code-block:: cmake
  30. ctest_start(Experimental GROUP GroupExperimental)
  31. Later, in another ``ctest -S`` script:
  32. .. code-block:: cmake
  33. ctest_start(APPEND)
  34. When the second script runs ``ctest_start(APPEND)``, it will read the
  35. ``Experimental`` model and ``GroupExperimental`` group from the ``TAG`` file
  36. generated by the first ``ctest_start()`` command. Please note that if you
  37. call ``ctest_start(APPEND)`` and specify a different model or group than
  38. in the first ``ctest_start()`` command, a warning will be issued, and the
  39. new model and group will be used.
  40. ``QUIET``
  41. If ``QUIET`` is used, CTest will suppress any non-error messages that it
  42. otherwise would have printed to the console.
  43. The parameters for ``ctest_start()`` can be issued in any order, with the
  44. exception that ``<model>``, ``<source>``, and ``<binary>`` have to appear
  45. in that order with respect to each other. The following are all valid and
  46. equivalent:
  47. .. code-block:: cmake
  48. ctest_start(Experimental path/to/source path/to/binary GROUP SomeGroup QUIET APPEND)
  49. ctest_start(GROUP SomeGroup Experimental QUIET path/to/source APPEND path/to/binary)
  50. ctest_start(APPEND QUIET Experimental path/to/source GROUP SomeGroup path/to/binary)
  51. However, for the sake of readability, it is recommended that you order your
  52. parameters in the order listed at the top of this page.
  53. If the :variable:`CTEST_CHECKOUT_COMMAND` variable (or the
  54. :variable:`CTEST_CVS_CHECKOUT` variable) is set, its content is treated as
  55. command-line. The command is invoked with the current working directory set
  56. to the parent of the source directory, even if the source directory already
  57. exists. This can be used to create the source tree from a version control
  58. repository.