test/vagrant fixes

This commit is contained in:
Olof Hagsand 2020-12-03 14:23:59 +00:00
parent d045e8abce
commit 99c570e278
3 changed files with 7 additions and 5 deletions

View file

@ -49,6 +49,8 @@ else
DOCKERFILE = Dockerfile DOCKERFILE = Dockerfile
endif endif
#DOCKERFLAGS="--no-cache"
# Example docker image. CHANGE THIS IF YOU PUSH # Example docker image. CHANGE THIS IF YOU PUSH
IMG = clixon/clixon-system IMG = clixon/clixon-system
@ -70,7 +72,7 @@ distclean: clean
rm -f Makefile *~ .depend rm -f Makefile *~ .depend
docker: clixon $(DOCKERFILE) docker: clixon $(DOCKERFILE)
sudo docker build -f $(DOCKERFILE) -t $(IMG) . # --no-cache sudo docker build -f $(DOCKERFILE) -t $(IMG) $(DOCKERFLAGS) .
push: push:
sudo docker push $(IMG) sudo docker push $(IMG)

View file

@ -291,10 +291,10 @@ wait_backend(){
reply=$(echo '<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101"><ping xmlns="http://clicon.org/lib"/></rpc>]]>]]>' | $clixon_netconf -qef $cfg 2> /dev/null) reply=$(echo '<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101"><ping xmlns="http://clicon.org/lib"/></rpc>]]>]]>' | $clixon_netconf -qef $cfg 2> /dev/null)
let i=0; let i=0;
while [[ $reply != "<rpc-reply"* ]]; do while [[ $reply != "<rpc-reply"* ]]; do
echo "sleep $DEMSLEEP" # echo "sleep $DEMSLEEP"
sleep $DEMSLEEP sleep $DEMSLEEP
reply=$(echo '<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101" xmlns="http://clicon.org/lib"><ping/></rpc>]]>]]>' | clixon_netconf -qef $cfg 2> /dev/null) reply=$(echo '<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101" xmlns="http://clicon.org/lib"><ping/></rpc>]]>]]>' | clixon_netconf -qef $cfg 2> /dev/null)
echo "reply:$reply" # echo "reply:$reply"
let i++; let i++;
# echo "wait_backend $i" # echo "wait_backend $i"
if [ $i -ge $DEMLOOP ]; then if [ $i -ge $DEMLOOP ]; then

View file

@ -63,9 +63,9 @@ logs:
# appear eg as generic/centos8.log # appear eg as generic/centos8.log
$(VAGRANTS): logs $(VAGRANTS): logs
ifdef LOGDIR ifdef LOGDIR
with_restconf=$(RESTCONF) ./vagrant.sh $@ 2>&1 > "$(LOGDIR)/$(subst /,-,$@).$(RESTCONF).log" with_restconf=$(RESTCONF) ./vagrant.sh $@ 2>&1 > "$(LOGDIR)/$(subst /,-,$@)-$(RESTCONF).log"
else else
with_restconf=$(RESTCONF) ./vagrant.sh $@ 2>&1 | tee "logs/$(subst /,-,$@).$(RESTCONF).log" with_restconf=$(RESTCONF) ./vagrant.sh $@ 2>&1 | tee "logs/$(subst /,-,$@)-$(RESTCONF).log"
endif endif
destroy: destroy: