diff --git a/docker/main/Dockerfile.fcgi b/docker/main/Dockerfile.fcgi index 7e227a94..27f231cc 100644 --- a/docker/main/Dockerfile.fcgi +++ b/docker/main/Dockerfile.fcgi @@ -41,9 +41,12 @@ RUN apk add --update git make build-base gcc flex bison fcgi-dev curl-dev # For netsnmp RUN apk add --update net-snmp net-snmp-dev -# Checkut standard YANG models for tests (note >1G for full repo) -WORKDIR /usr/local/share +# Checkut models +WORKDIR /usr/local/share/ + +# Checkout standard YANG models for tests (note >1G for full repo) RUN mkdir yang + WORKDIR /usr/local/share/yang RUN git config --global init.defaultBranch master @@ -55,6 +58,12 @@ RUN echo "experimental/" >> .git/info/sparse-checkout RUN git pull origin main +RUN mkdir /usr/local/share/openconfig +WORKDIR /usr/local/share/openconfig + +# Checkut Openconfig models for tests +RUN git clone https://github.com/openconfig/public + # Create a directory to hold source-code, dependencies etc RUN mkdir /clixon RUN mkdir /clixon/build @@ -102,6 +111,9 @@ RUN install *.sh /clixon/build/bin/test RUN install *.exp /clixon/build/bin/test RUN install clixon.png /clixon/build/bin/test +RUN install -d /clixon/build/mibs +RUN install mibs/* /clixon/build/mibs + # Copy startscript WORKDIR /clixon COPY startsystem_fcgi.sh startsystem.sh @@ -148,6 +160,7 @@ RUN adduser www-data clicon COPY --from=0 /clixon/build/ /usr/local/ COPY --from=0 /usr/local/share/yang/* /usr/local/share/yang/standard/ COPY --from=0 /usr/local/share/mib-yangs/* /usr/local/share/mib-yangs/ +COPY --from=0 /clixon/build/mibs/* /usr/share/snmp/mibs/ # Manually created RUN mkdir /www-data diff --git a/docker/main/Dockerfile.native b/docker/main/Dockerfile.native index 280f260e..e1cf1585 100644 --- a/docker/main/Dockerfile.native +++ b/docker/main/Dockerfile.native @@ -69,7 +69,6 @@ RUN git clone https://github.com/openconfig/public # Create a directory to hold source-code, dependencies etc RUN mkdir /clixon - RUN mkdir /clixon/build WORKDIR /clixon @@ -107,7 +106,7 @@ RUN make RUN make install RUN install example.xml /clixon/build/etc/clixon.xml -# Copy tests (why not everything?) +# Copy tests WORKDIR /clixon/clixon/test RUN install -d /clixon/build/bin/test RUN install *.sh /clixon/build/bin/test diff --git a/docker/main/startsystem_fcgi.sh b/docker/main/startsystem_fcgi.sh index 36ee01f1..e58d6f48 100755 --- a/docker/main/startsystem_fcgi.sh +++ b/docker/main/startsystem_fcgi.sh @@ -44,7 +44,8 @@ set -ux # e but clixon_backend may fail if test is run in parallell >&2 echo "$0" -DBG=${DBG:-0} +# If set, enable debugging (of backend and restconf daemons) +: ${DBG:=0} # Initiate clixon configuration (env variable) echo "$CONFIG" > /usr/local/etc/clixon.xml diff --git a/test/vagrant/vagrant.sh b/test/vagrant/vagrant.sh index d5967d5c..3f5c5f53 100755 --- a/test/vagrant/vagrant.sh +++ b/test/vagrant/vagrant.sh @@ -308,7 +308,7 @@ $sshcmd sudo ./yangmodels.sh # Run tests $sshcmd "(cd src/cligen/test; ./sum.sh)" -$sshcmd "(cd src/clixon/test; ./sum.sh)" +$sshcmd "(cd src/clixon/test; detail=true ./sum.sh)" # destroy vm #if $destroy; then