Add suite name to the testtool log file name
[integration/test.git] / csit / libraries / Utils.robot
index a18f2bec19ffec846ab62cb82c41a3364906b1d9..aed9a3e895013a554722f818dc31b9455e703817 100644 (file)
@@ -411,3 +411,12 @@ Post Log Check
     Log    ${resp.content}
     Should Be Equal As Strings    ${resp.status_code}    ${status_code}
     [Return]    ${resp}
+
+Get Log File Name
+    [Arguments]    ${testtool}
+    [Documentation]    Get the name of the suite sanitized to be usable as a part of filename.
+    ...    These names are used to constructs names of the log files produced
+    ...    by the testing tools so two suites using a tool wont overwrite the
+    ...    log files if they happen to run in one job.
+    ${name}=    BuiltIn.Evaluate    """${SUITE_NAME}""".replace(" ","-").replace("/","-").replace(".","-")
+    [Return]    ${testtool}--${name}.log