+ if not hasattr(cls, "vpp_worker_count"):
+ cls.vpp_worker_count = 0
+ worker_config = os.getenv("VPP_WORKER_CONFIG", "")
+ if worker_config:
+ elems = worker_config.split(" ")
+ if elems[0] != "workers" or len(elems) != 2:
+ raise ValueError("Wrong VPP_WORKER_CONFIG == '%s' value." %
+ worker_config)
+ cls.vpp_worker_count = int(elems[1])
+ if cls.vpp_worker_count > 0 and\
+ cls.has_tag(TestCaseTag.FIXME_VPP_WORKERS):
+ cls.vpp_worker_count = 0
+
+ default_variant = os.getenv("VARIANT")
+ if default_variant is not None:
+ default_variant = "defaults { %s 100 }" % default_variant
+ else:
+ default_variant = ""
+
+ api_fuzzing = os.getenv("API_FUZZ")
+ if api_fuzzing is None:
+ api_fuzzing = 'off'
+
+ cls.vpp_cmdline = [
+ cls.vpp_bin,
+ "unix", "{", "nodaemon", debug_cli, "full-coredump",
+ coredump_size, "runtime-dir", cls.tempdir, "}",
+ "api-trace", "{", "on", "}",
+ "api-segment", "{", "prefix", cls.shm_prefix, "}",
+ "cpu", "{", "main-core", str(cpu_core_number), ]
+ if cls.vpp_worker_count:
+ cls.vpp_cmdline.extend(["workers", str(cls.vpp_worker_count)])
+ cls.vpp_cmdline.extend([
+ "}",
+ "physmem", "{", "max-size", "32m", "}",
+ "statseg", "{", "socket-name", cls.stats_sock, "}",
+ "socksvr", "{", "socket-name", cls.api_sock, "}",
+ "node { ", default_variant, "}",
+ "api-fuzz {", api_fuzzing, "}",
+ "plugins", "{", "plugin", "dpdk_plugin.so", "{", "disable", "}",
+ "plugin", "rdma_plugin.so", "{", "disable", "}",
+ "plugin", "lisp_unittest_plugin.so", "{", "enable", "}",
+ "plugin", "unittest_plugin.so", "{", "enable", "}"
+ ] + cls.extra_vpp_plugin_config + ["}", ])