aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/shared
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2019-04-19 06:40:44 +0000
committerPeter Mikus <pmikus@cisco.com>2019-04-26 11:03:30 +0000
commit780b65d82863effd53ccb0e0150c29d22522c61d (patch)
tree0c5a5a48d067e337a754e34a6182470ef5aff9da /resources/libraries/robot/shared
parentf6e9d58ecd95789e0b3292983fafff223ec75a2c (diff)
NF density tests with dtc=0.5 and dtcr=2
Change-Id: Icff556142280ad0b6261e0a2bfb71672ee6b3807 Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'resources/libraries/robot/shared')
-rw-r--r--resources/libraries/robot/shared/container.robot14
-rw-r--r--resources/libraries/robot/shared/default.robot8
2 files changed, 17 insertions, 5 deletions
diff --git a/resources/libraries/robot/shared/container.robot b/resources/libraries/robot/shared/container.robot
index d1ec6d2a03..c1ab1af18d 100644
--- a/resources/libraries/robot/shared/container.robot
+++ b/resources/libraries/robot/shared/container.robot
@@ -41,6 +41,13 @@
| | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${nf_chain}=${1}
| | ... | ${nf_node}=${1} | ${auto_scale}=${True} | ${nested}=${False}
| | ...
+| | ${nf_dtcr_status} | ${value}= | Run Keyword And Ignore Error
+| | ... | Variable Should Exist | ${nf_dtcr}
+| | ${nf_dtcr}= | Run Keyword If | '${nf_dtcr_status}' == 'PASS'
+| | ... | Set Variable | ${nf_dtcr} | ELSE | Set Variable | ${1}
+| | ${nf_dtc}= | Run Keyword Unless | ${nested}
+| | ... | Set Variable If | ${auto_scale} | ${cpu_count_int}
+| | ... | ${nf_dtc}
| | ${duts}= | Get Matches | ${nodes} | DUT*
| | :FOR | ${dut} | IN | @{duts}
| | | ${nf_id}= | Evaluate | (${nf_chain} - ${1}) * ${nf_nodes} + ${nf_node}
@@ -56,9 +63,10 @@
| | | ... | ${root}/usr/share/vpp/:/usr/share/vpp/
| | | ${nf_cpus}= | Set Variable | ${None}
| | | ${nf_cpus}= | Run Keyword Unless | ${nested}
-| | | ... | Create network function CPU list | ${dut}
-| | | ... | chains=${nf_chains} | nodeness=${nf_nodes} | chain_id=${nf_chain}
-| | | ... | node_id=${nf_node} | auto_scale=${auto_scale}
+| | | ... | Get Affinity NF | ${nodes} | ${dut}
+| | | ... | nf_chains=${nf_chains} | nf_nodes=${nf_nodes}
+| | | ... | nf_chain=${nf_chain} | nf_node=${nf_node}
+| | | ... | vs_dtc=${cpu_count_int} | nf_dtc=${nf_dtc} | nf_dtcr=${nf_dtcr}
| | | &{cont_args}= | Create Dictionary
| | | ... | name=${dut}_${container_group}${nf_id}${uuid}
| | | ... | node=${nodes['${dut}']} | mnt=${mnt} | env=${env}
diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot
index 569ff34812..6e26abc03b 100644
--- a/resources/libraries/robot/shared/default.robot
+++ b/resources/libraries/robot/shared/default.robot
@@ -14,6 +14,7 @@
*** Settings ***
| Variables | resources/libraries/python/topology.py
| Variables | resources/libraries/python/PapiHistory.py
+| Variables | resources/libraries/python/Constants.py
| ...
| Library | Collections
| Library | OperatingSystem
@@ -199,10 +200,13 @@
| | | ... | Append To List | ${if_list} | ${${dut}_if2_1} | ${${dut}_if2_2}
| | | ${numa}= | Get interfaces numa node | ${nodes['${dut}']} | @{if_list}
| | | ${smt_used}= | Is SMT enabled | ${nodes['${dut}']['cpuinfo']}
+| | | ${skip_cnt}= | Set variable | ${CPU_CNT_SYSTEM}
| | | ${cpu_main}= | Cpu list per node str | ${nodes['${dut}']} | ${numa}
-| | | ... | skip_cnt=${1} | cpu_cnt=${1}
+| | | ... | skip_cnt=${skip_cnt} | cpu_cnt=${CPU_CNT_MAIN}
+| | | ${skip_cnt}= | Evaluate | ${CPU_CNT_SYSTEM} + ${CPU_CNT_MAIN}
| | | ${cpu_wt}= | Cpu list per node str | ${nodes['${dut}']} | ${numa}
-| | | ... | skip_cnt=${2} | cpu_cnt=${cpu_count_int} | smt_used=${smt_used}
+| | | ... | skip_cnt=${skip_cnt} | cpu_cnt=${cpu_count_int}
+| | | ... | smt_used=${smt_used}
| | | ${thr_count_int}= | Run keyword if | ${smt_used}
| | | ... | Evaluate | int(${cpu_count_int}*2)
| | | ... | ELSE | Set variable | ${thr_count_int}