From c1b2b7c03c899c9b066840600ec15b16ae2fa9ac Mon Sep 17 00:00:00 2001 From: Craig Scott Date: Sat, 22 Apr 2017 19:38:55 +1000 Subject: Add ctest options for limiting which tests fixtures add The new options allow the user to restrict the setup and cleanup tests automatically added for fixtures. --- Help/command/ctest_memcheck.rst | 3 + Help/command/ctest_test.rst | 17 +++ Help/manual/ctest.1.rst | 17 +++ Help/release/dev/excludeFixtures.rst | 9 ++ Source/CTest/cmCTestTestCommand.cxx | 15 +++ Source/CTest/cmCTestTestCommand.h | 3 + Source/CTest/cmCTestTestHandler.cxx | 128 ++++++++++++++++----- Source/CTest/cmCTestTestHandler.h | 3 + Source/cmCTest.cxx | 28 +++++ Source/ctest.cxx | 12 ++ Tests/RunCMake/ctest_fixtures/CMakeLists.txt.in | 2 +- Tests/RunCMake/ctest_fixtures/RunCMakeTest.cmake | 50 ++++++++ .../ctest_fixtures/exclude_any_bar-stdout.txt | 15 +++ .../ctest_fixtures/exclude_any_foo-stdout.txt | 13 +++ .../ctest_fixtures/exclude_any_foobar-stdout.txt | 9 ++ .../ctest_fixtures/exclude_cleanup_bar-stdout.txt | 15 +++ .../ctest_fixtures/exclude_cleanup_foo-stdout.txt | 15 +++ .../ctest_fixtures/exclude_setup_bar-stdout.txt | 17 +++ .../ctest_fixtures/exclude_setup_foo-stdout.txt | 15 +++ Tests/RunCMake/ctest_fixtures/test.cmake.in | 2 +- 20 files changed, 359 insertions(+), 29 deletions(-) create mode 100644 Help/release/dev/excludeFixtures.rst create mode 100644 Tests/RunCMake/ctest_fixtures/exclude_any_bar-stdout.txt create mode 100644 Tests/RunCMake/ctest_fixtures/exclude_any_foo-stdout.txt create mode 100644 Tests/RunCMake/ctest_fixtures/exclude_any_foobar-stdout.txt create mode 100644 Tests/RunCMake/ctest_fixtures/exclude_cleanup_bar-stdout.txt create mode 100644 Tests/RunCMake/ctest_fixtures/exclude_cleanup_foo-stdout.txt create mode 100644 Tests/RunCMake/ctest_fixtures/exclude_setup_bar-stdout.txt create mode 100644 Tests/RunCMake/ctest_fixtures/exclude_setup_foo-stdout.txt diff --git a/Help/command/ctest_memcheck.rst b/Help/command/ctest_memcheck.rst index a983d68..288b65a 100644 --- a/Help/command/ctest_memcheck.rst +++ b/Help/command/ctest_memcheck.rst @@ -13,6 +13,9 @@ Perform the :ref:`CTest MemCheck Step` as a :ref:`Dashboard Client`. [INCLUDE ] [EXCLUDE_LABEL ] [INCLUDE_LABEL ] + [EXCLUDE_FIXTURE ] + [EXCLUDE_FIXTURE_SETUP ] + [EXCLUDE_FIXTURE_CLEANUP ] [PARALLEL_LEVEL ] [TEST_LOAD ] [SCHEDULE_RANDOM ] diff --git a/Help/command/ctest_test.rst b/Help/command/ctest_test.rst index ce50d42..4a69491 100644 --- a/Help/command/ctest_test.rst +++ b/Help/command/ctest_test.rst @@ -13,6 +13,9 @@ Perform the :ref:`CTest Test Step` as a :ref:`Dashboard Client`. [INCLUDE ] [EXCLUDE_LABEL ] [INCLUDE_LABEL ] + [EXCLUDE_FIXTURE ] + [EXCLUDE_FIXTURE_SETUP ] + [EXCLUDE_FIXTURE_CLEANUP ] [PARALLEL_LEVEL ] [TEST_LOAD ] [SCHEDULE_RANDOM ] @@ -61,6 +64,20 @@ The options are: Specify a regular expression matching test labels to include. Tests not matching this expression are excluded. +``EXCLUDE_FIXTURE `` + If a test in the set of tests to be executed requires a particular fixture, + that fixture's setup and cleanup tests would normally be added to the test + set automatically. This option prevents adding setup or cleanup tests for + fixtures matching the ````. Note that all other fixture behavior is + retained, including test dependencies and skipping tests that have fixture + setup tests that fail. + +``EXCLUDE_FIXTURE_SETUP `` + Same as ``EXCLUDE_FIXTURE`` except only matching setup tests are excluded. + +``EXCLUDE_FIXTURE_CLEANUP `` + Same as ``EXCLUDE_FIXTURE`` except only matching cleanup tests are excluded. + ``PARALLEL_LEVEL `` Specify a positive number representing the number of tests to be run in parallel. diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst index ce81578..a89c4e9 100644 --- a/Help/manual/ctest.1.rst +++ b/Help/manual/ctest.1.rst @@ -117,6 +117,23 @@ Options This option tells ctest to NOT run the tests whose labels match the given regular expression. +``-FA , --fixture-exclude-any `` + Exclude fixtures matching ```` from automatically adding any tests to + the test set. + + If a test in the set of tests to be executed requires a particular fixture, + that fixture's setup and cleanup tests would normally be added to the test set + automatically. This option prevents adding setup or cleanup tests for fixtures + matching the ````. Note that all other fixture behavior is retained, + including test dependencies and skipping tests that have fixture setup tests + that fail. + +``-FS , --fixture-exclude-setup `` + Same as ``-FA`` except only matching setup tests are excluded. + +``-FC , --fixture-exclude-cleanup `` + Same as ``-FA`` except only matching cleanup tests are excluded. + ``-D , --dashboard `` Execute dashboard test. diff --git a/Help/release/dev/excludeFixtures.rst b/Help/release/dev/excludeFixtures.rst new file mode 100644 index 0000000..56d4226 --- /dev/null +++ b/Help/release/dev/excludeFixtures.rst @@ -0,0 +1,9 @@ +excludeFixtures +--------------- + +* The :manual:`ctest(1)` executable gained new options which allow the + developer to disable automatically adding tests to the test set to satisfy + fixture dependencies. ``-FS`` prevents adding setup tests for fixtures + matching the provided regular expression, ``-FC`` prevents adding cleanup + tests for matching fixtures and ``-FA`` prevents adding any test for matching + fixtures. diff --git a/Source/CTest/cmCTestTestCommand.cxx b/Source/CTest/cmCTestTestCommand.cxx index 21b1003..075b140 100644 --- a/Source/CTest/cmCTestTestCommand.cxx +++ b/Source/CTest/cmCTestTestCommand.cxx @@ -20,6 +20,9 @@ cmCTestTestCommand::cmCTestTestCommand() this->Arguments[ctt_INCLUDE] = "INCLUDE"; this->Arguments[ctt_EXCLUDE_LABEL] = "EXCLUDE_LABEL"; this->Arguments[ctt_INCLUDE_LABEL] = "INCLUDE_LABEL"; + this->Arguments[ctt_EXCLUDE_FIXTURE] = "EXCLUDE_FIXTURE"; + this->Arguments[ctt_EXCLUDE_FIXTURE_SETUP] = "EXCLUDE_FIXTURE_SETUP"; + this->Arguments[ctt_EXCLUDE_FIXTURE_CLEANUP] = "EXCLUDE_FIXTURE_CLEANUP"; this->Arguments[ctt_PARALLEL_LEVEL] = "PARALLEL_LEVEL"; this->Arguments[ctt_SCHEDULE_RANDOM] = "SCHEDULE_RANDOM"; this->Arguments[ctt_STOP_TIME] = "STOP_TIME"; @@ -76,6 +79,18 @@ cmCTestGenericHandler* cmCTestTestCommand::InitializeHandler() handler->SetOption("LabelRegularExpression", this->Values[ctt_INCLUDE_LABEL]); } + if (this->Values[ctt_EXCLUDE_FIXTURE]) { + handler->SetOption("ExcludeFixtureRegularExpression", + this->Values[ctt_EXCLUDE_FIXTURE]); + } + if (this->Values[ctt_EXCLUDE_FIXTURE_SETUP]) { + handler->SetOption("ExcludeFixtureSetupRegularExpression", + this->Values[ctt_EXCLUDE_FIXTURE_SETUP]); + } + if (this->Values[ctt_EXCLUDE_FIXTURE_CLEANUP]) { + handler->SetOption("ExcludeFixtureCleanupRegularExpression", + this->Values[ctt_EXCLUDE_FIXTURE_CLEANUP]); + } if (this->Values[ctt_PARALLEL_LEVEL]) { handler->SetOption("ParallelLevel", this->Values[ctt_PARALLEL_LEVEL]); } diff --git a/Source/CTest/cmCTestTestCommand.h b/Source/CTest/cmCTestTestCommand.h index 1893104..be7e783 100644 --- a/Source/CTest/cmCTestTestCommand.h +++ b/Source/CTest/cmCTestTestCommand.h @@ -53,6 +53,9 @@ protected: ctt_INCLUDE, ctt_EXCLUDE_LABEL, ctt_INCLUDE_LABEL, + ctt_EXCLUDE_FIXTURE, + ctt_EXCLUDE_FIXTURE_SETUP, + ctt_EXCLUDE_FIXTURE_CLEANUP, ctt_PARALLEL_LEVEL, ctt_SCHEDULE_RANDOM, ctt_STOP_TIME, diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index d73811b..a5cc1fa 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -362,6 +362,9 @@ void cmCTestTestHandler::Initialize() this->ExcludeLabelRegularExpression = ""; this->IncludeRegExp = ""; this->ExcludeRegExp = ""; + this->ExcludeFixtureRegExp.clear(); + this->ExcludeFixtureSetupRegExp.clear(); + this->ExcludeFixtureCleanupRegExp.clear(); TestsToRunString = ""; this->UseUnion = false; @@ -439,6 +442,18 @@ int cmCTestTestHandler::ProcessHandler() this->UseExcludeRegExp(); this->SetExcludeRegExp(val); } + val = this->GetOption("ExcludeFixtureRegularExpression"); + if (val) { + this->ExcludeFixtureRegExp = val; + } + val = this->GetOption("ExcludeFixtureSetupRegularExpression"); + if (val) { + this->ExcludeFixtureSetupRegExp = val; + } + val = this->GetOption("ExcludeFixtureCleanupRegularExpression"); + if (val) { + this->ExcludeFixtureCleanupRegExp = val; + } this->SetRerunFailed(cmSystemTools::IsOn(this->GetOption("RerunFailed"))); this->TestResults.clear(); @@ -828,13 +843,35 @@ void cmCTestTestHandler::UpdateForFixtures(ListOfTests& tests) const "Updating test list for fixtures" << std::endl, this->Quiet); + // Prepare regular expression evaluators + std::string setupRegExp(this->ExcludeFixtureRegExp); + std::string cleanupRegExp(this->ExcludeFixtureRegExp); + if (!this->ExcludeFixtureSetupRegExp.empty()) { + if (setupRegExp.empty()) { + setupRegExp = this->ExcludeFixtureSetupRegExp; + } else { + setupRegExp.append("(" + setupRegExp + ")|(" + + this->ExcludeFixtureSetupRegExp + ")"); + } + } + if (!this->ExcludeFixtureCleanupRegExp.empty()) { + if (cleanupRegExp.empty()) { + cleanupRegExp = this->ExcludeFixtureCleanupRegExp; + } else { + cleanupRegExp.append("(" + cleanupRegExp + ")|(" + + this->ExcludeFixtureCleanupRegExp + ")"); + } + } + cmsys::RegularExpression excludeSetupRegex(setupRegExp); + cmsys::RegularExpression excludeCleanupRegex(cleanupRegExp); + // Prepare some maps to help us find setup and cleanup tests for // any given fixture typedef ListOfTests::const_iterator TestIterator; typedef std::multimap FixtureDependencies; typedef FixtureDependencies::const_iterator FixtureDepsIterator; FixtureDependencies fixtureSetups; - FixtureDependencies fixtureDeps; + FixtureDependencies fixtureCleanups; for (ListOfTests::const_iterator it = this->TestList.begin(); it != this->TestList.end(); ++it) { @@ -844,13 +881,12 @@ void cmCTestTestHandler::UpdateForFixtures(ListOfTests& tests) const for (std::set::const_iterator depsIt = setups.begin(); depsIt != setups.end(); ++depsIt) { fixtureSetups.insert(std::make_pair(*depsIt, it)); - fixtureDeps.insert(std::make_pair(*depsIt, it)); } const std::set& cleanups = p.FixturesCleanup; for (std::set::const_iterator depsIt = cleanups.begin(); depsIt != cleanups.end(); ++depsIt) { - fixtureDeps.insert(std::make_pair(*depsIt, it)); + fixtureCleanups.insert(std::make_pair(*depsIt, it)); } } @@ -924,34 +960,72 @@ void cmCTestTestHandler::UpdateForFixtures(ListOfTests& tests) const // added from a previously checked test). A fixture isn't required // to have setup/cleanup tests. if (!addedFixtures.insert(requiredFixtureName).second) { - // Already added this fixture + // Already seen this fixture, no need to check it again continue; } - std::pair fixtureRange = - fixtureDeps.equal_range(requiredFixtureName); - for (FixtureDepsIterator it = fixtureRange.first; - it != fixtureRange.second; ++it) { - ListOfTests::const_iterator lotIt = it->second; - const cmCTestTestProperties& p = *lotIt; - - if (!addedTests.insert(p.Name).second) { - // Already have p in our test list - continue; + + // Only add setup tests if this fixture has not been excluded + if (setupRegExp.empty() || + !excludeSetupRegex.find(requiredFixtureName)) { + std::pair fixtureRange = + fixtureSetups.equal_range(requiredFixtureName); + for (FixtureDepsIterator it = fixtureRange.first; + it != fixtureRange.second; ++it) { + ListOfTests::const_iterator lotIt = it->second; + const cmCTestTestProperties& p = *lotIt; + + if (!addedTests.insert(p.Name).second) { + // Already have p in our test list + continue; + } + + // This is a test not yet in our list, so add it and + // update its index to reflect where it was in the original + // full list of all tests (needed to track individual tests + // across ctest runs for re-run failed, etc.) + tests.push_back(p); + tests.back().Index = + 1 + static_cast(std::distance(this->TestList.begin(), lotIt)); + ++fixtureTestsAdded; + + cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "Added setup test " + << p.Name << " required by fixture " + << requiredFixtureName << std::endl, + this->Quiet); } + } - // This is a test not yet in our list, so add it and - // update its index to reflect where it was in the original - // full list of all tests (needed to track individual tests - // across ctest runs for re-run failed, etc.) - tests.push_back(p); - tests.back().Index = - 1 + static_cast(std::distance(this->TestList.begin(), lotIt)); - ++fixtureTestsAdded; - - cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Added test " - << p.Name << " required by fixture " - << requiredFixtureName << std::endl, - this->Quiet); + // Only add cleanup tests if this fixture has not been excluded + if (cleanupRegExp.empty() || + !excludeCleanupRegex.find(requiredFixtureName)) { + std::pair fixtureRange = + fixtureCleanups.equal_range(requiredFixtureName); + for (FixtureDepsIterator it = fixtureRange.first; + it != fixtureRange.second; ++it) { + ListOfTests::const_iterator lotIt = it->second; + const cmCTestTestProperties& p = *lotIt; + + if (!addedTests.insert(p.Name).second) { + // Already have p in our test list + continue; + } + + // This is a test not yet in our list, so add it and + // update its index to reflect where it was in the original + // full list of all tests (needed to track individual tests + // across ctest runs for re-run failed, etc.) + tests.push_back(p); + tests.back().Index = + 1 + static_cast(std::distance(this->TestList.begin(), lotIt)); + ++fixtureTestsAdded; + + cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "Added cleanup test " + << p.Name << " required by fixture " + << requiredFixtureName << std::endl, + this->Quiet); + } } } diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h index 3700f8a..0edcb14 100644 --- a/Source/CTest/cmCTestTestHandler.h +++ b/Source/CTest/cmCTestTestHandler.h @@ -280,6 +280,9 @@ private: std::string ExcludeLabelRegExp; std::string IncludeRegExp; std::string ExcludeRegExp; + std::string ExcludeFixtureRegExp; + std::string ExcludeFixtureSetupRegExp; + std::string ExcludeFixtureCleanupRegExp; cmsys::RegularExpression IncludeLabelRegularExpression; cmsys::RegularExpression ExcludeLabelRegularExpression; cmsys::RegularExpression IncludeTestsRegularExpression; diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 46fa86e..010221e 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1899,6 +1899,34 @@ bool cmCTest::HandleCommandLineArguments(size_t& i, ->SetPersistentOption("ExcludeRegularExpression", args[i].c_str()); } + if (this->CheckArgument(arg, "-FA", "--fixture-exclude-any") && + i < args.size() - 1) { + i++; + this->GetHandler("test")->SetPersistentOption( + "ExcludeFixtureRegularExpression", args[i].c_str()); + this->GetHandler("memcheck") + ->SetPersistentOption("ExcludeFixtureRegularExpression", + args[i].c_str()); + } + if (this->CheckArgument(arg, "-FS", "--fixture-exclude-setup") && + i < args.size() - 1) { + i++; + this->GetHandler("test")->SetPersistentOption( + "ExcludeFixtureSetupRegularExpression", args[i].c_str()); + this->GetHandler("memcheck") + ->SetPersistentOption("ExcludeFixtureSetupRegularExpression", + args[i].c_str()); + } + if (this->CheckArgument(arg, "-FC", "--fixture-exclude-cleanup") && + i < args.size() - 1) { + i++; + this->GetHandler("test")->SetPersistentOption( + "ExcludeFixtureCleanupRegularExpression", args[i].c_str()); + this->GetHandler("memcheck") + ->SetPersistentOption("ExcludeFixtureCleanupRegularExpression", + args[i].c_str()); + } + if (this->CheckArgument(arg, "--rerun-failed")) { this->GetHandler("test")->SetPersistentOption("RerunFailed", "true"); this->GetHandler("memcheck")->SetPersistentOption("RerunFailed", "true"); diff --git a/Source/ctest.cxx b/Source/ctest.cxx index 135062d..15d4cf4 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -52,6 +52,18 @@ static const char* cmDocumentationOptions[][2] = { "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" }, diff --git a/Tests/RunCMake/ctest_fixtures/CMakeLists.txt.in b/Tests/RunCMake/ctest_fixtures/CMakeLists.txt.in index ab50fdd..5cb0b4e 100644 --- a/Tests/RunCMake/ctest_fixtures/CMakeLists.txt.in +++ b/Tests/RunCMake/ctest_fixtures/CMakeLists.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.6.2) +cmake_minimum_required (VERSION 3.8.0) project(ctest_fixtures LANGUAGES NONE) include(CTest) diff --git a/Tests/RunCMake/ctest_fixtures/RunCMakeTest.cmake b/Tests/RunCMake/ctest_fixtures/RunCMakeTest.cmake index 673cf57..1754203 100644 --- a/Tests/RunCMake/ctest_fixtures/RunCMakeTest.cmake +++ b/Tests/RunCMake/ctest_fixtures/RunCMakeTest.cmake @@ -19,6 +19,41 @@ run_ctest_test(setupFoo INCLUDE setupFoo) run_ctest_test(wontRun INCLUDE wontRun) run_ctest_test(unused INCLUDE Unused) +run_ctest_test(exclude_setup_foo + INCLUDE "one|two" + EXCLUDE_FIXTURE_SETUP "Foo" +) + +run_ctest_test(exclude_setup_bar + INCLUDE "one|two" + EXCLUDE_FIXTURE_SETUP "Bar" +) + +run_ctest_test(exclude_cleanup_foo + INCLUDE "one|two" + EXCLUDE_FIXTURE_CLEANUP "Foo" +) + +run_ctest_test(exclude_cleanup_bar + INCLUDE "one|two" + EXCLUDE_FIXTURE_CLEANUP "Bar" +) + +run_ctest_test(exclude_any_foo + INCLUDE "one|two" + EXCLUDE_FIXTURE "Foo" +) + +run_ctest_test(exclude_any_bar + INCLUDE "one|two" + EXCLUDE_FIXTURE "Bar" +) + +run_ctest_test(exclude_any_foobar + INCLUDE "one|two" + EXCLUDE_FIXTURE "Foo|Bar" +) + #------------------------------------------------------------ # CMake configure will fail due to cyclic test dependencies #------------------------------------------------------------ @@ -35,3 +70,18 @@ set(CASE_CMAKELISTS_CYCLIC_CODE [[ FIXTURES_REQUIRED "Foo") ]]) run_ctest(cyclicCleanup) + +#------------------------------------------------------------ +# Repeat some of the exclusion tests with ctest command line +# options instead of arguments to ctest_test(). This verifies +# that the command line options make it through as well. +#------------------------------------------------------------ +unset(CASE_CMAKELISTS_CYCLIC_CODE) +set(CASE_CTEST_FIXTURES_ARGS "") + +run_ctest(exclude_setup_foo -R "one|two" -FS Foo) +run_ctest(exclude_setup_foo -R "one|two" --fixture-exclude-setup Foo) +run_ctest(exclude_cleanup_foo -R "one|two" -FC Foo) +run_ctest(exclude_cleanup_foo -R "one|two" --fixture-exclude-cleanup Foo) +run_ctest(exclude_any_foo -R "one|two" -FA Foo) +run_ctest(exclude_any_foo -R "one|two" --fixture-exclude-any Foo) diff --git a/Tests/RunCMake/ctest_fixtures/exclude_any_bar-stdout.txt b/Tests/RunCMake/ctest_fixtures/exclude_any_bar-stdout.txt new file mode 100644 index 0000000..82663d5 --- /dev/null +++ b/Tests/RunCMake/ctest_fixtures/exclude_any_bar-stdout.txt @@ -0,0 +1,15 @@ +Test project .*/Tests/RunCMake/ctest_fixtures/exclude_any_bar-build + Start 3: setupFoo +1/5 Test #3: setupFoo +\.+ +Passed +[0-9.]+ sec + Start 2: setupBoth +2/5 Test #2: setupBoth +\.+ +Passed +[0-9.]+ sec + Start 1: one +3/5 Test #1: one +\.+ +Passed +[0-9.]+ sec + Start 5: cleanupFoo +4/5 Test #5: cleanupFoo +\.+ +Passed +[0-9.]+ sec + Start 6: two +5/5 Test #6: two +\.+ +Passed +[0-9.]+ sec ++ +100% tests passed, 0 tests failed out of 5 ++ +Total Test time \(real\) = +[0-9.]+ sec$ diff --git a/Tests/RunCMake/ctest_fixtures/exclude_any_foo-stdout.txt b/Tests/RunCMake/ctest_fixtures/exclude_any_foo-stdout.txt new file mode 100644 index 0000000..8c08d08 --- /dev/null +++ b/Tests/RunCMake/ctest_fixtures/exclude_any_foo-stdout.txt @@ -0,0 +1,13 @@ +Test project .*/Tests/RunCMake/ctest_fixtures/exclude_any_foo-build + Start 2: setupBoth +1/4 Test #2: setupBoth +\.+ +Passed +[0-9.]+ sec + Start 1: one +2/4 Test #1: one +\.+ +Passed +[0-9.]+ sec + Start 6: two +3/4 Test #6: two +\.+ +Passed +[0-9.]+ sec + Start 7: cleanupBar +4/4 Test #7: cleanupBar +\.+ +Passed +[0-9.]+ sec ++ +100% tests passed, 0 tests failed out of 4 ++ +Total Test time \(real\) = +[0-9.]+ sec$ diff --git a/Tests/RunCMake/ctest_fixtures/exclude_any_foobar-stdout.txt b/Tests/RunCMake/ctest_fixtures/exclude_any_foobar-stdout.txt new file mode 100644 index 0000000..876768b --- /dev/null +++ b/Tests/RunCMake/ctest_fixtures/exclude_any_foobar-stdout.txt @@ -0,0 +1,9 @@ +Test project .*/Tests/RunCMake/ctest_fixtures/exclude_any_foobar-build + Start 1: one +1/2 Test #1: one +\.+ +Passed +[0-9.]+ sec + Start 6: two +2/2 Test #6: two +\.+ +Passed +[0-9.]+ sec ++ +100% tests passed, 0 tests failed out of 2 ++ +Total Test time \(real\) = +[0-9.]+ sec$ diff --git a/Tests/RunCMake/ctest_fixtures/exclude_cleanup_bar-stdout.txt b/Tests/RunCMake/ctest_fixtures/exclude_cleanup_bar-stdout.txt new file mode 100644 index 0000000..0d27198 --- /dev/null +++ b/Tests/RunCMake/ctest_fixtures/exclude_cleanup_bar-stdout.txt @@ -0,0 +1,15 @@ +Test project .*/Tests/RunCMake/ctest_fixtures/exclude_cleanup_bar-build + Start 3: setupFoo +1/5 Test #3: setupFoo +\.+ +Passed +[0-9.]+ sec + Start 2: setupBoth +2/5 Test #2: setupBoth +\.+ +Passed +[0-9.]+ sec + Start 1: one +3/5 Test #1: one +\.+ +Passed +[0-9.]+ sec + Start 5: cleanupFoo +4/5 Test #5: cleanupFoo +\.+ +Passed +[0-9.]+ sec + Start 6: two +5/5 Test #6: two +\.+ +Passed +[0-9.]+ sec ++ +100% tests passed, 0 tests failed out of 5 ++ +Total Test time \(real\) = +[0-9.]+ sec$ diff --git a/Tests/RunCMake/ctest_fixtures/exclude_cleanup_foo-stdout.txt b/Tests/RunCMake/ctest_fixtures/exclude_cleanup_foo-stdout.txt new file mode 100644 index 0000000..5b201a3 --- /dev/null +++ b/Tests/RunCMake/ctest_fixtures/exclude_cleanup_foo-stdout.txt @@ -0,0 +1,15 @@ +Test project .*/Tests/RunCMake/ctest_fixtures/exclude_cleanup_foo-build + Start 3: setupFoo +1/5 Test #3: setupFoo +\.+ +Passed +[0-9.]+ sec + Start 2: setupBoth +2/5 Test #2: setupBoth +\.+ +Passed +[0-9.]+ sec + Start 1: one +3/5 Test #1: one +\.+ +Passed +[0-9.]+ sec + Start 6: two +4/5 Test #6: two +\.+ +Passed +[0-9.]+ sec + Start 7: cleanupBar +5/5 Test #7: cleanupBar +\.+ +Passed +[0-9.]+ sec ++ +100% tests passed, 0 tests failed out of 5 ++ +Total Test time \(real\) = +[0-9.]+ sec$ diff --git a/Tests/RunCMake/ctest_fixtures/exclude_setup_bar-stdout.txt b/Tests/RunCMake/ctest_fixtures/exclude_setup_bar-stdout.txt new file mode 100644 index 0000000..5357fef --- /dev/null +++ b/Tests/RunCMake/ctest_fixtures/exclude_setup_bar-stdout.txt @@ -0,0 +1,17 @@ +Test project .*/Tests/RunCMake/ctest_fixtures/exclude_setup_bar-build + Start 3: setupFoo +1/6 Test #3: setupFoo +\.+ +Passed +[0-9.]+ sec + Start 2: setupBoth +2/6 Test #2: setupBoth +\.+ +Passed +[0-9.]+ sec + Start 1: one +3/6 Test #1: one +\.+ +Passed +[0-9.]+ sec + Start 5: cleanupFoo +4/6 Test #5: cleanupFoo +\.+ +Passed +[0-9.]+ sec + Start 6: two +5/6 Test #6: two +\.+ +Passed +[0-9.]+ sec + Start 7: cleanupBar +6/6 Test #7: cleanupBar +\.+ +Passed +[0-9.]+ sec ++ +100% tests passed, 0 tests failed out of 6 ++ +Total Test time \(real\) = +[0-9.]+ sec$ diff --git a/Tests/RunCMake/ctest_fixtures/exclude_setup_foo-stdout.txt b/Tests/RunCMake/ctest_fixtures/exclude_setup_foo-stdout.txt new file mode 100644 index 0000000..89f7f44 --- /dev/null +++ b/Tests/RunCMake/ctest_fixtures/exclude_setup_foo-stdout.txt @@ -0,0 +1,15 @@ +Test project .*/Tests/RunCMake/ctest_fixtures/exclude_setup_foo-build + Start 2: setupBoth +1/5 Test #2: setupBoth +\.+ +Passed +[0-9.]+ sec + Start 1: one +2/5 Test #1: one +\.+ +Passed +[0-9.]+ sec + Start 5: cleanupFoo +3/5 Test #5: cleanupFoo +\.+ +Passed +[0-9.]+ sec + Start 6: two +4/5 Test #6: two +\.+ +Passed +[0-9.]+ sec + Start 7: cleanupBar +5/5 Test #7: cleanupBar +\.+ +Passed +[0-9.]+ sec ++ +100% tests passed, 0 tests failed out of 5 ++ +Total Test time \(real\) = +[0-9.]+ sec$ diff --git a/Tests/RunCMake/ctest_fixtures/test.cmake.in b/Tests/RunCMake/ctest_fixtures/test.cmake.in index 43df172..7067117 100644 --- a/Tests/RunCMake/ctest_fixtures/test.cmake.in +++ b/Tests/RunCMake/ctest_fixtures/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.6.2) +cmake_minimum_required(VERSION 3.8.0) set(CTEST_SITE "test-site") set(CTEST_BUILD_NAME "test-build-name") -- cgit v0.12