diff --git a/docker/main/Dockerfile.native b/docker/main/Dockerfile.native index 6d091743..c5af4f5e 100644 --- a/docker/main/Dockerfile.native +++ b/docker/main/Dockerfile.native @@ -47,7 +47,7 @@ RUN apk add --update nghttp2 # Checkut models WORKDIR /usr/local/share/ -# Checkut standard YANG models for tests (note >1G for full repo) +# Checkout standard YANG models for tests (note >1G for full repo) RUN mkdir yang; cd yang; git init; git remote add -f origin https://github.com/YangModels/yang; git config core.sparseCheckout true; echo "standard/" >> .git/info/sparse-checkout; echo "experimental/" >> .git/info/sparse-checkout WORKDIR /usr/local/share/yang diff --git a/example/main/README.md b/example/main/README.md index 71186626..e1c51c40 100644 --- a/example/main/README.md +++ b/example/main/README.md @@ -40,7 +40,6 @@ See [yang/clixon-config@.yang](https://github.com/clicon/clixon/blob/maste ## Compile and run Before you start, -* You must configure with: `--enable-optyangs` to install all yang files required for the example. This is not necessary for the base colixon system * Setup clicon [groups](https://github.com/clicon/clixon/blob/master/doc/FAQ.md#do-i-need-to-setup-anything) ``` diff --git a/test/test_openconfig.sh b/test/test_openconfig.sh index 749c7a46..582e5f5f 100755 --- a/test/test_openconfig.sh +++ b/test/test_openconfig.sh @@ -30,6 +30,7 @@ cat < $cfg /usr/local/share/clixon $OPENCONFIG $IETFRFC + true /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli $APPNAME diff --git a/test/vagrant/clixon.sh b/test/vagrant/clixon.sh index f94dd9d9..e5453643 100755 --- a/test/vagrant/clixon.sh +++ b/test/vagrant/clixon.sh @@ -82,3 +82,5 @@ echo "IPv6=true" >> ./site.sh if [ $release = "freebsd" ]; then echo "make=gmake" >> ./site.sh fi +echo "OPENCONFIG=/usr/local/share/openconfig/public" >> ./site.sh +echo "YANGMODELS=/usr/local/share/yang" >> ./site.sh diff --git a/test/vagrant/vagrant.sh b/test/vagrant/vagrant.sh index 4c80d5ef..d8ebbe97 100755 --- a/test/vagrant/vagrant.sh +++ b/test/vagrant/vagrant.sh @@ -285,6 +285,27 @@ esac $scpcmd ./clixon.sh vagrant@127.0.0.1: $sshcmd ./clixon.sh $release $wwwuser ${with_restconf} +# Tests require yangmodels and openconfig +cat< $dir/yangmodels.sh +cd /usr/local/share +mkdir yang +cd yang +git init +git remote add -f origin https://github.com/YangModels/yang +git config core.sparseCheckout true +echo "standard/" >> .git/info/sparse-checkout +echo "experimental/" >> .git/info/sparse-checkout +git pull origin master +mkdir /usr/local/share/openconfig +cd /usr/local/share/openconfig +git clone https://github.com/openconfig/public +# Patch yang syntax errors +sed -i s/=\ olt\'/=\ \'olt\'/g /usr/local/share/yang/standard/ieee/published/802.3/ieee802-ethernet-pon.yang +EOF +chmod 755 $dir/yangmodels.sh +$scpcmd $dir/yangmodels.sh vagrant@127.0.0.1: +$sshcmd sudo ./yangmodels.sh + # Run tests $sshcmd "(cd src/cligen/test; ./sum.sh)" $sshcmd "(cd src/clixon/test; ./sum.sh)" diff --git a/yang/Makefile.in b/yang/Makefile.in index 318c8e0f..af054af9 100644 --- a/yang/Makefile.in +++ b/yang/Makefile.in @@ -38,14 +38,9 @@ prefix = @prefix@ bindir = @bindir@ includedir = @includedir@ datarootdir = @datarootdir@ -enable_optyangs = @enable_optyangs@ SUBDIRS = clixon SUBDIRS += mandatory -# See configure.ac -ifeq ($(enable_optyangs),yes) -SUBDIRS += optional -endif .PHONY: all clean depend install $(SUBDIRS)