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

Download this file

34 lines (33 with data), 5.8 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
26
27
28
29
30
31
32
33
METHOD RunTestSuiteTests
VAR
    Counter : UINT := 0;
    BusyPrinting : BOOL;
END_VAR
VAR_INST
       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 *)
(* Run TcUnit test suites *)
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
                GVL_CfUnit.CurrentTestSuiteBeingCalled := GVL_CfUnit.TestSuiteAddresses[Counter];
                GVL_CfUnit.CurrentTestSuiteBeingCalled^();
            END_IF
        END_FOR
           This can be accomplished by setting the result of the test suites run to finished. *)
        IF AbortRunningTestSuites THEN
        IF NumberOfTestSuitesFinished = GVL_CfUnit.NumberOfInitializedTestSuites THEN
            AllTestSuitesFinished := TRUE;
        END_IF
    END_IF
END_IF$
(* Store test suite results continuously *)
TestResults();
(* Log test suite results continuously *)
TestResultLogger.LogTestSuiteResults();
(* publish the xUnit Xml file once if enabled *)
XmlTestResultPublisher.LogTestSuiteResults();
(* Run the buffered ADS logger *)
//GVL_CfUnit.AdsMessageQueue();