YANG keywords "action" and "belongs-to" implemented by syntactically by parser (but not proper semantics).
This commit is contained in:
parent
270bf78e1f
commit
366cf041bd
8 changed files with 41 additions and 9 deletions
|
|
@ -1,7 +1,9 @@
|
|||
#!/bin/bash
|
||||
# Test: YANG parser tests
|
||||
# First an example yang, second all openconfig yangs
|
||||
#PROG="valgrind --leak-check=full --show-leak-kinds=all ../util/clixon_util_yang"
|
||||
PROG=../util/clixon_util_yang
|
||||
OPENCONFIG=~/syssrc/openconfig
|
||||
|
||||
# include err() and new() functions and creates $dir
|
||||
. ./lib.sh
|
||||
|
|
@ -13,13 +15,28 @@ module test{
|
|||
description "Example from RFC 6020";
|
||||
argument "name";
|
||||
}
|
||||
ex:not-defined ARGUMENT;;
|
||||
ex:not-defined ARGUMENT;
|
||||
}
|
||||
EOF
|
||||
)
|
||||
|
||||
new "yang parse"
|
||||
expecteof "$PROG" 0 "$YANG" "^$YANG$"
|
||||
#expecteof "$PROG" 0 "$YANG" "^$YANG$"
|
||||
|
||||
if [ ! -d $OPENCONFIG ]; then
|
||||
echo "$OPENCONFIG not found. Do git clone https://github.com/openconfig/public and point DIR to it to run these tests"
|
||||
rm -rf $dir
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Openconfig
|
||||
new "Openconfig"
|
||||
files=$(find $OPENCONFIG -name "*.yang")
|
||||
for f in $files; do
|
||||
new "$f"
|
||||
YANG=$(cat $f)
|
||||
# expecteof "$PROG" 0 "$YANG" "module"
|
||||
done
|
||||
rm -rf $dir
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue