Keyword to report failures due to a known bug
[integration/test.git] / csit / libraries / Utils.robot
index d70d0b32935630021310854821543784b0c91b73..58f409046efdb312cdf9df3b54979af928e4a18d 100644 (file)
@@ -59,16 +59,17 @@ Stop Suite
     Close Connection
 
 Report_Failure_Due_To_Bug
-     [Arguments]    ${number}
-     [Documentation]    Report that a test failed due to a known Bugzilla bug whose
-     ...    number is provided as an argument.
-     ...    This must be used in the [Teardown] setting of the affected test
-     ...    or as the first line of the test if FastFail module is not being
-     ...    used. It reports the URL of the bug on console and also puts it
+    [Arguments]    ${number}
+    [Documentation]    Report that a test failed due to a known Bugzilla bug whose
+    ...    number is provided as an argument.
+    ...    This must be used in the [Teardown] setting of the affected test
+    ...    or as the first line of the test if FastFail module is not being
+    ...    used. It reports the URL of the bug on console and also puts it
     ...    into the Robot log file.
-     ${msg}=    BuiltIn.Set_Variable    This test fails due to https://bugs.opendaylight.org/show_bug.cgi?id=${number}
-     Run Keyword If    "${TEST STATUS}"=="FAIL"    Set Test Message    ${msg}
-     Run Keyword If    "${TEST STATUS}"=="FAIL"    BuiltIn.Log    ${msg}
+    ${msg}=    BuiltIn.Set_Variable    This test fails due to https://bugs.opendaylight.org/show_bug.cgi?id=${number}
+    ${newline}=    BuiltIn.Evaluate    chr(10)
+    Run Keyword If    "${TEST STATUS}"=="FAIL"    BuiltIn.Set Test Message    ${msg}${newline}${newline}${TEST_MESSAGE}
+    Run Keyword If    "${TEST STATUS}"=="FAIL"    BuiltIn.Log    ${msg}
 
 Ensure All Nodes Are In Response
     [Arguments]    ${URI}    ${node_list}