[r295]: / trunk / Library / POUs / FB_CfUnitRunner / RunTestSuiteTests / svnobj  Maximize  Restore  History

Download this file

26 lines (24 with data), 6.9 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
METHOD RunTestSuiteTests
VAR
    Counter : UINT := 0;
    BusyPrinting : BOOL;
	
       as we don't consider the tests to be completely finished until all test suites have executed completely.
       are finished (which might take many cycles), do we gather correct statistics *)
    NumberOfTestSuitesFinished_Temp : UINT := 0;
    NumberOfTestCases_Temp : UINT := 0;
    NumberOfFailedTestCases_Temp : UINT := 0;
    NumberOfSuccessfulTestCases_Temp : UINT := 0;
IF NOT AllTestSuitesFinished THEN
    IF GVL_CfUnit.NumberOfInitializedTestSuites = 0 THEN
        AllTestSuitesFinished := TRUE;
    ELSIF GVL_CfUnit.NumberOfInitializedTestSuites > 0 THEN
            IF GVL_CfUnit.TestSuiteAddresses[Counter]^.AreAllTestsFinished() THEN
                NumberOfTestCases_Temp := GVL_CfUnit.TestSuiteAddresses[Counter]^.GetNumberOfTests() + NumberOfTestCases_Temp;
                NumberOfSuccessfulTestCases_Temp := GVL_CfUnit.TestSuiteAddresses[Counter]^.GetNumberOfSuccessfulTests() + NumberOfSuccessfulTestCases_Temp;
            ELSE
        (* Check if some event triggered an abortion of running the tests, in that case abort it now.
            NumberOfTestSuitesFinished_Temp := GVL_CfUnit.NumberOfInitializedTestSuites;
		END_IF
TestResultLogger.LogTestSuiteResults(TestResults := TestResults.GetTestSuiteResults());
(* Run the buffered ADS logger *)
GVL_TcUnit.AdsMessageQueue();