X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fshared%2Fdefault.robot;h=81ebc8300c5374b4d8a2d91976428575f19485a0;hp=579577cb568522f68c3a33ace15a5f274ba124cc;hb=2e250ffd8711be1247353d403a68573c0d232e8e;hpb=0b0b14fb00fbaab5eb2745657d741084fe2e1de2 diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot index 579577cb56..81ebc8300c 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 @@ -36,11 +37,6 @@ | Resource | resources/libraries/robot/vm/qemu.robot *** Keywords *** -| Configure all DUTs before test -| | [Documentation] | Setup all DUTs in topology before test execution. -| | ... -| | Setup All DUTs | ${nodes} - | Configure all TGs for traffic script | | [Documentation] | Prepare all TGs before traffic scripts execution. | | ... @@ -53,14 +49,6 @@ | | :FOR | ${dut} | IN | @{duts} | | | Vpp Show Errors | ${nodes['${dut}']} -| Show VPP trace dump on all DUTs -| | [Documentation] | Save API trace and dump output on all DUTs. -| | ... -| | ${duts}= | Get Matches | ${nodes} | DUT* -| | :FOR | ${dut} | IN | @{duts} -| | | Vpp api trace save | ${nodes['${dut}']} -| | | Vpp api trace dump | ${nodes['${dut}']} - | Show Bridge Domain Data On All DUTs | | [Documentation] | Show Bridge Domain data on all DUTs. | | ... @@ -199,10 +187,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} @@ -217,7 +208,9 @@ | | | Run keyword | ${dut}.Add DPDK Dev Default RXQ | ${rxq_count_int} # For now there is no way to easily predict the number of buffers. Statically # doing maximum amount of buffers allowed by DPDK. -| | | Run keyword | ${dut}.Add Buffers Per Numa | ${215040} +| | | Run keyword if | ${smt_used} +| | | ... | Run keyword | ${dut}.Add Buffers Per Numa | ${215040} | ELSE +| | | ... | Run keyword | ${dut}.Add Buffers Per Numa | ${107520} | | | Run keyword if | ${thr_count_int} > 1 | | | ... | Set Tags | MTHREAD | ELSE | Set Tags | STHREAD | | | Set Tags | ${thr_count_int}T${cpu_count_int}C @@ -413,21 +406,20 @@ | | Run keyword | DUT2.Add DPDK SW Cryptodev | ${sw_pmd_type} | ${socket_id} | | ... | ${thr_count_int} -| Apply startup configuration on all VPP DUTs -| | [Documentation] | Write startup configuration and restart VPP on all DUTs. +| Write startup configuration on all VPP DUTs +| | [Documentation] | Write VPP startup configuration on all DUTs. | | ... -| | ... | *Arguments:* -| | ... | - restart_vpp - Whether to restart VPP (Optional). Type: boolean -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Apply startup configuration on all VPP DUTs \| ${False} \| -| | ... -| | [Arguments] | ${restart_vpp}=${True} +| | ${duts}= | Get Matches | ${nodes} | DUT* +| | :FOR | ${dut} | IN | @{duts} +| | | Run keyword | ${dut}.Write Config + +| Apply startup configuration on all VPP DUTs +| | [Documentation] | Write VPP startup configuration and restart VPP on all +| | ... | DUTs. | | ... | | ${duts}= | Get Matches | ${nodes} | DUT* | | :FOR | ${dut} | IN | @{duts} -| | | Run keyword | ${dut}.Apply Config | restart_vpp=${restart_vpp} +| | | Run keyword | ${dut}.Apply Config | | Enable Coredump Limit VPP on All DUTs | ${nodes} | | Update All Interface Data On All Nodes | ${nodes} | skip_tg=${True} @@ -463,7 +455,9 @@ | Set up functional test | | [Documentation] | Common test setup for functional tests. | | ... -| | Configure all DUTs before test +| | Restart Vpp Service On All Duts | ${nodes} +| | Verify Vpp On All Duts | ${nodes} +| | VPP Enable Traces On All Duts | ${nodes} | | Save VPP PIDs | | Configure all TGs for traffic script | | Update All Interface Data On All Nodes | ${nodes} @@ -483,7 +477,9 @@ # much | | [Documentation] | Common test setup for vpp-device tests. | | ... -| | Configure all DUTs before test +| | Restart Vpp Service On All Duts | ${nodes} +| | Verify Vpp On All Duts | ${nodes} +| | VPP Enable Traces On All Duts | ${nodes} | | Save VPP PIDs | | Configure all TGs for traffic script | | Update All Interface Data On All Nodes | ${nodes} | skip_tg_udev=${True} @@ -611,16 +607,3 @@ | | ... | | [Arguments] | ${node} | | Stop VPP Service | ${node} - -| Start VPP Service on DUT -| | [Documentation] | Start the VPP service on the specified node. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Start VPP Service on DUT \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | Start VPP Service | ${node}