Merge "Enable VTN Coordinator Integration Tests"
authorLuis Gomez <ecelgp@gmail.com>
Fri, 10 Apr 2015 00:51:56 +0000 (00:51 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 10 Apr 2015 00:51:56 +0000 (00:51 +0000)
test/csit/libraries/KarafKeywords.txt
test/csit/suites/openflowplugin/Performance/010_Cbench.txt

index 5fd51e5350671e074a2799061d7bb71fb4f4fc77..178f0d9a4dd66b6baf325374977a34b34f2215a0 100644 (file)
@@ -12,14 +12,16 @@ ${karaf_password}       karaf
 Verify Feature Is Installed
     [Documentation]     Will Succeed if the given ${feature_name} is found in the output of "feature:list -i"
     [Arguments]     ${feature_name}     ${controller}=${CONTROLLER}     ${karaf_port}=${karaf_shell_port}
-    ${output}=  Issue Command On Karaf Console  feature:list -i     ${controller}   ${karaf_port}
+    ${output}=  Issue Command On Karaf Console  feature:list -i | grep ${feature_name}     ${controller}   ${karaf_port}
     Should Contain  ${output}   ${feature_name}
+    [Return]    ${output}
 
 Verify Feature Is Not Installed
     [Documentation]     Will Succeed if the given ${feature_name} is NOT found in the output of "feature:list -i"
     [Arguments]     ${feature_name}     ${controller}=${CONTROLLER}     ${karaf_port}=${karaf_shell_port}
-    ${output}=  Issue Command On Karaf Console  feature:list -i     ${controller}   ${karaf_port}
+    ${output}=  Issue Command On Karaf Console  feature:list -i | grep ${feature_name}     ${controller}   ${karaf_port}
     Should Not Contain  ${output}   ${feature_name}
+    [Return]    ${output}
 
 Issue Command On Karaf Console
     [Documentation]     Will execute the given ${cmd} by ssh'ing to the karaf console running on ${CONTROLLER}
index 390bef13b8a1caf2c57d6d7fac7989a20f86810e..3146390261602ddf90975cf821adca2c226b5ef2 100644 (file)
@@ -20,6 +20,8 @@ ${loops}                    10
 ${num_of_unique_macs}       10000
 ${cbench_system}            ${MININET}
 ${cbench_executable}        /usr/local/bin/cbench
+${throughput_results_file}  throughput.csv
+${latency_results_file}     latency.csv
 
 *** Testcases ***
 Cbench Throughput Test
@@ -28,7 +30,7 @@ Cbench Throughput Test
     [Tags]  throughput
     [Timeout]   ${test_timeout}
     Log    Cbench tests using ${loops} iterations of ${duration_in_secs} second tests. Switch Count: ${switch_count}. Unique MACS to cycle: ${num_of_unique_macs}
-    Run Cbench And Log Results  -t -m ${duration_in_ms} -M ${num_of_unique_macs} -s ${switch_count} -l ${loops}     ${throughput_threshold}
+    Run Cbench And Log Results  -t -m ${duration_in_ms} -M ${num_of_unique_macs} -s ${switch_count} -l ${loops}     ${throughput_threshold}     ${throughput_results_file}
 
 Cbench Latency Test
     [Documentation]     cbench executed in default latency mode.  Test parameters have defaults, but can be overridden
@@ -36,11 +38,11 @@ Cbench Latency Test
     [Tags]  latency
     [Timeout]   ${test_timeout}
     Log    Cbench tests using ${loops} iterations of ${duration_in_secs} second tests. Switch Count: ${switch_count}. Unique MACS to cycle: ${num_of_unique_macs}
-    Run Cbench And Log Results  -m ${duration_in_ms} -M ${num_of_unique_macs} -s ${switch_count} -l ${loops}     ${latency_threshold}
+    Run Cbench And Log Results  -m ${duration_in_ms} -M ${num_of_unique_macs} -s ${switch_count} -l ${loops}     ${latency_threshold}     ${latency_results_file}
 
 *** Keywords ***
 Run Cbench And Log Results
-    [Arguments]    ${cbench_args}    ${average_threshold}
+    [Arguments]    ${cbench_args}    ${average_threshold}   ${output_filename}=results.csv
     ${output}=  Run Command On Remote System    ${cbench_system}   ${cbench_executable} -c ${CONTROLLER} ${cbench_args}  prompt_timeout=${test_timeout}
     Log     ${output}
     Should Contain    ${output}    RESULT
@@ -59,15 +61,18 @@ Run Cbench And Log Results
     ${stdev}=    Set Variable    ${result_value_list[${3}]}
     ${date}=    Get Time    d,m,s
     Log    CBench Result: ${date},${cbench_args},${min},${max},${average},${stdev}
-    Should Be True    ${average} > ${average_threshold}     Flow mod per/sec threshold was not met
+    Append To File    ${output_filename}    ${min},${max},${average}\n
+    Should Be True    ${average} > ${average_threshold}     ${average} flow_mods per/sec did not exceed threshold of ${average_threshold}
 
 Cbench Suite Setup
+    Append To File    ${latency_results_file}    LATENCY_MIN,LATENCY_MAX,LATENCY_AVERAGE\n
+    Append To File    ${throughput_results_file}    THROUGHPUT_MIN,THROUGHPUT_MAX,THROUGHPUT_AVERAGE\n
     ${duration_in_ms}           Evaluate    ${duration_in_secs} * 1000
     Set Suite Variable  ${duration_in_ms}
     ##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}
+    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