aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2021-03-30 15:20:41 +0200
committerVratko Polak <vrpolak@cisco.com>2021-03-31 07:56:31 +0000
commite6316e28601c8ee9ad0a441518dbb7bfd4b9de14 (patch)
tree04f0e5cb21c509056d7992dbc6d7ded13a5c6cc3 /resources/libraries
parent0d65bbb9619720ecc6bca1529acfb3a5239d9719 (diff)
Device: Add stats test with AVF
+ Extract the stats keyword into a library. Change-Id: Icfaaa32c2a97d479ba0339acf34b865006949a89 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries')
-rw-r--r--resources/libraries/python/VppCounters.py2
-rw-r--r--resources/libraries/robot/shared/default.robot28
2 files changed, 29 insertions, 1 deletions
diff --git a/resources/libraries/python/VppCounters.py b/resources/libraries/python/VppCounters.py
index e9b607b4f1..6bd0aea4bf 100644
--- a/resources/libraries/python/VppCounters.py
+++ b/resources/libraries/python/VppCounters.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
+# Copyright (c) 2021 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot
index 891ef2192c..dcca1f2cde 100644
--- a/resources/libraries/robot/shared/default.robot
+++ b/resources/libraries/robot/shared/default.robot
@@ -94,6 +94,34 @@
| | # Parens are there to perform the call.
| | Run Keyword If | $resetter | Evaluate | $resetter()
+| Verify statistic commands
+| | [Documentation]
+| | ... | Execute several commands related to stats.
+| | ... | To be used by "stats" device tests,
+| | ... | as other device tests do not interact with stats.
+| |
+| | ... | The commands should also cover frequently used
+| | ... | PAPI (non-stats) commands and CLI commands.
+| |
+| | ${results}= | Create List
+| | ${status} | ${value}= | Run Keyword And Ignore Error
+| | ... | VPP Show Runtime On All DUTs | ${nodes}
+| | Append To List | ${results} | ${status}
+| | ${status} | ${value}= | Run Keyword And Ignore Error
+| | ... | Show Statistics On All DUTs | ${nodes}
+| | Append To List | ${results} | ${status}
+| | ${status} | ${value}= | Run Keyword And Ignore Error
+| | ... | Show Event Logger On All DUTs | ${nodes}
+| | Append To List | ${results} | ${status}
+| | ${status} | ${value}= | Run Keyword And Ignore Error
+| | ... | VPP Clear Runtime On All DUTs | ${nodes}
+| | Append To List | ${results} | ${status}
+| | ${status} | ${value}= | Run Keyword And Ignore Error
+| | ... | Clear Statistics On All DUTs | ${nodes}
+| | Append To List | ${results} | ${status}
+| | Should Not Contain Match | ${results} | FAIL
+| | ... | msg=At least one of statistic commands failed!
+
| Workers From Physical Cores
| | [Documentation]
| | ... | Convert from core count to worker count.