session: API cleanup
[vpp.git] / src / vcl / test / test_vcl.py
index 804e745..d9346ba 100644 (file)
@@ -26,7 +26,11 @@ _have_iperf3 = have_app(iperf3)
 class VCLAppWorker(Worker):
     """ VCL Test Application Worker """
 
-    def __init__(self, build_dir, appname, args, logger, env={}):
+    def __init__(self, build_dir, appname, executable_args, logger, env=None,
+                 *args, **kwargs):
+
+        if env is None:
+            env = {}
         vcl_lib_dir = "%s/vpp/lib" % build_dir
         if "iperf" in appname:
             app = appname
@@ -38,8 +42,9 @@ class VCLAppWorker(Worker):
                         "%s/libvcl_ldpreload.so" % vcl_lib_dir})
         else:
             app = "%s/vpp/bin/%s" % (build_dir, appname)
-        self.args = [app] + args
-        super(VCLAppWorker, self).__init__(self.args, logger, env)
+        self.args = [app] + executable_args
+        super(VCLAppWorker, self).__init__(self.args, logger, env,
+                                           *args, **kwargs)
 
 
 class VCLTestCase(VppTestCase):
@@ -115,9 +120,9 @@ class VCLTestCase(VppTestCase):
             table_id += 1
 
         # Configure namespaces
-        self.vapi.app_namespace_add_del(namespace_id=b"1", secret=1234,
+        self.vapi.app_namespace_add_del(namespace_id="1", secret=1234,
                                         sw_if_index=self.loop0.sw_if_index)
-        self.vapi.app_namespace_add_del(namespace_id=b"2", secret=5678,
+        self.vapi.app_namespace_add_del(namespace_id="2", secret=5678,
                                         sw_if_index=self.loop1.sw_if_index)
 
         # Add inter-table routes
@@ -156,9 +161,9 @@ class VCLTestCase(VppTestCase):
             table_id += 1
 
         # Configure namespaces
-        self.vapi.app_namespace_add_del(namespace_id=b"1", secret=1234,
+        self.vapi.app_namespace_add_del(namespace_id="1", secret=1234,
                                         sw_if_index=self.loop0.sw_if_index)
-        self.vapi.app_namespace_add_del(namespace_id=b"2", secret=5678,
+        self.vapi.app_namespace_add_del(namespace_id="2", secret=5678,
                                         sw_if_index=self.loop1.sw_if_index)
 
         # Add inter-table routes