From 035c7fabc3b82cbc9a346c11abe2e9462b4c0379 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Tue, 30 Oct 2012 15:39:57 -0700 Subject: Imported Upstream version 2.8.9 --- Source/ctest.cxx | 343 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 343 insertions(+) create mode 100644 Source/ctest.cxx (limited to 'Source/ctest.cxx') diff --git a/Source/ctest.cxx b/Source/ctest.cxx new file mode 100644 index 000000000..d65077748 --- /dev/null +++ b/Source/ctest.cxx @@ -0,0 +1,343 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2000-2009 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#include "cmCTest.h" +#include "cmSystemTools.h" + +// Need these for documentation support. +#include "cmake.h" +#include "cmDocumentation.h" + +#include "CTest/cmCTestScriptHandler.h" +#include "CTest/cmCTestLaunch.h" + +//---------------------------------------------------------------------------- +static const char * cmDocumentationName[][3] = +{ + {0, + " ctest - Testing driver provided by CMake.", 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationUsage[][3] = +{ + {0, + " ctest [options]", 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationDescription[][3] = +{ + {0, + "The \"ctest\" executable is the CMake test driver program. " + "CMake-generated build trees created for projects that use " + "the ENABLE_TESTING and ADD_TEST commands have testing support. " + "This program will run the tests and report results.", 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationOptions[][3] = +{ + {"-C , --build-config ", "Choose configuration to test.", + "Some CMake-generated build trees can have multiple build configurations " + "in the same tree. This option can be used to specify which one should " + "be tested. Example configurations are \"Debug\" and \"Release\"."}, + {"-V,--verbose", "Enable verbose output from tests.", + "Test output is normally suppressed and only summary information is " + "displayed. This option will show all test output."}, + {"-VV,--extra-verbose", "Enable more verbose output from tests.", + "Test output is normally suppressed and only summary information is " + "displayed. This option will show even more test output."}, + {"--debug", "Displaying more verbose internals of CTest.", + "This feature will result in large number of output that is mostly " + "useful for debugging dashboard problems."}, + {"--output-on-failure", "Output anything outputted by the test program " + "if the test should fail. This option can also be enabled by setting " + "the environment variable CTEST_OUTPUT_ON_FAILURE"}, + {"-F", "Enable failover.", "This option allows ctest to resume a test " + "set execution that was previously interrupted. If no interruption " + "occurred, the -F option will have no effect."}, + {"-j , --parallel ", "Run the tests in parallel using the" + "given number of jobs.", + "This option tells ctest to run the tests in parallel using given " + "number of jobs."}, + {"-Q,--quiet", "Make ctest quiet.", + "This option will suppress all the output. The output log file will " + "still be generated if the --output-log is specified. Options such " + "as --verbose, --extra-verbose, and --debug are ignored if --quiet is " + "specified."}, + {"-O , --output-log ", "Output to log file", + "This option tells ctest to write all its output to a log file."}, + {"-N,--show-only", "Disable actual execution of tests.", + "This option tells ctest to list the tests that would be run but not " + "actually run them. Useful in conjunction with the -R and -E options."}, + {"-L , --label-regex ", "Run tests with labels matching " + "regular expression.", + "This option tells ctest to run only the tests whose labels match the " + "given regular expression."}, + {"-R , --tests-regex ", "Run tests matching regular " + "expression.", + "This option tells ctest to run only the tests whose names match the " + "given regular expression."}, + {"-E , --exclude-regex ", "Exclude tests matching regular " + "expression.", + "This option tells ctest to NOT run the tests whose names match the " + "given regular expression."}, + {"-LE , --label-exclude ", "Exclude tests with labels " + "matching regular expression.", + "This option tells ctest to NOT run the tests whose labels match the " + "given regular expression."}, + {"-D , --dashboard ", "Execute dashboard test", + "This option tells ctest to perform act as a Dart client and perform " + "a dashboard test. All tests are , where Mode can be " + "Experimental, Nightly, and Continuous, and Test can be Start, Update, " + "Configure, Build, Test, Coverage, and Submit."}, + {"-D :=", "Define a variable for script mode", + "Pass in variable values on the command line. Use in " + "conjunction with -S to pass variable values to a dashboard script. " + "Parsing -D arguments as variable values is only attempted if " + "the value following -D does not match any of the known dashboard " + "types."}, + {"-M , --test-model ", "Sets the model for a dashboard", + "This option tells ctest to act as a Dart client " + "where the TestModel can be Experimental, " + "Nightly, and Continuous. Combining -M and -T is similar to -D"}, + {"-T , --test-action ", "Sets the dashboard action to " + "perform", + "This option tells ctest to act as a Dart client " + "and perform some action such as start, build, test etc. " + "Combining -M and -T is similar to -D"}, + {"--track ", "Specify the track to submit dashboard to", + "Submit dashboard to specified track instead of default one. By " + "default, the dashboard is submitted to Nightly, Experimental, or " + "Continuous track, but by specifying this option, the track can be " + "arbitrary."}, + {"-S