Always add exceptions.txt 55/74655/1
authorSam Hague <shague@redhat.com>
Mon, 30 Jul 2018 14:35:35 +0000 (10:35 -0400)
committerSam Hague <shague@redhat.com>
Mon, 30 Jul 2018 14:35:35 +0000 (10:35 -0400)
Change-Id: Ia84c576c7a2de671b3e486b38c43cb4d867b4df2
Signed-off-by: Sam Hague <shague@redhat.com>
csit/libraries/KarafKeywords.robot
csit/libraries/OpenStackOperations.robot

index 4670711cf073e64ac215fd1911e4dabfa62e344a..1c39b72adb0caf047d37b99fd60e969967706fad 100644 (file)
@@ -231,7 +231,7 @@ Get Karaf Log Lines From Test Start
     [Return]    ${log_lines}
 
 Fail If Exceptions Found During Test
-    [Arguments]    ${test_name}    ${log_file}=${KARAF_LOG}
+    [Arguments]    ${test_name}    ${log_file}=${KARAF_LOG}    ${fail}=False
     [Documentation]    Create a failure if an Exception is found in the karaf.log that has not been whitelisted.
     ...    Will work for single controller jobs as well as 3node cluster jobs
     : FOR    ${i}    IN RANGE    1    ${NUM_ODL_SYSTEM} + 1
@@ -240,7 +240,7 @@ Fail If Exceptions Found During Test
     \    ${exlist}    ${matchlist} =    Verify Exceptions    ${output}
     \    Write Exceptions Map To File    ${SUITE_NAME}.${TEST_NAME}    /tmp/odl${i}_exceptions.txt
     \    ${listlength} =    BuiltIn.Get Length    ${exlist}
-    \    BuiltIn.Run Keyword If    ${listlength} != 0    Log And Fail Exceptions    ${exlist}    ${listlength}
+    \    BuiltIn.Run Keyword If    "${fail}"=="True" and ${listlength} != 0    Log And Fail Exceptions    ${exlist}    ${listlength}
     \    ...    ELSE    Collections.Log List    ${matchlist}
 
 Log And Fail Exceptions
index 73b39b5ed64d9551cf2221599f82c3155b8a4a23..835089748a3c01b80380bad3b16c28502b88814c 100644 (file)
@@ -548,11 +548,11 @@ Get OvsDebugInfo
     \    OpenStackOperations.Get DumpFlows And Ovsconfig    ${conn_id}
 
 Get Test Teardown Debugs
-    [Arguments]    ${test_name}=${SUITE_NAME}.${TEST_NAME}
+    [Arguments]    ${test_name}=${SUITE_NAME}.${TEST_NAME}    ${fail}=${FAIL_ON_EXCEPTIONS}
     OpenStackOperations.Get OvsDebugInfo
     BuiltIn.Run Keyword And Ignore Error    DataModels.Get Model Dump    ${HA_PROXY_IP}    ${netvirt_data_models}
     BuiltIn.run Keyword And Ignore Error    ODLTools.Get EOS    ${HA_PROXY_IP}
-    Run Keyword If    "${FAIL_ON_EXCEPTIONS}"=="True"    KarafKeywords.Fail If Exceptions Found During Test    ${test_name}
+    KarafKeywords.Fail If Exceptions Found During Test    ${test_name}    fail=${fail}
 
 Get Test Teardown Debugs For SFC
     [Arguments]    ${test_name}=${TEST_NAME}