summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Makefile2
-rw-r--r--test/framework.py7
-rw-r--r--test/vpp_papi_provider.py10
3 files changed, 16 insertions, 3 deletions
diff --git a/test/Makefile b/test/Makefile
index f78c8a8ca69..724b50457aa 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -297,6 +297,8 @@ help:
@echo ""
@echo " SKIP_AARCH64=1 - skip tests that are failing on the ARM platorm in FD.io CI"
@echo ""
+ @echo " SOCKET=1 - Communicate with VPP over Unix domain socket instead of SHM"
+ @echo ""
@echo "Creating test documentation"
@echo " test-doc - generate documentation for test framework"
@echo " test-wipe-doc - wipe documentation for test framework"
diff --git a/test/framework.py b/test/framework.py
index 8a92229249b..25db2b72b34 100644
--- a/test/framework.py
+++ b/test/framework.py
@@ -313,8 +313,10 @@ class VppTestCase(unittest.TestCase):
coredump_size, "runtime-dir", cls.tempdir, "}",
"api-trace", "{", "on", "}", "api-segment", "{",
"prefix", cls.shm_prefix, "}", "cpu", "{",
- "main-core", str(cpu_core_number), "}", "statseg",
- "{", "socket-name", cls.stats_sock, "}", "plugins",
+ "main-core", str(cpu_core_number), "}",
+ "statseg", "{", "socket-name", cls.stats_sock, "}",
+ "socksvr", "{", "socket-name", cls.api_sock, "}",
+ "plugins",
"{", "plugin", "dpdk_plugin.so", "{", "disable",
"}", "plugin", "rdma_plugin.so", "{", "disable",
"}", "plugin", "unittest_plugin.so", "{", "enable",
@@ -415,6 +417,7 @@ class VppTestCase(unittest.TestCase):
cls.tempdir = tempfile.mkdtemp(
prefix='vpp-unittest-%s-' % cls.__name__)
cls.stats_sock = "%s/stats.sock" % cls.tempdir
+ cls.api_sock = "%s/api.sock" % cls.tempdir
cls.file_handler = FileHandler("%s/log.txt" % cls.tempdir)
cls.file_handler.setFormatter(
Formatter(fmt='%(asctime)s,%(msecs)03d %(message)s',
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index 62fc0aa42b3..8b637f0bd49 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -226,8 +226,16 @@ class VppPapiProvider(object):
if 'VPP_API_DIR' not in os.environ:
os.environ['VPP_API_DIR'] = os.getenv('VPP_INSTALL_PATH')
+ use_socket = False
+ try:
+ if os.environ['SOCKET'] == '1':
+ use_socket = True
+ except:
+ pass
self.vpp = VPP(logger=test_class.logger,
- read_timeout=read_timeout)
+ read_timeout=read_timeout,
+ use_socket=use_socket,
+ server_address=test_class.api_sock)
self._events = deque()
def __enter__(self):