MCPcopy Create free account
hub / github.com/cpputest/cpputest / runAllTests

Method runAllTests

src/CppUTest/CommandLineTestRunner.cpp:100–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100int CommandLineTestRunner::runAllTests()
101{
102 initializeTestRun();
103 size_t loopCount = 0;
104 size_t failedTestCount = 0;
105 size_t failedExecutionCount = 0;
106 size_t repeatCount = arguments_->getRepeatCount();
107
108 if (arguments_->isListingTestGroupNames())
109 {
110 TestResult tr(*output_);
111 registry_->listTestGroupNames(tr);
112 return 0;
113 }
114
115 if (arguments_->isListingTestGroupAndCaseNames())
116 {
117 TestResult tr(*output_);
118 registry_->listTestGroupAndCaseNames(tr);
119 return 0;
120 }
121
122 if (arguments_->isReversing())
123 registry_->reverseTests();
124
125 if (arguments_->isShuffling())
126 {
127 output_->print("Test order shuffling enabled with seed: ");
128 output_->print(arguments_->getShuffleSeed());
129 output_->print("\n");
130 }
131 while (loopCount++ < repeatCount) {
132
133 if (arguments_->isShuffling())
134 registry_->shuffleTests(arguments_->getShuffleSeed());
135
136 output_->printTestRun(loopCount, repeatCount);
137 TestResult tr(*output_);
138 registry_->runAllTests(tr);
139 failedTestCount += tr.getFailureCount();
140 if (tr.isFailure()) {
141 failedExecutionCount++;
142 }
143 }
144 return (int) (failedTestCount != 0 ? failedTestCount : failedExecutionCount);
145}
146
147TestOutput* CommandLineTestRunner::createTeamCityOutput()
148{

Callers

nothing calls this directly

Calls 14

getRepeatCountMethod · 0.80
listTestGroupNamesMethod · 0.80
isReversingMethod · 0.80
reverseTestsMethod · 0.80
isShufflingMethod · 0.80
getShuffleSeedMethod · 0.80
shuffleTestsMethod · 0.80
printTestRunMethod · 0.80
isFailureMethod · 0.80

Tested by

no test coverage detected