/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ #include "CTest/cmCTestLaunch.h" #include "CTest/cmCTestScriptHandler.h" #include "cmCTest.h" #include "cmDocumentation.h" #include "cmSystemTools.h" #include "cmsys/Encoding.hxx" #if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP) # include "cmsys/ConsoleBuf.hxx" #endif #include #include #include #include static const char* cmDocumentationName[][2] = { { nullptr, " ctest - Testing driver provided by CMake." }, { nullptr, nullptr } }; static const char* cmDocumentationUsage[][2] = { { nullptr, " ctest [options]" }, { nullptr, nullptr } }; static const char* cmDocumentationOptions[][2] = { { "-C , --build-config ", "Choose configuration to test." }, { "--progress", "Enable short progress output from tests." }, { "-V,--verbose", "Enable verbose output from tests." }, { "-VV,--extra-verbose", "Enable more verbose output from tests." }, { "--debug", "Displaying more verbose internals of CTest." }, { "--output-on-failure", "Output anything outputted by the test program " "if the test should fail." }, { "--test-output-size-passed ", "Limit the output for passed tests " "to bytes" }, { "--test-output-size-failed ", "Limit the output for failed tests " "to bytes" }, { "-F", "Enable failover." }, { "-j , --parallel ", "Run the tests in parallel using the " "given number of jobs." }, { "-Q,--quiet", "Make ctest quiet." }, { "-O , --output-log ", "Output to log file" }, { "-N,--show-only[=format]", "Disable actual execution of tests. The optional 'format' defines the " "format of the test information and can be 'human' for the current text " "format or 'json-v1' for json format. Defaults to 'human'." }, { "-L , --label-regex ", "Run tests with labels matching " "regular expression." }, { "-R , --tests-regex ", "Run tests matching regular " "expression." }, { "-E , --exclude-regex ", "Exclude tests matching regular " "expression." }, { "-LE , --label-exclude ", "Exclude tests with labels " "matching regular expression." }, { "-FA , --fixture-exclude-any ", "Do not automatically " "add any tests for " "fixtures matching " "regular expression." }, { "-FS , --fixture-exclude-setup ", "Do not automatically " "add setup tests for " "fixtures matching " "regular expression." }, { "-FC , --fixture-exclude-cleanup ", "Do not automatically " "add cleanup tests for " "fixtures matching " "regular expression." }, { "-D , --dashboard ", "Execute dashboard test" }, { "-D :=", "Define a variable for script mode" }, { "-M , --test-model ", "Sets the model for a dashboard" }, { "-T , --test-action ", "Sets the dashboard action to " "perform" }, { "--track ", "Specify the track to submit dashboard to" }, { "-S