X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fshared%2Fdefault.robot;h=64365f352b669995ae5263855a365d17bcb066d6;hb=b340b5c9925b43869b91197850504760757a0bfe;hp=3b8f2804c1cd7b218863fcc5abbf9f57f7398dfc;hpb=3d5a75be5a88931690898e0fe52e4f48bc67c5ed;p=csit.git diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot index 3b8f2804c1..64365f352b 100644 --- a/resources/libraries/robot/shared/default.robot +++ b/resources/libraries/robot/shared/default.robot @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. +# Copyright (c) 2020 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: @@ -113,6 +113,31 @@ | | Verify Kernel Module on All DUTs | ${nodes} | ${module} | | ... | force_load=${force_load} +| Get Keyname for DUT +| | [Documentation] +| | ... | Get the Keyname for the DUT in the keyname list. +| | ... | Returns lowercase keyname value. +| | +| | ... | *Arguments:* +| | ... | - dutx - DUT to find keyname. Type: dict +| | ... | - dut_keys - DUT Keynames to search. Type: list +| | +| | ... | *Example:* +| | +| | ... | \| Get Keyname for DUT \| ${dutx} \| ${duts} \| +| | +| | [Arguments] | ${dutx} | ${dut_keys} +| | +| | FOR | ${key} | IN | @{dut_keys} +| | | ${found_key} | ${value}= | Run Keyword and Ignore Error +| | | ... | Dictionaries Should Be Equal | ${nodes['${key}']} | ${dutx} +| | | Run Keyword If | '${found_key}' == 'PASS' | EXIT FOR LOOP +| | END +| | Run Keyword If | '${found_key}' != 'PASS' +| | ... | Fail | Keyname for ${dutx} not found +| | ${keyname}= | Convert To Lowercase | ${key} +| | Return From Keyword | ${keyname} + | Create base startup configuration of VPP on all DUTs | | [Documentation] | Create base startup configuration of VPP to all DUTs. | | @@ -193,13 +218,16 @@ | | | ${rxq_count_int}= | Run keyword if | ${rxq_count_int} == 0 | | | ... | Set variable | ${1} | | | ... | ELSE | Set variable | ${rxq_count_int} -| | | Run keyword if | ${cpu_count_int} > 0 -| | | ... | ${dut}.Add CPU Main Core | ${cpu_main} +| | | Run Keyword | ${dut}.Add CPU Main Core | ${cpu_main} | | | Run keyword if | ${cpu_count_int} > 0 | | | ... | ${dut}.Add CPU Corelist Workers | ${cpu_wt} | | | Run keyword if | ${smt_used} | | | ... | Run keyword | ${dut}.Add Buffers Per Numa | ${215040} | ELSE | | | ... | Run keyword | ${dut}.Add Buffers Per Numa | ${107520} +| | | ${ipsec} | Get Match Count | ${TEST TAGS} | IPSEC +| | | ... | case_insensitive=True +| | | Run keyword if | ${ipsec} and ${jumbo} +| | | ... | ${dut}.Add Buffers Default Data Size | 9200 | | | Run keyword if | ${thr_count_int} > 1 | | | ... | Set Tags | MTHREAD | ELSE | Set Tags | STHREAD | | | Set Tags | ${thr_count_int}T${cpu_count_int}C