X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fbash%2Fentry%2Fcheck%2Ftc_naming.sh;h=bc2ac3267131d34b7ed442d54c27b5813db61d46;hp=1101fa5a16569a099d834513a3b3a2268fe27a18;hb=9377c956a86e42727039d9dab8879c10c9399f4c;hpb=385f224625afd53e478e6508066e0c0dd5fc108a diff --git a/resources/libraries/bash/entry/check/tc_naming.sh b/resources/libraries/bash/entry/check/tc_naming.sh index 1101fa5a16..bc2ac32671 100644 --- a/resources/libraries/bash/entry/check/tc_naming.sh +++ b/resources/libraries/bash/entry/check/tc_naming.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2019 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: @@ -28,12 +28,12 @@ source "${BASH_FUNCTION_DIR}/common.sh" || { exit 1 } -# Grep of interest: We want all tc01- prefixed (skip TC variations for now). +# Grep of interest: We want all [0-9]{2,4}B- or IMIX- prefixed. # Currently script assumes all variations inside to be part of either # auto-generation or not checked at all (VIRL derivates). -r_grep="tc01-" +r_grep="([0-9]{2,4}B|IMIX)-" # Parse grep of interest (learn path, learn suite, learn testcase name). -r_parse='(.*)\/(.*).robot.*(tc[[:digit:]]{2}-.*)' +r_parse='(.*)\/(.*).robot.*(([0-9]{2,4}B|IMIX)-.*)' # CSIT Testcase naming convention rules. # https://wiki.fd.io/view/CSIT/csit-test-naming @@ -48,16 +48,14 @@ r_parse='(.*)\/(.*).robot.*(tc[[:digit:]]{2}-.*)' # One caveat of this solution is that we cannot proceed to check full names now # as majority of Testcases does not meet naming criteria. s_testc_rules=( - 'TC id' - 'packet size' + 'packet size or file size' 'core combination' 'NIC driver mode' 'packet encapsulation on L2 layer' 'test type' ) r_testc_rules=( - '^tc[[:digit:]]{2}-' - '([[:digit:]]{2,4}B|IMIX)-' + '^([[:digit:]]{1,4}B|IMIX)-' '([[:digit:]]+c-){0,1}' '(avf-|1lbvpplacp-|2lbvpplacp-){0,1}' '(eth|dot1q|dot1ad)' @@ -66,7 +64,7 @@ r_testc_rules=( #'(ipsec[[:digit:]]+tnlhw|ipsec[[:digit:]]+tnlsw|' #'srhip6|tcp|udp|lispip6|lispip4|vxlan){0,1}' #'(http){0,1}-' - '(.*)-(dev|ndrpdr|cps)$' + '(.*)-(dev|ndrpdr|bps|cps|rps|reconf)$' ) s_suite_rules=( 'number of SUT nodes' @@ -85,7 +83,7 @@ r_suite_rules=( #'(ipsec[[:digit:]]+tnlhw|ipsec[[:digit:]]+tnlsw|' #'srhip6|tcp|udp|lispip6|lispip4|vxlan){0,1}' #'(http){0,1}-' - '(.*)-(dev|ndrpdr|cps)$' + '(.*)-(dev|ndrpdr|bps|cps|rps|reconf)$' ) rm -f "tc_naming.log" || die @@ -139,4 +137,4 @@ if [ $((total_failed_tc + total_failed_su)) != "0" ]; then fi warn -warn "Testcase naming checker: PASS" \ No newline at end of file +warn "Testcase naming checker: PASS"