summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Expand)AuthorAgeFilesLines
* Issue #25764: Preserve subprocess fork exception when preexec_fn usedMartin Panter2015-11-301-17/+18
* Fixed reference leak when read truncated pickle.Serhiy Storchaka2015-11-301-1/+3
* Issue #19687: Fixed possible integer overflows in ElementTree.Serhiy Storchaka2015-11-251-10/+34
* Issue #25725: Fixed a reference leak in pickle.loads() when unpicklingSerhiy Storchaka2015-11-251-19/+8
* Issue #23914: Fixed SystemError raised by unpickler on broken pickle data.Serhiy Storchaka2015-11-231-3/+16
* Issue #25691: Fixed crash on deleting ElementTree.Element attributes.Serhiy Storchaka2015-11-231-0/+6
* Issue #19687: Fixed memory leak on failed Element slice assignment.Serhiy Storchaka2015-11-221-21/+15
* rm trailing wsBenjamin Peterson2015-11-141-1/+1
* fix possible memory lea k in _get_aia_uri (closes #25578)Benjamin Peterson2015-11-141-1/+4
* fix build with older openssl (#25569)Benjamin Peterson2015-11-141-1/+1
* Issue #25498: Fix GC crash due to ctypes objects wrapping a memoryviewMartin Panter2015-11-131-18/+38
* always set OP_NO_SSLv3 by default (closes #25530)Benjamin Peterson2015-11-121-0/+2
* fix memory leak in _get_crl_dp (closes #25569)Benjamin Peterson2015-11-121-28/+24
* Issue #25523: Further a-to-an corrections.Serhiy Storchaka2015-11-022-2/+2
* Issue #25523: Correct "a" article to "an" articleMartin Panter2015-11-0213-26/+26
* add a missing comma (closes #25371)Benjamin Peterson2015-10-111-2/+2
* Issue #22413: Document newline effect on StringIO initializer and getvalueMartin Panter2015-10-101-1/+6
* Various minor typos in documentation and commentsMartin Panter2015-10-071-1/+1
* Issue #25290: Fix typo in csv.reader() docstringBerker Peksag2015-10-021-1/+1
* Issue #25262. Added support for BINBYTES8 opcode in Python implementation ofSerhiy Storchaka2015-09-291-1/+11
* Closes issue #23600: Wrong results from tzinfo.fromutc().Alexander Belopolsky2015-09-281-1/+1
* Issue #25203: Failed readline.set_completer_delims() no longer left theSerhiy Storchaka2015-09-271-4/+5
* fix spacingBenjamin Peterson2015-09-271-2/+2
* initialize return value to NULL to avoid compiler compliants (closes #25245)Benjamin Peterson2015-09-271-0/+1
* prevent overflow in _Unpickler_ReadBenjamin Peterson2015-09-261-0/+6
* Issue #23517: Fix rounding in fromtimestamp() and utcfromtimestamp() methodsVictor Stinner2015-09-181-8/+63
* Issue #25021: Merge from 3.3 to 3.4Kristján Valur Jónsson2015-09-121-2/+10
|\
| * Issue #25021: Correctly make sure that product.__setstate__ does not accessKristján Valur Jónsson2015-09-121-2/+10
* | Issue #24684: socket.socket.getaddrinfo() now callsVictor Stinner2015-09-111-3/+1
* | Issue #25030: Do not document seek() as if it accepts keyword argumentsMartin Panter2015-09-111-1/+1
* | os.sendfile(headers=None, trailers=None) arguments are not actually acceptedMartin Panter2015-09-091-3/+3
* | Issue #23738: Document and test actual keyword parameter namesMartin Panter2015-09-091-8/+9
* | Raise more correct exception on overflow in setting buffer_size attribute ofSerhiy Storchaka2015-09-071-6/+7
* | Issue #25019: Fixed a crash caused by setting non-string key of expat parser.Serhiy Storchaka2015-09-071-1/+6
* | Issue #24917: time_strftime() buffer over-read.Steve Dower2015-09-071-0/+2
* | Backed out changeset: a29b49d57769Steve Dower2015-09-061-6/+0
* | Issue #24917: time_strftime() Buffer Over-read. Patch by John Leitch.Steve Dower2015-09-061-0/+6
* | Don't use defined() in C preprocessor macrosVictor Stinner2015-09-031-10/+6
* | include fcntl.h on all *nix platforms (closes #24217)Benjamin Peterson2015-08-021-2/+2
* | Issue #23652: Make the select module compile against LSB headers.Zachary Ware2015-08-021-0/+11
* | Issue #23319: Fix ctypes.BigEndianStructure, swap correctly bytes. PatchVictor Stinner2015-07-291-0/+1
* | Issue #24735: Fix invalid memory access in combinations_with_replacement()Raymond Hettinger2015-07-281-5/+7
* | Issue #24683: Fixed crashes in _json functions called with arguments ofSerhiy Storchaka2015-07-261-2/+10
* | Issue #24620: Random.setstate() now validates the value of state last element.Serhiy Storchaka2015-07-241-0/+4
* | Issue #19663: Improve error message for defaultdict.Raymond Hettinger2015-07-201-1/+1
* | improve style of the convert macro (#24655)Benjamin Peterson2015-07-181-7/+7
* | Closes #23247: Fix a crash in the StreamWriter.reset() of CJK codecsVictor Stinner2015-07-161-0/+3
* | Issue #18684: Fixed reading out of the buffer in the re module.Serhiy Storchaka2015-07-062-14/+41
* | fix use after free (closes #24552)Benjamin Peterson2015-07-021-1/+1
* | Issue #19176: Fixed doctype() related bugs in C implementation of ElementTree.Serhiy Storchaka2015-06-291-14/+21
02e0530d3aadc165a41'>Source/CTest/cmCTestRunTest.h
@@ -27,6 +27,8 @@ public:
cmCTestRunTest(cmCTestTestHandler* handler);
~cmCTestRunTest();
+ void SetNumberOfRuns(int n) {this->NumberOfRunsLeft = n;}
+ void SetRunUntilFailOn() { this->RunUntilFail = true;}
void SetTestProperties(cmCTestTestHandler::cmCTestTestProperties * prop)
{ this->TestProperties = prop; }
@@ -58,7 +60,10 @@ public:
void ComputeArguments();
void ComputeWeightedCost();
+
+ bool StartAgain();
private:
+ bool NeedsToRerun();
void DartProcessing();
void ExeNotFound(std::string exe);
// Figures out a final timeout which is min(STOP_TIME, NOW+TIMEOUT)
@@ -92,6 +97,10 @@ private:
std::string ActualCommand;
std::vector<std::string> Arguments;
bool StopTimePassed;
+ bool RunUntilFail;
+ int NumberOfRunsLeft;
+ bool RunAgain;
+ size_t TotalNumberOfTests;
};
inline int getNumWidth(size_t n)
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index e6d3960..2cbdf9c 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -328,6 +328,8 @@ cmCTest::cmCTest()
this->OutputTestOutputOnTestFailure = false;
this->ComputedCompressTestOutput = false;
this->ComputedCompressMemCheckOutput = false;
+ this->RepeatTests = 1; // default to run each test once
+ this->RepeatUntilFail = false;
if(cmSystemTools::GetEnv("CTEST_OUTPUT_ON_FAILURE"))
{
this->OutputTestOutputOnTestFailure = true;
@@ -1983,11 +1985,11 @@ bool cmCTest::CheckArgument(const std::string& arg, const char* varg1,
//----------------------------------------------------------------------
// Processes one command line argument (and its arguments if any)
// for many simple options and then returns
-void cmCTest::HandleCommandLineArguments(size_t &i,
- std::vector<std::string> &args)
+bool cmCTest::HandleCommandLineArguments(size_t &i,
+ std::vector<std::string> &args,
+ std::string& errormsg)
{
std::string arg = args[i];
-
if(this->CheckArgument(arg, "-F"))
{
this->Failover = true;
@@ -2005,6 +2007,27 @@ void cmCTest::HandleCommandLineArguments(size_t &i,
this->SetParallelLevel(plevel);
this->ParallelLevelSetInCli = true;
}
+ if(this->CheckArgument(arg, "--repeat-until-fail"))
+ {
+ if( i >= args.size() - 1)
+ {
+ errormsg = "'--repeat-until-fail' requires an argument";
+ return false;
+ }
+ i++;
+ long repeat = 1;
+ if(!cmSystemTools::StringToLong(args[i].c_str(), &repeat))
+ {
+ errormsg = "'--repeat-until-fail' given non-integer value '"
+ + args[i] + "'";
+ return false;
+ }
+ this->RepeatTests = static_cast<int>(repeat);
+ if(repeat > 1)
+ {
+ this->RepeatUntilFail = true;
+ }
+ }
if(this->CheckArgument(arg, "--no-compress-output"))
{
@@ -2190,6 +2213,7 @@ void cmCTest::HandleCommandLineArguments(size_t &i,
this->GetHandler("test")->SetPersistentOption("RerunFailed", "true");
this->GetHandler("memcheck")->SetPersistentOption("RerunFailed", "true");
}
+ return true;
}
//----------------------------------------------------------------------
@@ -2272,7 +2296,12 @@ int cmCTest::Run(std::vector<std::string> &args, std::string* output)
for(size_t i=1; i < args.size(); ++i)
{
// handle the simple commandline arguments
- this->HandleCommandLineArguments(i,args);
+ std::string errormsg;
+ if(!this->HandleCommandLineArguments(i,args, errormsg))
+ {
+ cmSystemTools::Error(errormsg.c_str());
+ return 1;
+ }
// handle the script arguments -S -SR -SP
this->HandleScriptArguments(i,args,SRArgumentSpecified);
diff --git a/Source/cmCTest.h b/Source/cmCTest.h
index 88191c4..3f033d9 100644
--- a/Source/cmCTest.h
+++ b/Source/cmCTest.h
@@ -429,8 +429,13 @@ public:
{
return this->Definitions;
}
-
+ // return the number of times a test should be run
+ int GetTestRepeat() { return this->RepeatTests;}
+ // return true if test should run until fail
+ bool GetRepeatUntilFail() { return this->RepeatUntilFail;}
private:
+ int RepeatTests;
+ bool RepeatUntilFail;
std::string ConfigType;
std::string ScheduleType;
std::string StopTime;
@@ -535,8 +540,9 @@ private:
bool AddVariableDefinition(const std::string &arg);
//! parse and process most common command line arguments
- void HandleCommandLineArguments(size_t &i,
- std::vector<std::string> &args);
+ bool HandleCommandLineArguments(size_t &i,
+ std::vector<std::string> &args,
+ std::string& errormsg);
//! hande the -S -SP and -SR arguments
void HandleScriptArguments(size_t &i,
diff --git a/Source/ctest.cxx b/Source/ctest.cxx
index c0eb8ac..0fc47b7 100644
--- a/Source/ctest.cxx
+++ b/Source/ctest.cxx
@@ -75,6 +75,8 @@ static const char * cmDocumentationOptions[][2] =
"Run a specific number of tests by number."},
{"-U, --union", "Take the Union of -I and -R"},
{"--rerun-failed", "Run only the tests that failed previously"},
+ {"--repeat-until-fail <n>", "Require each test to run <n> "
+ "times without failing in order to pass"},
{"--max-width <width>", "Set the max width for a test name to output"},
{"--interactive-debug-mode [0|1]", "Set the interactive mode to 0 or 1."},
{"--no-label-summary", "Disable timing summary information for labels."},
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index eb42057..ffda31f 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -198,6 +198,7 @@ add_RunCMake_test(CommandLine)
add_RunCMake_test(install)
add_RunCMake_test(CPackInstallProperties)
add_RunCMake_test(ExternalProject)
+add_RunCMake_test(CTestCommandLine)
set(IfacePaths_INCLUDE_DIRECTORIES_ARGS -DTEST_PROP=INCLUDE_DIRECTORIES)
add_RunCMake_test(IfacePaths_INCLUDE_DIRECTORIES TEST_DIR IfacePaths)
diff --git a/Tests/RunCMake/CTestCommandLine/CMakeLists.txt b/Tests/RunCMake/CTestCommandLine/CMakeLists.txt
new file mode 100644
index 0000000..2897109
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.0)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
new file mode 100644
index 0000000..2e5156c
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
@@ -0,0 +1,25 @@
+include(RunCMake)
+
+run_cmake_command(repeat-until-fail-bad1
+ ${CMAKE_CTEST_COMMAND} --repeat-until-fail
+ )
+run_cmake_command(repeat-until-fail-bad2
+ ${CMAKE_CTEST_COMMAND} --repeat-until-fail foo
+ )
+run_cmake_command(repeat-until-fail-good
+ ${CMAKE_CTEST_COMMAND} --repeat-until-fail 2
+ )
+
+function(run_repeat_until_fail_tests)
+ # Use a single build tree for a few tests without cleaning.
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/repeat-until-fail-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ run_cmake(repeat-until-fail-cmake)
+ run_cmake_command(repeat-until-fail-ctest
+ ${CMAKE_CTEST_COMMAND} -C Debug --repeat-until-fail 3
+ )
+endfunction()
+run_repeat_until_fail_tests()
diff --git a/Tests/RunCMake/CTestCommandLine/init.cmake b/Tests/RunCMake/CTestCommandLine/init.cmake
new file mode 100644
index 0000000..a900f67
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/init.cmake
@@ -0,0 +1,3 @@
+# This is run by test initialization in repeat-until-fail-cmake.cmake
+# with cmake -P. It creates TEST_OUTPUT_FILE with a 0 in it.
+file(WRITE "${TEST_OUTPUT_FILE}" "0")
diff --git a/Tests/RunCMake/CTestCommandLine/repeat-until-fail-bad1-result.txt b/Tests/RunCMake/CTestCommandLine/repeat-until-fail-bad1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/repeat-until-fail-bad1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CTestCommandLine/repeat-until-fail-bad1-stderr.txt b/Tests/RunCMake/CTestCommandLine/repeat-until-fail-bad1-stderr.txt
new file mode 100644