aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools/vppapigen
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2020-12-15 10:19:25 +0100
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-12-15 14:03:44 +0000
commit510aaa8911843206f7b9ff48b41e3c7b8c4a99fe (patch)
treeffe4cb3cee6f2e0355800c295ef2297d7dc5aaa6 /src/tools/vppapigen
parent49d601a70f2a6b63e4c04396f06fabae7504e437 (diff)
api: crchcecker ignore version < 1.0.0 and outside of src directory
- For check patchset ignore files outside of src directory - For check patchset ignore files that have version < 1.0.0 - fix Pylint warnings - Modify vppapigen_crc to include version in JSON output Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I93f7bebeeaeedc19b2b1e5e135ea1035517d7f76 Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/tools/vppapigen')
-rw-r--r--src/tools/vppapigen/vppapigen_crc.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tools/vppapigen/vppapigen_crc.py b/src/tools/vppapigen/vppapigen_crc.py
index 6947f12d467..791e347292e 100644
--- a/src/tools/vppapigen/vppapigen_crc.py
+++ b/src/tools/vppapigen/vppapigen_crc.py
@@ -10,9 +10,12 @@ process_imports = True
def run(args, input_filename, s):
j = {}
major = 0
+ minor = 0
+ patch = 0
if 'version' in s['Option']:
v = s['Option']['version']
(major, minor, patch) = v.split('.')
+ j['_version'] = {'major': major, 'minor': minor, 'patch': patch}
for t in s['Define']:
j[t.name] = {'crc': f'{t.crc:#08x}', 'version': major,
'options': t.options}