ctest_start.rst 2.9 KB

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