X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Fframework.py;h=fbd21d2370f900c89b43791bed591885d655a0ec;hb=9a69a6095f67b8979a02f128f44e449889454273;hp=6b1799a5544071e7d7d441c68fad781c54f1d617;hpb=871349371a62f1f20b159b6afead8e84f8a2322b;p=vpp.git diff --git a/test/framework.py b/test/framework.py index 6b1799a5544..fbd21d2370f 100644 --- a/test/framework.py +++ b/test/framework.py @@ -50,6 +50,10 @@ class _PacketInfo(object): #: Store the index of the destination packet generator interface #: of the packet. dst = -1 + #: Store expected ip version + ip = -1 + #: Store expected upper protocol + proto = -1 #: Store the copy of the former packet. data = None @@ -142,6 +146,16 @@ class VppTestCase(unittest.TestCase): cls.set_debug_flags(d) cls.vpp_bin = os.getenv('VPP_TEST_BIN', "vpp") cls.plugin_path = os.getenv('VPP_TEST_PLUGIN_PATH') + cls.extern_plugin_path = os.getenv('EXTERN_PLUGINS') + plugin_path = None + if cls.plugin_path is not None: + if cls.extern_plugin_path is not None: + plugin_path = "%s:%s" % ( + cls.plugin_path, cls.extern_plugin_path) + else: + plugin_path = cls.plugin_path + elif cls.extern_plugin_path is not None: + plugin_path = cls.extern_plugin_path debug_cli = "" if cls.step or cls.debug_gdb or cls.debug_gdbserver: debug_cli = "cli-listen localhost:5002" @@ -157,9 +171,11 @@ class VppTestCase(unittest.TestCase): cls.vpp_cmdline = [cls.vpp_bin, "unix", "{", "nodaemon", debug_cli, coredump_size, "}", "api-trace", "{", "on", "}", - "api-segment", "{", "prefix", cls.shm_prefix, "}"] - if cls.plugin_path is not None: - cls.vpp_cmdline.extend(["plugin_path", cls.plugin_path]) + "api-segment", "{", "prefix", cls.shm_prefix, "}", + "plugins", "{", "plugin", "dpdk_plugin.so", "{", + "disable", "}", "}"] + if plugin_path is not None: + cls.vpp_cmdline.extend(["plugin_path", plugin_path]) cls.logger.info("vpp_cmdline: %s" % cls.vpp_cmdline) @classmethod @@ -343,7 +359,7 @@ class VppTestCase(unittest.TestCase): self._testMethodDoc)) if not self.vpp_dead: self.logger.debug(self.vapi.cli("show trace")) - self.logger.info(self.vapi.ppcli("show int")) + self.logger.info(self.vapi.ppcli("show interfaces")) self.logger.info(self.vapi.ppcli("show hardware")) self.logger.info(self.vapi.ppcli("show error")) self.logger.info(self.vapi.ppcli("show run")) @@ -513,7 +529,8 @@ class VppTestCase(unittest.TestCase): :returns: string containing serialized data from packet info """ - return "%d %d %d" % (info.index, info.src, info.dst) + return "%d %d %d %d %d" % (info.index, info.src, info.dst, + info.ip, info.proto) @staticmethod def payload_to_info(payload): @@ -530,6 +547,8 @@ class VppTestCase(unittest.TestCase): info.index = int(numbers[0]) info.src = int(numbers[1]) info.dst = int(numbers[2]) + info.ip = int(numbers[3]) + info.proto = int(numbers[4]) return info def get_next_packet_info(self, info):