diff options
Diffstat (limited to 'resources/libraries/robot/shared')
-rw-r--r-- | resources/libraries/robot/shared/default.robot | 27 | ||||
-rw-r--r-- | resources/libraries/robot/shared/vm.robot | 7 |
2 files changed, 24 insertions, 10 deletions
diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot index fabb44067b..44ade6dc33 100644 --- a/resources/libraries/robot/shared/default.robot +++ b/resources/libraries/robot/shared/default.robot @@ -207,15 +207,12 @@ | | [Arguments] | ${phy_cores} | ${rx_queues}=${None} | ${rxd}=${None} | | ... | ${txd}=${None} | | +| | Create compute resources variables +| | ... | ${phy_cores} | rx_queues=${rx_queues} | rxd=${rxd} | txd=${txd} | | FOR | ${dut} | IN | @{duts} -| | | &{compute_resource_info}= | Get Affinity Vswitch -| | | ... | ${nodes} | ${dut} | ${phy_cores} | rx_queues=${rx_queues} -| | | ... | rxd=${rxd} | txd=${txd} -| | | Set Test Variable | &{compute_resource_info} -| | | Create compute resources variables -| | | Run Keyword | ${dut}.Add CPU Main Core | ${cpu_main} +| | | Run Keyword | ${dut}.Add CPU Main Core | ${${dut}_cpu_main} | | | Run Keyword If | ${cpu_count_int} > 0 -| | | ... | ${dut}.Add CPU Corelist Workers | ${cpu_wt} +| | | ... | ${dut}.Add CPU Corelist Workers | ${${dut}_cpu_wt} | | | Run Keyword | ${dut}.Add Buffers Per Numa | ${buffers_numa} | | END @@ -226,6 +223,22 @@ | | ... | _NOTE:_ This KW sets various suite variables based on computed | | ... | resources. | | +| | ... | *Arguments:* +| | ... | - phy_cores - Number of physical cores to use. Type: integer +| | ... | - rx_queues - Number of RX queues. Type: integer +| | ... | - rxd - Number of RX descriptors. Type: integer +| | ... | - txd - Number of TX descriptors. Type: integer +| | +| | ... | *Example:* +| | +| | ... | \| Create compute resources variables \| ${1} \| ${1} \| +| | +| | [Arguments] | ${phy_cores} | ${rx_queues}=${None} +| | ... | ${rxd}=${None} | ${txd}=${None} +| | +| | &{compute_resource_info}= | Get Affinity Vswitch +| | ... | ${nodes} | ${phy_cores} | rx_queues=${rx_queues} +| | ... | rxd=${rxd} | txd=${txd} | | ${variables}= | Get Dictionary Keys | ${compute_resource_info} | | FOR | ${variable} | IN | @{variables} | | | ${value}= | Get From Dictionary | ${compute_resource_info} | ${variable} diff --git a/resources/libraries/robot/shared/vm.robot b/resources/libraries/robot/shared/vm.robot index 029956c6c0..e8618dc40b 100644 --- a/resources/libraries/robot/shared/vm.robot +++ b/resources/libraries/robot/shared/vm.robot @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Cisco and/or its affiliates. +# Copyright (c) 2023 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: @@ -116,8 +116,9 @@ | | ... | rxq_count_int=${rxq_count_int} | | ... | virtio_feature_mask=${virtio_feature_mask} | page_size=${page_size} | | ${cpu_wt}= | Run Keyword | vnf_manager.Start All VMs | pinning=${pinning} -| | ${cpu_alloc_str}= | Catenate | SEPARATOR=, | ${cpu_alloc_str} | ${cpu_wt} -| | Set Test Variable | ${cpu_alloc_str} +| | ${${node}_cpu_alloc_str}= | Catenate | SEPARATOR=, +| | ... | ${${node}_cpu_alloc_str} | ${cpu_wt} +| | Set Test Variable | ${${node}_cpu_alloc_str} | | Run Keyword If | ${validate} | | ... | All VPP Interfaces Ready Wait | ${nodes} | retries=${300} | | VPP round robin RX placement on all DUTs | ${nodes} | prefix=Virtual |