Test Teardown Log Results As Zero If Cbench Timed Out
Force Tags cbench
Library String
+Library Process
Resource ../../../libraries/Utils.robot
Resource ../../../libraries/KarafKeywords.robot
##down can catch this problem and log the results as zero. However, we need to know which
##file to log to, so setting it as a suite variable here.
Set Suite Variable ${output_filename}
- ${output}= Run Command On Remote System ${cbench_system} ${cbench_executable} -c ${ODL_SYSTEM_IP} ${cbench_args} prompt_timeout=${test_timeout}
+ ${output}= Run Keyword If "${cbench_system}" == "localhost" Run Process ${cbench_executable} -c ${ODL_SYSTEM_IP} ${cbench_args}
+ ... ELSE Run Command On Remote System ${cbench_system} ${cbench_executable} -c ${ODL_SYSTEM_IP} ${cbench_args} prompt_timeout=${test_timeout}
Log ${output}
Should Contain ${output} RESULT
${result_line}= Get Lines Containing String ${output} RESULT
##Setting the test timeout dynamically in case larger values on command line override default
${test_timeout} Evaluate (${loops} * ${duration_in_secs}) * 1.5
Set Suite Variable ${test_timeout}
- Verify File Exists On Remote System ${cbench_system} ${cbench_executable}
+ Run Keyword If "${cbench_system}" == "localhost" File Should Exist ${cbench_executable}
+ ... ELSE Verify File Exists On Remote System ${cbench_system} ${cbench_executable}
Should Be True ${loops} >= 2 If number of loops is less than 2, cbench will not run
Verify Feature Is Installed odl-openflowplugin-drop-test
Issue Command On Karaf Console dropallpacketsrpc on