aboutsummaryrefslogtreecommitdiffstats
path: root/test/framework.py
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2018-06-24 22:49:33 +0200
committerKlement Sekera <ksekera@cisco.com>2018-06-24 22:53:37 +0200
commitb9ef2739dd1e681143e78ada1ffc342ae2fb89b0 (patch)
tree83f4c992ac9a1cdc7780e85c69a8a5ced1bc4ad6 /test/framework.py
parent31da2e30317bc1fcb4586e1dc0d560600d9b29d3 (diff)
Revert "Revert "make test: fix broken interfaces""
This reverts commit c8efa29b6f9a91381897b54f1147daf922ed7164. Change-Id: I1d5c5773d5f86a63073e255336bd9de628e26179 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