/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmConfigure.h" #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_BUILD_WITH_CMAKE) #include "cmsys/ConsoleBuf.hxx" #endif #include #include #include #include static const char* cmDocumentationName[][2] = { { CM_NULLPTR, " ctest - Testing driver provided by CMake." }, { CM_NULLPTR, CM_NULLPTR } }; static const char* cmDocumentationUsage[][2] = { { CM_NULLPTR, " ctest [options]" }, { CM_NULLPTR, CM_NULLPTR } }; static const char* cmDocumentationOptions[][2] = { { "-C , --build-config ", "Choose configuration to test." }, { "-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", "Disable actual execution of tests." }, { "-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