CSIT-1597 API cleanup: ipsec
[csit.git] / resources / libraries / python / autogen / Testcase.py
index 224295e..c4ed606 100644 (file)
@@ -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:
@@ -66,7 +66,7 @@ class Testcase:
             {
                 u"cores_num": f"${{{cores_num:d}}}",
                 u"cores_str": phy_cores,
-                u"tc_num": f"tc{num:02d}"
+                u"tc_num": f"tc{num:02d}",
             }
         )
         return self.template.substitute(subst_dict)
@@ -103,9 +103,15 @@ class Testcase:
         """
         # TODO: Choose a better frame size identifier for streamed protocols
         # (TCP, QUIC, SCTP, ...) where DUT (not TG) decides frame size.
-        template_string = f'''
+        if u"tcphttp" in suite_id:
+            template_string = f'''
 | ${{tc_num}}-IMIX-${{cores_str}}c-{suite_id}
 | | [Tags] | ${{cores_str}}C
 | | phy_cores=${{cores_num}}
+'''
+        else:
+            template_string = f'''
+| ${{tc_num}}-${{frame_str}}-${{cores_str}}c-{suite_id[:-4]}-{suite_id[-3:]}
+| | [Tags] | ${{cores_str}}C\n| | phy_cores=${{cores_num}}
 '''
         return cls(template_string)