summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOle Troan <otroan@cisco.com>2022-12-01 11:22:06 +0100
committerAndrew Yourtchenko <ayourtch@gmail.com>2022-12-07 10:33:20 +0000
commit37157dad514b85d008cf8e01a889889d8869f02b (patch)
treedfdbb28255c4e6d73a7a84333fb5ccb2fde47f5f /src
parentd7413835e1478b0c1356bae7d45e00061d7eb8d4 (diff)
tests: multiple apidir locations
To support testing of external plugins, add support to the test framework and PAPI for specifying a list of locations to look for api.json files. Type: improvement Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I128a306e3c091dc8ef994801b1470b82d2f4595d Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vpp-api/python/vpp_papi/vpp_papi.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/vpp-api/python/vpp_papi/vpp_papi.py b/src/vpp-api/python/vpp_papi/vpp_papi.py
index 6755e227ed1..34d57232865 100644
--- a/src/vpp-api/python/vpp_papi/vpp_papi.py
+++ b/src/vpp-api/python/vpp_papi/vpp_papi.py
@@ -449,7 +449,12 @@ class VPPApiClient:
if not apifiles:
# Pick up API definitions from default directory
try:
- apifiles = VPPApiJSONFiles.find_api_files(self.apidir)
+ if isinstance(self.apidir, list):
+ apifiles = []
+ for d in self.apidir:
+ apifiles += VPPApiJSONFiles.find_api_files(d)
+ else:
+ apifiles = VPPApiJSONFiles.find_api_files(self.apidir)
except (RuntimeError, VPPApiError):
# In test mode we don't care that we can't find the API files
if testmode: