summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2019-01-13 10:26:05 -0800
committerOle Trøan <otroan@employees.org>2019-01-14 13:24:38 +0000
commit04575c5e4790d7bc89d65297223c430d80cd4500 (patch)
treee3ae46b16289742efbfda621ee87fb3cf6517f6a /test
parentdd3c5d250f3cf9712e37e47851ca07401e715f13 (diff)
VTL: vpp_papi_provider: Don't shortcircuit vpp_papi jasonfile detection.
The detection login in vpp_papi is significantly more advanced than the implementation in vpp_papi_provider. Let's take full advantage of it and ensure consistent behavior. Change-Id: I786e6d5f4588a0d74e863cce1b0bc1a93fa0e614 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'test')
-rw-r--r--test/vpp_papi_provider.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index 584fe191a1b..1ca9a89a2ea 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -75,14 +75,14 @@ class VppPapiProvider(object):
self.test_class = test_class
self._expect_api_retval = self._zero
self._expect_stack = []
- jsonfiles = []
install_dir = os.getenv('VPP_INSTALL_PATH')
- for root, dirnames, filenames in os.walk(install_dir):
- for filename in fnmatch.filter(filenames, '*.api.json'):
- jsonfiles.append(os.path.join(root, filename))
- self.vpp = VPP(jsonfiles, logger=test_class.logger,
+ # Vapi requires 'VPP_API_DIR', not set when run from Makefile.
+ if 'VPP_API_DIR' not in os.environ:
+ os.environ['VPP_API_DIR'] = os.getenv('VPP_INSTALL_PATH')
+
+ self.vpp = VPP(logger=test_class.logger,
read_timeout=read_timeout)
self._events = deque()