aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/shared
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/robot/shared')
-rw-r--r--resources/libraries/robot/shared/default.robot21
-rw-r--r--resources/libraries/robot/shared/test_teardown.robot20
2 files changed, 35 insertions, 6 deletions
diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot
index f060032b0c..dedbdcd2aa 100644
--- a/resources/libraries/robot/shared/default.robot
+++ b/resources/libraries/robot/shared/default.robot
@@ -58,7 +58,6 @@
| Resource | resources/libraries/robot/overlay/lisp.robot
| Resource | resources/libraries/robot/overlay/lispgpe.robot
| Resource | resources/libraries/robot/overlay/lisp_api.robot
-| Resource | resources/libraries/robot/performance/performance_limits.robot
| Resource | resources/libraries/robot/performance/performance_utils.robot
| Resource | resources/libraries/robot/shared/interfaces.robot
| Resource | resources/libraries/robot/shared/container.robot
@@ -74,6 +73,26 @@
| ${cpu_alloc_str}= | ${0}
*** Keywords ***
+# TODO: Sort keywords alphabetically.
+
+| Call Resetter
+| | [Documentation]
+| | ... | Check for a presence of test variable \${resetter}.
+| | ... | If it exists (and not None), call the resetter (as a Python callable).
+| | ... | This is usually used to reset any state on DUT before next trial.
+| |
+| | ... | TODO: Move to a more specific library if needed.
+| |
+| | ... | *Example:*
+| |
+| | ... | \| Call Resetter \|
+| |
+| | ${resetter} = | Get Resetter
+| | # See http://robotframework.org/robotframework/3.1.2/libraries/BuiltIn.html
+| | # #Evaluating%20expressions for $variable (without braces) syntax.
+| | # Parens are there to perform the call.
+| | Run Keyword If | $resetter | Evaluate | $resetter()
+
| Configure crypto device on all DUTs
| | [Documentation] | Verify if Crypto QAT device virtual functions are
| | ... | initialized on all DUTs. If parameter force_init is set to True, then
diff --git a/resources/libraries/robot/shared/test_teardown.robot b/resources/libraries/robot/shared/test_teardown.robot
index 93c4574c83..09ebd9d01e 100644
--- a/resources/libraries/robot/shared/test_teardown.robot
+++ b/resources/libraries/robot/shared/test_teardown.robot
@@ -64,11 +64,21 @@
| Additional Test Tear Down Action For performance
| | [Documentation]
| | ... | Additional teardown for tests which uses performance measurement.
-| |
-| | Run Keyword If Test Failed
-| | ... | Send traffic at specified rate | ${1.0} | 10000
-| | ... | ${frame_size} | ${traffic_profile} | trial_multiplicity=${1}
-| | ... | extended_debug=${True}
+| | ... | Optionally, call \${resetter} (if defined) to reset DUT state.
+| |
+| | ... | TODO: Document what test variables are required or optional.
+| |
+| | Run Keyword If Test Passed | Return From Keyword
+| | ${use_latency} = | Get Use Latency
+| | ${rate_for_teardown} = | Get Rate For Teardown
+| | Call Resetter
+| | Set Test Variable | \${extended_debug} | ${True}
+| | Send traffic at specified rate
+| | ... | trial_duration=${1.0}
+| | ... | rate=${rate_for_teardown}
+| | ... | trial_multiplicity=${1}
+| | ... | use_latency=${use_latency}
+| | ... | duration_limit=${1.0}
| Additional Test Tear Down Action For packet_trace
| | [Documentation]