${starttime} is a local variable, so we need to pass it to "Save Setup Time"
authorJamo Luhrsen <jluhrsen@redhat.com>
Tue, 18 Aug 2015 22:49:27 +0000 (15:49 -0700)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 19 Aug 2015 10:15:16 +0000 (10:15 +0000)
this is not seen in older versions of robotframe work because variable
scoping was not as strict.  In the new RF2.9, local variables do not
"leak".  This is probably a problem in many places, but I found this one
for now.  It breaks on my local RF2.9 environment.  Works with this
patch and should not have any problems upstream with older RF versions

Change-Id: I58e3f5b9ce1f71a86cf6bac8ca4c5e359e82832c
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
test/csit/suites/openflowplugin/Performance_Flow_Config/070_Stats_Collection_100k_WithMininetRestart.robot
test/csit/suites/openflowplugin/Performance_Flow_Config/080_Rpc_100k_Flows_Configuration_Time_Measure.robot
test/csit/suites/openflowplugin/Performance_Flow_Config/090_BulkMaticConfigDsSetup_100k.robot

index e548d92034b8b22e244c310230b8f497592a200a..ed1d1e565f7b78b1c25583edbdf3579c7750e138 100644 (file)
@@ -47,7 +47,7 @@ Configure Flows
     ${http204ok}=    Create List    ${204}
     ${validation}=    Validate Responses    ${res}    ${http204ok}
     Should Be True    ${validation}
-    [Teardown]    Save Setup Time    setuptime
+    [Teardown]    Save Setup Time    setuptime    ${starttime}
 
 Wait Stats Collected
     [Documentation]    Waits till ${flnr} flows are initially collected
@@ -143,12 +143,11 @@ Measure Setup Time
     [Documentation]    This keyword is dedicated to save measured time for plotting
     ${starttime}=    Get Time    epoch
     Log    Starting stats collection at time ${starttime}
-    Set Suite Variable    ${starttime}
     Inventory Change Reached    ${rswitches}    ${rflows}
-    [Teardown]    Save Setup Time    ${note}
+    [Teardown]    Save Setup Time    ${note}    ${starttime}
 
 Save Setup Time
-    [Arguments]    ${note}
+    [Arguments]    ${note}    ${starttime}
     [Documentation]    Count the difference and stores it
     ${endtime}=    Get Time    epoch
     Log    Stats collection finished at time ${endtime}
index a4621c0c4567a4a609c9382559b44c6cf1969ba3..51be2416b9aecdf828e0243f10504185fd431322 100644 (file)
@@ -41,7 +41,7 @@ Configure Flows
     ${http200ok}=    Create List    ${200}
     ${validation}=    Validate Responses    ${res}    ${http200ok}
     Should Be True    ${validation}
-    [Teardown]    Save Setup Time
+    [Teardown]    Save Setup Time    ${starttime}
 
 Wait Stats Collected
     [Documentation]    Waits till ${flnr} flows are initially collected
@@ -112,6 +112,7 @@ Check Flows Inventory
     Should Be Equal As Numbers    ${rflows}    ${foundf}
 
 Save Setup Time
+    [Arguments]    ${starttime}
     [Documentation]    Count the difference and stores it
     ${endtime}=    Get Time    epoch
     Log    Stats collection finished at time ${endtime}
index d96e72fa15fa86cbfb7e6afbd455038e3e8adb1f..8c9927630d63b19324e893fc5a03ecb814905be3 100644 (file)
@@ -41,7 +41,7 @@ Configure Flows
     ${http200ok}=    Create List    ${200}
     ${validation}=    Validate Responses    ${res}    ${http200ok}
     Should Be True    ${validation}
-    [Teardown]    Save Setup Time
+    [Teardown]    Save Setup Time    ${starttime}
 
 Wait Stats Collected
     [Documentation]    Waits till ${flnr} flows are initially collected
@@ -112,6 +112,7 @@ Check Flows Inventory
     Should Be Equal As Numbers    ${rflows}    ${foundf}
 
 Save Setup Time
+    [Arguments]    ${starttime}
     [Documentation]    Count the difference and stores it
     ${endtime}=    Get Time    epoch
     Log    Stats collection finished at time ${endtime}