From 01d8f262afc567c3d49a23c3cb2cdeaced8a6887 Mon Sep 17 00:00:00 2001 From: Vratko Polak Date: Wed, 15 Dec 2021 17:14:36 +0100 Subject: UTI: Export results + Model version 1.0.0. - Only some result types are exported. + MRR, NDRPDR and SOAK. - Other result types to be added later. + In contrast, all test types are detected. + Convert custom classes to JSON-serializable equivalents. + Sort dict keys before converting to JSON. + Override the order for some known keys. + Export sets as sorted arrays. + Convert to info content from serialized raw content. + Also export outputs for suite setups and teardowns. + Info files for setup/teardown exist only temporarily. + The data is merged into suite.info.json file. + This simplifies presentation of total suite duration. + Define model via JSON schema: - Just test case, suite setup/teardown/suite to be added later. - Just info, raw to be added later. + Proper descriptions. + Json is generated from yaml. + This is a convenience for maintainers. + The officially used schema is the .json one. + TODOs written into a separate .txt file. + Validate exported instance against the schema. + Include format checking. + Update CSIT requirements for validation dependencies. + This needs python-dateutil==2.8.2, only a patch bump. + Compute bandwidth also for soak tests. + This unifies with NDRPDR to simplify schema definition. - PAL may need an update for parsing soak test message. + Include SSH log items, raw output only. + Generate all outputs in a single filesystem tree. + Move raw outputs into test_output_raw.tar.xz. + Rename existing tar with suites to generated_robot_files.tar.xz. Change-Id: I69ff7b330ed1a14dc435fd0ef008e753c0d7f78c Signed-off-by: Vratko Polak --- resources/libraries/robot/shared/default.robot | 11 +++++++++++ resources/libraries/robot/shared/suite_setup.robot | 10 ++++++++++ resources/libraries/robot/shared/suite_teardown.robot | 2 ++ resources/libraries/robot/shared/test_setup.robot | 3 ++- resources/libraries/robot/shared/test_teardown.robot | 4 +++- 5 files changed, 28 insertions(+), 2 deletions(-) (limited to 'resources/libraries/robot/shared') diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot index 32d8863a32..7fa0222f78 100644 --- a/resources/libraries/robot/shared/default.robot +++ b/resources/libraries/robot/shared/default.robot @@ -31,6 +31,7 @@ | Library | resources.libraries.python.IPUtil | Library | resources.libraries.python.IPv6Util | Library | resources.libraries.python.IrqUtil +| Library | resources.libraries.python.model.export_json | Library | resources.libraries.python.NodePath | Library | resources.libraries.python.Namespaces | Library | resources.libraries.python.PapiHistory @@ -334,6 +335,16 @@ | | Run Keyword If | ${with_trace} | VPP Enable Traces On Dut | | ... | ${nodes['${dut}']} +| Get And Export DPDK Version +| | [Documentation] | Add version to test export as detected on DUT1. +| | +| | ... | *Example:* +| | +| | ... | \| Get And Export DPDK Version \| +| | +| | ${version} = | Get Dpdk Version | ${nodes}[DUT1] +| | Export Dut Type And Version | DPDK | ${version} + | Save VPP PIDs | | [Documentation] | Get PIDs of VPP processes from all DUTs in topology and\ | | ... | set it as a test variable. The PIDs are stored as dictionary items\ diff --git a/resources/libraries/robot/shared/suite_setup.robot b/resources/libraries/robot/shared/suite_setup.robot index 26d7f52205..232158a6e0 100644 --- a/resources/libraries/robot/shared/suite_setup.robot +++ b/resources/libraries/robot/shared/suite_setup.robot @@ -24,6 +24,7 @@ | Variables | resources/libraries/python/Constants.py | | Documentation | Suite setup keywords. + *** Keywords *** | Create suite topology variables | | [Documentation] @@ -83,12 +84,14 @@ | | | | [Arguments] | @{actions} | | +| | Start Suite Setup Export | | ${nic_model_list}= | Create list | ${nic_name} | | &{info}= | Compute Circular Topology | | ... | ${nodes} | filter_list=${nic_model_list} | nic_pfs=${nic_pfs} | | ... | always_same_link=${False} | topo_has_tg=${True} | | Set suite variable | &{topology_info} | &{info} | | Create suite topology variables | @{actions} +| | Finalize Suite Setup Export | Setup suite topology interfaces with no TG | | [Documentation] @@ -104,12 +107,14 @@ | | | | [Arguments] | @{actions} | | +| | Start Suite Setup Export | | ${nic_model_list}= | Create list | ${nic_name} | | &{info}= | Compute Circular Topology | | ... | ${nodes} | filter_list=${nic_model_list} | nic_pfs=${nic_pfs} | | ... | always_same_link=${True} | topo_has_tg=${False} | | Set suite variable | &{topology_info} | &{info} | | Create suite topology variables | @{actions} +| | Finalize Suite Setup Export | Setup suite topology interfaces with no DUT | | [Documentation] @@ -125,12 +130,14 @@ | | | | [Arguments] | @{actions} | | +| | Start Suite Setup Export | | ${nic_model_list}= | Create list | ${nic_name} | | &{info}= | Compute Circular Topology | | ... | ${nodes} | filter_list=${nic_model_list} | nic_pfs=${nic_pfs} | | ... | always_same_link=${True} | topo_has_tg=${True} | topo_has_dut=${False} | | Set suite variable | &{topology_info} | &{info} | | Create suite topology variables | @{actions} +| | Finalize Suite Setup Export | Additional Suite Setup Action For scapy | | [Documentation] @@ -151,6 +158,7 @@ | | | Initialize DPDK Framework | ${nodes['${dut}']} | | | ... | ${${dut}_${int}1}[0] | ${${dut}_${int}2}[0] | ${nic_driver} | | END +| | Get And Export DPDK Version | Additional Suite Setup Action For performance vf | | [Documentation] @@ -238,6 +246,8 @@ | | ... | Additional Setup for suites which uses performance measurement | | ... | for L1 cross connect tests | | +| | # TRex suites have only TG (and a loopback cable), no SUT nor DUT. +| | Export Dut Type And Version | none | ${EMPTY} | | Initialize traffic generator | | ... | ${tg} | ${TG_pf1}[0] | ${TG_pf2}[0] | | ... | ${tg} | ${TG_pf2}[0] diff --git a/resources/libraries/robot/shared/suite_teardown.robot b/resources/libraries/robot/shared/suite_teardown.robot index 20b2776eec..ab6d3b6f8c 100644 --- a/resources/libraries/robot/shared/suite_teardown.robot +++ b/resources/libraries/robot/shared/suite_teardown.robot @@ -30,10 +30,12 @@ | | | | [Arguments] | @{actions} | | +| | Start Suite Teardown Export | | FOR | ${action} | IN | @{actions} | | | Run Keyword | Additional Suite Tear Down Action For ${action} | | END | | Remove All Added VIF Ports On All DUTs From Topology | ${nodes} +| | Finalize Suite Teardown Export | Additional Suite Tear Down Action For ab | | [Documentation] diff --git a/resources/libraries/robot/shared/test_setup.robot b/resources/libraries/robot/shared/test_setup.robot index e2fcfc5f87..3bc88858c0 100644 --- a/resources/libraries/robot/shared/test_setup.robot +++ b/resources/libraries/robot/shared/test_setup.robot @@ -21,13 +21,14 @@ *** Keywords *** | Setup test | | [Documentation] -| | ... | Common test setup for tests. +| | ... | Common test setup for VPP tests. | | | | ... | *Arguments:* | | ... | - ${actions} - Additional setup action. Type: list | | | | [Arguments] | @{actions} | | +| | Start Test Export | | Reset PAPI History On All DUTs | ${nodes} | | ${int} = | Set Variable If | ${nic_vfs} > 0 | prevf | pf | | Create base startup configuration of VPP on all DUTs diff --git a/resources/libraries/robot/shared/test_teardown.robot b/resources/libraries/robot/shared/test_teardown.robot index 3fe5e6a8ee..474a6e9385 100644 --- a/resources/libraries/robot/shared/test_teardown.robot +++ b/resources/libraries/robot/shared/test_teardown.robot @@ -14,7 +14,7 @@ """Keywords used in test teardowns.""" *** Settings *** -| Resource | resources/libraries/robot/shared/container.robot +| Resource | resources/libraries/robot/shared/default.robot | Library | resources.libraries.python.PapiHistory | Library | resources.libraries.python.topology.Topology | Variables | resources/libraries/python/Constants.py @@ -45,6 +45,7 @@ | | | Run Keyword | Additional Test Tear Down Action For ${action} | | END | | Clean Sockets On All Nodes | ${nodes} +| | Finalize Test Export | Tear down test raw | | [Documentation] @@ -60,6 +61,7 @@ | | | Run Keyword | Additional Test Tear Down Action For ${action} | | END | | Clean Sockets On All Nodes | ${nodes} +| | Finalize Test Export # Additional Test Tear Down Actions in alphabetical order | Additional Test Tear Down Action For acl -- cgit 1.2.3-korg