From 6236b8f28fefedd69de4a35797bd5d137868ccd4 Mon Sep 17 00:00:00 2001 From: lguohan Date: Thu, 25 Jul 2019 15:28:45 -0700 Subject: [PATCH] [vstest]: report error when team kernel module is not available (#994) make explicit failure if team kernel module is not available on the system Signed-off-by: Guohan Lu --- tests/conftest.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index a4d8ecb9e3a1..36189dbd2264 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -158,6 +158,9 @@ def __init__(self, name=None, keeptb=False, fakeplatform=None): self.alld = self.basicd + self.swssd + self.syncd + self.rtd + self.teamd self.client = docker.from_env() + if subprocess.check_call(["/sbin/modprobe", "team"]) != 0: + raise NameError("cannot install kernel team module") + self.ctn = None if keeptb: self.cleanup = False