MCPcopy Create free account
hub / github.com/apache/trafficserver / runTest

Method runTest

lib/catch2/catch.hpp:12743–12781  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12741 }
12742
12743 Totals RunContext::runTest(TestCase const& testCase) {
12744 Totals prevTotals = m_totals;
12745
12746 std::string redirectedCout;
12747 std::string redirectedCerr;
12748
12749 auto const& testInfo = testCase.getTestCaseInfo();
12750
12751 m_reporter->testCaseStarting(testInfo);
12752
12753 m_activeTestCase = &testCase;
12754
12755 ITracker& rootTracker = m_trackerContext.startRun();
12756 assert(rootTracker.isSectionTracker());
12757 static_cast<SectionTracker&>(rootTracker).addInitialFilters(m_config->getSectionsToRun());
12758 do {
12759 m_trackerContext.startCycle();
12760 m_testCaseTracker = &SectionTracker::acquire(m_trackerContext, TestCaseTracking::NameAndLocation(testInfo.name, testInfo.lineInfo));
12761 runCurrentTest(redirectedCout, redirectedCerr);
12762 } while (!m_testCaseTracker->isSuccessfullyCompleted() && !aborting());
12763
12764 Totals deltaTotals = m_totals.delta(prevTotals);
12765 if (testInfo.expectedToFail() && deltaTotals.testCases.passed > 0) {
12766 deltaTotals.assertions.failed++;
12767 deltaTotals.testCases.passed--;
12768 deltaTotals.testCases.failed++;
12769 }
12770 m_totals.testCases += deltaTotals.testCases;
12771 m_reporter->testCaseEnded(TestCaseStats(testInfo,
12772 deltaTotals,
12773 redirectedCout,
12774 redirectedCerr,
12775 aborting()));
12776
12777 m_activeTestCase = nullptr;
12778 m_testCaseTracker = nullptr;
12779
12780 return deltaTotals;
12781 }
12782
12783 IConfigPtr RunContext::config() const {
12784 return m_config;

Callers 1

executeMethod · 0.80

Calls 11

acquireFunction · 0.85
NameAndLocationClass · 0.85
TestCaseStatsClass · 0.85
isSectionTrackerMethod · 0.80
addInitialFiltersMethod · 0.80
startCycleMethod · 0.80
deltaMethod · 0.80
expectedToFailMethod · 0.80
testCaseStartingMethod · 0.45
testCaseEndedMethod · 0.45

Tested by

no test coverage detected