aboutsummaryrefslogtreecommitdiffstats
path: root/test/framework.py
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2018-06-22 13:54:07 +0200
committerFlorin Coras <florin.coras@gmail.com>2018-06-22 16:20:47 +0000
commitd5c60b96a3fd93916fc4af5c8d6d25625c28242e (patch)
tree78f5b5c614d6a3496e7acd995a42278c6f79d92a /test/framework.py
parent3e2d57d8773e1d03577048f497dc7ed567fd9344 (diff)
make test: fix broken interfaces
Change-Id: I2e092774f81503e04b53cc6c6b5d357fe3fc52ab Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'test/framework.py')
-rw-r--r--test/framework.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/framework.py b/test/framework.py
index be8c209f4ea..dd4774dc72b 100644
--- a/test/framework.py
+++ b/test/framework.py
@@ -558,18 +558,16 @@ class VppTestCase(unittest.TestCase):
return result
@classmethod
- def create_loopback_interfaces(cls, interfaces):
+ def create_loopback_interfaces(cls, count):
"""
Create loopback interfaces.
- :param interfaces: iterable indexes of the interfaces.
+ :param count: number of interfaces created.
:returns: List of created interfaces.
"""
- result = []
- for i in interfaces:
- intf = VppLoInterface(cls, i)
+ result = [VppLoInterface(cls) for i in range(count)]
+ for intf in result:
setattr(cls, intf.name, intf)
- result.append(intf)
cls.lo_interfaces = result
return result