perf: add TCP Nginx+LDPRELOAD suites
[csit.git] / resources / libraries / bash / entry / check / tc_naming.sh
index b193cfa..bc2ac32 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 
 #!/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:
 # 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
 }
 
     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).
 # 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).
 # 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
 
 # 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=(
 # 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=(
     '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)'
     '([[: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}-'
     #'(ipsec[[:digit:]]+tnlhw|ipsec[[:digit:]]+tnlsw|'
     #'srhip6|tcp|udp|lispip6|lispip4|vxlan){0,1}'
     #'(http){0,1}-'
-    '(.*)-(dev|ndrpdr|cps|rps|reconf)$'
+    '(.*)-(dev|ndrpdr|bps|cps|rps|reconf)$'
     )
 s_suite_rules=(
     'number of SUT nodes'
     )
 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}-'
     #'(ipsec[[:digit:]]+tnlhw|ipsec[[:digit:]]+tnlsw|'
     #'srhip6|tcp|udp|lispip6|lispip4|vxlan){0,1}'
     #'(http){0,1}-'
-    '(.*)-(dev|ndrpdr|cps|rps|reconf)$'
+    '(.*)-(dev|ndrpdr|bps|cps|rps|reconf)$'
     )
 
 rm -f "tc_naming.log" || die
     )
 
 rm -f "tc_naming.log" || die
@@ -139,4 +137,4 @@ if [ $((total_failed_tc + total_failed_su)) != "0" ]; then
 fi
 
 warn
 fi
 
 warn
-warn "Testcase naming checker: PASS"
\ No newline at end of file
+warn "Testcase naming checker: PASS"