X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fshared%2Fsuite_setup.robot;h=6e1136761cdb1e8fe0a46cf1d3fcd0fed1aad330;hb=9780b57a9640e9ab40e40ec122ac80e09cd74c79;hp=05e8fe8e91f004dd13de7b10fe84a7d7cffe72a9;hpb=424346c5880f49182ca4408f0d77486beeb5b64e;p=csit.git diff --git a/resources/libraries/robot/shared/suite_setup.robot b/resources/libraries/robot/shared/suite_setup.robot index 05e8fe8e91..6e1136761c 100644 --- a/resources/libraries/robot/shared/suite_setup.robot +++ b/resources/libraries/robot/shared/suite_setup.robot @@ -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: @@ -16,12 +16,12 @@ *** Settings *** | Library | resources.libraries.python.DPDK.DPDKTools | Library | resources.libraries.python.InterfaceUtil +| Library | resources.libraries.python.NGINX.NGINXTools +| Library | resources.tools.ab.ABTools | Library | resources.libraries.python.NodePath | Library | resources.libraries.python.topology.Topology | Library | resources.libraries.python.TrafficGenerator -| Library | resources.tools.wrk.wrk | Variables | resources/libraries/python/Constants.py -| Resource | resources/libraries/robot/wrk/wrk_utils.robot | | Documentation | Suite setup keywords. *** Keywords *** @@ -141,15 +141,15 @@ | | | | ... | *Example:* | | -| | ... | \| Additional Suite Setup Action For performance_dut \| DUT1 \| +| | ... | \| Additional Suite Setup Action For performance vf \| DUT1 \| | | | | [Arguments] | ${dut} | | | | FOR | ${pf} | IN RANGE | 1 | ${nic_pfs} + 1 | | | ${_vf}= -| | | ... | Run Keyword | Init ${nic_driver} interface -| | | ... | ${nodes['${dut}']} | ${${dut}_pf${pf}}[0] | numvfs=${nic_vfs} -| | | ... | osi_layer=${osi_layer} +| | | ... | Run Keyword | Init interface +| | | ... | ${nodes['${dut}']} | ${${dut}_pf${pf}}[0] | driver=${nic_driver} +| | | ... | numvfs=${nic_vfs} | osi_layer=${osi_layer} | | | ${_mac}= | | | ... | Create List | ${EMPTY} | | | ${_ip4_addr}= @@ -176,6 +176,26 @@ | | Set Suite Variable | | ... | ${int} | prevf +| Additional Suite Setup Action For performance pf +| | [Documentation] +| | ... | Additional Setup for suites which uses performance measurement for +| | ... | single DUT (inner loop). +| | +| | ... | *Arguments:* +| | ... | - dut - DUT node. Type: string +| | +| | ... | *Example:* +| | +| | ... | \| Additional Suite Setup Action For performance pf \| DUT1 \| +| | +| | [Arguments] | ${dut} +| | +| | FOR | ${pf} | IN RANGE | 1 | ${nic_pfs} + 1 +| | | Run Keyword | Init interface +| | | ... | ${nodes['${dut}']} | ${${dut}_pf${pf}}[0] | driver=${nic_driver} +| | | ... | numvfs=${0} | osi_layer=${osi_layer} +| | END + | Additional Suite Setup Action For performance | | [Documentation] | | ... | Additional Setup for suites which uses performance measurement. @@ -183,6 +203,8 @@ | | FOR | ${dut} | IN | @{duts} | | | Run Keyword If | ${nic_vfs} > 0 | | | ... | Additional Suite Setup Action For performance vf | ${dut} +| | | ... | ELSE +| | | ... | Additional Suite Setup Action For performance pf | ${dut} | | END | | Initialize traffic generator | | ... | ${tg} | ${TG_pf1}[0] | ${TG_pf2}[0] @@ -201,13 +223,19 @@ | | ... | force_init=${True} | | Configure kernel module on all DUTs | vfio_pci | force_load=${True} -| Additional Suite Setup Action For wrk +| Additional Suite Setup Action For nginx +| | [Documentation] +| | ... | Additional Setup for suites which uses Nginx. +| | +| | Install NGINX framework on all DUTs | ${nodes} | ${packages_dir} +| | ... | ${nginx_version} + +| Additional Suite Setup Action For ab | | [Documentation] -| | ... | Additional Setup for suites which uses WRK TG. +| | ... | Additional Setup for suites which uses ab TG. | | -| | Verify Program Installed | ${tg} | wrk +| | Verify Program Installed | ${tg} | ab | | Iface update numa node | ${tg} -# Make sure TRex is stopped | | ${running}= | Is TRex running | ${tg} | | Run keyword if | ${running}==${True} | Teardown traffic generator | ${tg} | | ${curr_driver}= | Get PCI dev driver | ${tg} @@ -215,18 +243,16 @@ | | Run keyword if | '${curr_driver}'!='${None}' | | ... | PCI Driver Unbind | ${tg} | | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']} -# Bind tg_if1 to driver specified in the topology | | ${driver}= | Get Variable Value | ${tg['interfaces']['${tg_if1}']['driver']} | | PCI Driver Bind | ${tg} | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']} | ${driver} -# Set IP on tg_if1 | | ${intf_name}= | Get Linux interface name | ${tg} | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']} -| | FOR | ${ip_addr} | IN | @{wrk_ip_addrs} +| | FOR | ${ip_addr} | IN | @{ab_ip_addrs} | | | ${ip_addr_on_intf}= | Linux interface has IP | ${tg} | ${intf_name} -| | | ... | ${ip_addr} | ${wrk_ip_prefix} +| | | ... | ${ip_addr} | ${ab_ip_prefix} | | | Run Keyword If | ${ip_addr_on_intf}==${False} | Set Linux interface IP -| | | ... | ${tg} | ${intf_name} | ${ip_addr} | ${wrk_ip_prefix} +| | | ... | ${tg} | ${intf_name} | ${ip_addr} | ${ab_ip_prefix} | | END | | Set Linux interface up | ${tg} | ${intf_name} -| | Check wrk | ${tg} +| | Check ab | ${tg}