Allow to run testtool without installing it first 76/81976/8
authorjluhrsen <jluhrsen@gmail.com>
Thu, 9 May 2019 18:33:28 +0000 (11:33 -0700)
committerVenkatrangan Govindarajan <vgovindarajan@luminanetworks.com>
Sat, 25 May 2019 07:16:47 +0000 (07:16 +0000)
Change-Id: I43d05bec0e1afdf9c4579788b6aeb5e51fc74355
Signed-off-by: jluhrsen <jluhrsen@gmail.com>
csit/libraries/NetconfKeywords.robot
csit/suites/netconf/scale/max_devices.robot

index 82978c38b83cf1e7aff68f4b7c60a16d941b08c8..a47c2c64636f0968a36b4b2ee75c39ed76169bc6 100644 (file)
@@ -153,15 +153,20 @@ NetconfKeywords__Wait_Device_Is_Up_And_Running
 
 Install_And_Start_Testtool
     [Arguments]    ${device-count}=10    ${debug}=true    ${schemas}=none    ${tool_options}=${EMPTY}    ${java_options}=${TESTTOOL_DEFAULT_JAVA_OPTIONS}    ${mdsal}=true
-    [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
-    ...    for the additional schemas is deleted on the remote machine and
-    ...    the additional schemas argument is left out.
-    # Install test tool on the machine.
+    [Documentation]    Install and run testtool.
     ${filename}=    NexusKeywords.Deploy_Test_Tool    netconf    netconf-testtool
+    Start_Testtool    ${filename}    ${device-count}    ${debug}    ${schemas}    ${tool_options}    ${java_options}
+    ...    ${mdsal}
+
+Start_Testtool
+    [Arguments]    ${filename}    ${device-count}=10    ${debug}=true    ${schemas}=none    ${tool_options}=${EMPTY}    ${java_options}=${TESTTOOL_DEFAULT_JAVA_OPTIONS}
+    ...    ${mdsal}=true
+    [Documentation]    Arrange to collect tool's output into a log file.
+    ...    Will use specific ${schemas} unless argument resolves to 'none',
+    ...    which signifies that there are no additional schemas to be deployed.
+    ...    If so the directory for the additional schemas is deleted on the
+    ...    remote machine and the additional schemas argument is left out.
     ${schemas_option}=    NetconfKeywords__Deploy_Additional_Schemas    ${schemas}
-    # Start the testtool
     ${command}=    NexusKeywords.Compose_Full_Java_Command    ${java_options} -jar ${filename} ${tool_options} --device-count ${device-count} --debug ${debug} ${schemas_option} --md-sal ${mdsal}
     BuiltIn.Log    Running testtool: ${command}
     ${logfile}=    Utils.Get_Log_File_Name    testtool
index 120f0734ec8bc75b19212d8ab714fbd39bc69c8b..aa051189aa58ff4d63acdd5bfc977c8733c83f61 100644 (file)
@@ -33,6 +33,8 @@ ${BASE_PORT}      17830
 ${NUM_WORKERS}    10
 ${TIMEOUT_FACTOR}    5
 ${DEVICES_RESULT_FILE}    devices.csv
+${INSTALL_TESTTOOL}    True
+${TESTTOOL_EXECUTABLE}    ${EMPTY}
 
 *** Test Cases ***
 Find Max Netconf Devices
@@ -47,7 +49,8 @@ Find Max Netconf Devices
     : FOR    ${devices}    IN RANGE    ${start}    ${stop+1}    ${increment}
     \    ${timeout} =    BuiltIn.Evaluate    ${devices}*${TIMEOUT_FACTOR}
     \    Log To Console    Starting Iteration with ${devices} devices
-    \    NetconfKeywords.Install_And_Start_Testtool    device-count=${devices}
+    \    Run Keyword If    "${INSTALL_TESTTOOL}"=="True"    NetconfKeywords.Install_And_Start_Testtool    device-count=${devices}
+    \    ...    ELSE    NetconfKeywords.Start_Testtool    ${TESTTOOL_EXECUTABLE}    device-count=${devices}
     \    ${status}    ${result} =    Run Keyword And Ignore Error    NetconfKeywords.Perform_Operation_On_Each_Device    Configure_Device    timeout=${timeout}
     \    Exit For Loop If    '${status}' == 'FAIL'
     \    ${status}    ${result} =    Run Keyword And Ignore Error    NetconfKeywords.Perform_Operation_On_Each_Device    Wait_Connected    timeout=${timeout}