| 98 | } |
| 99 | |
| 100 | int 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 | |
| 147 | TestOutput* CommandLineTestRunner::createTeamCityOutput() |
| 148 | { |
nothing calls this directly
no test coverage detected