summaryrefslogtreecommitdiffstats
path: root/test/framework.py
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2018-02-26 14:40:13 -0500
committerKeith Burns <alagalah@gmail.com>2018-02-27 18:23:05 +0000
commit42996c0fcd73f6eeaa0723c1172f668d81a5ef41 (patch)
tree82ee0c1a7a9f678e62902016d980451d5803ecea /test/framework.py
parent10e369986ac37abb20f1dfed8b7e3c3f49b1ad19 (diff)
make test: refactor vcl test cases
- Reduce replicated code in test cases - Configure separate namespace secrets for thru hoststack test case to validate namespace secret functionality. - Pass per-instance environment variables to Worker class init function. Change-Id: I3cd5d4538f105cbfb09671c4d761541b40714b8f Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'test/framework.py')
-rw-r--r--test/framework.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/framework.py b/test/framework.py
index c303bf9df71..78aebf61e83 100644
--- a/test/framework.py
+++ b/test/framework.py
@@ -11,6 +11,7 @@ import time
import resource
import faulthandler
import random
+import copy
from collections import deque
from threading import Thread, Event
from inspect import getdoc, isclass
@@ -1126,11 +1127,11 @@ class VppTestRunner(unittest.TextTestRunner):
class Worker(Thread):
- def __init__(self, args, logger):
+ def __init__(self, args, logger, env={}):
self.logger = logger
self.args = args
self.result = None
- self.env = {}
+ self.env = copy.deepcopy(env)
super(Worker, self).__init__()
def run(self):