Skip to content

Commit 22c6a81

Browse files
authored
Merge pull request #4578 from dmbaturin/T7578-enforce-op-mode-path-uniqueness
build: T7578: fail the package build if there are non-unique op mode nodes
2 parents 062f7f4 + 8f2eac3 commit 22c6a81

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ op_mode_definitions: $(op_xml_obj)
6969

7070
find $(BUILD_DIR)/op-mode-definitions/ -type f -name "*.xml" | xargs -I {} $(CURDIR)/scripts/build-command-op-templates {} $(CURDIR)/schema/op-mode-definition.rng $(OP_TMPL_DIR) || exit 1
7171

72-
$(CURDIR)/python/vyos/xml_ref/generate_op_cache.py --xml-dir $(BUILD_DIR)/op-mode-definitions || exit 1
72+
$(CURDIR)/python/vyos/xml_ref/generate_op_cache.py --check-path-ambiguity --xml-dir $(BUILD_DIR)/op-mode-definitions || exit 1
7373

7474
# XXX: tcpdump, ping, traceroute and mtr must be able to recursivly call themselves as the
7575
# options are provided from the scripts themselves

python/vyos/xml_ref/generate_op_cache.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ def main():
280280
else:
281281
print('Found the following duplicate paths:\n')
282282
print(out)
283+
sys.exit(1)
283284

284285
with open(op_ref_cache, 'w') as f:
285286
f.write('from vyos.xml_ref.op_definition import NodeData\n')

0 commit comments

Comments
 (0)