Added ability to pass special options to testtool 66/29666/4
authorJozef Behran <jbehran@cisco.com>
Fri, 13 Nov 2015 16:26:04 +0000 (17:26 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 25 Nov 2015 15:05:36 +0000 (15:05 +0000)
Added a new parameter to the "Install And Run Testtool"
keyword whose value will be passed to the testtool as it
was given. Additionally, the keyword now logs the exact
command used to start the test tool so it is now possible
to check whether the correct parameters were passed to it.

Change-Id: Iafbd065bc49ca3f90c0ee0fb4e50c83aa353aed7
Signed-off-by: Jozef Behran <jbehran@cisco.com>
csit/libraries/NetconfKeywords.robot

index ec0dd0aaea314bf2996609c274e6233c83cade86..b06b4d26efc2e53b5cf9338221c62dd3744b037a 100644 (file)
@@ -121,7 +121,7 @@ NetconfKeywords__Check_Device_Is_Up
     BuiltIn.Should_Be_Equal_As_Integers    ${count}    1
 
 Install_And_Start_Testtool
-    [Arguments]    ${device-count}=10    ${debug}=true    ${schemas}=none
+    [Arguments]    ${device-count}=10    ${debug}=true    ${schemas}=none    ${options}=${EMPTY}
     [Documentation]    Install and run testtool. Also arrange to collect its output into a log file.
     ...    When the ${schemas} argument is set to 'none', it signifies that
     ...    there are no additional schemas to be deployed, so the directory
@@ -140,7 +140,9 @@ Install_And_Start_Testtool
     BuiltIn.Log    ${response}
     ${schemas_option}=    NetconfKeywords__Deploy_Additional_Schemas    ${schemas}
     # Start the testtool
-    SSHLibrary.Write    java -Xmx1G -XX:MaxPermSize=256M -jar ${filename} --device-count ${device-count} --debug ${debug} ${schemas_option} >testtool.log 2>&1
+    ${command}    BuiltIn.Set_Variable    java -Xmx1G -XX:MaxPermSize=256M -jar ${filename} ${options} --device-count ${device-count} --debug ${debug} ${schemas_option}
+    BuiltIn.Log    Running testtool: ${command}
+    SSHLibrary.Write    ${command} >testtool.log 2>&1
     # Wait for the testtool to boot up.
     ${timeout}=    BuiltIn.Evaluate    (${device-count}/3)+5
     BuiltIn.Wait_Until_Keyword_Succeeds    ${timeout}s    1s    NetconfKeywords__Check_Device_Is_Up    ${FIRST_TESTTOOL_PORT}