Skip to content

Commit

Permalink
Merge pull request #20 from cgasparini/makefile
Browse files Browse the repository at this point in the history
Fix make clean logs
  • Loading branch information
jozef-slezak committed Oct 12, 2017
2 parents a872045 + 88ea390 commit 728ef81
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Makefile
Expand Up @@ -82,7 +82,8 @@ clean:
@echo "# cleaning"
@rm -f examples/gobgp_watch_plugin/gobgp_watch_plugin
@rm -f docker/gobgp_route_reflector/gobgp-client-in-host/gobgp-client-in-host
@rm -f docker/gobgp_route_reflector/gobgp-client-in-host/log
@rm -f docker/gobgp_route_reflector/usage_scripts/gobgp-client-in-host/log
@rm -f log
@echo "# done"

#run all
Expand Down
9 changes: 8 additions & 1 deletion docker/gobgp_route_reflector/usage_scripts/addPath.sh
@@ -1,4 +1,11 @@
#!/usr/bin/env bash

PREFIX="101.0.0.0/24"
NEXTHOP="101.0.10.1"
## Advertize path
docker exec -i gobgp-for-rr bash <<< "gobgp global rib add -a ipv4 101.0.0.0/24 nexthop 101.0.10.1"
echo "##### prefix "$PREFIX
echo "##### nexthop "$NEXTHOP

(
echo "gobgp global rib add -a ipv4 "$PREFIX" nexthop "$NEXTHOP
) | docker exec -i gobgp-for-rr bash
6 changes: 5 additions & 1 deletion scripts/run_gobgp_watcher_examples.sh
Expand Up @@ -33,7 +33,11 @@ echo "#### running go example (gobgp plugin,example plugin)"
expected=("Agent received path &{65001 101.0.0.0/24 101.0.10.1}
")

testOutput ./examples/gobgp_watch_plugin/gobgp_watch_plugin "${expected}"
./examples/gobgp_watch_plugin/gobgp_watch_plugin &> log &
sleep 20
echo "$(less log)"
echo "#### validating Go example output"
testOutput "$(less log)" "${expected}"
echo "done"

echo ""
Expand Down
4 changes: 0 additions & 4 deletions scripts/testOuput.sh
Expand Up @@ -23,10 +23,6 @@ IFS="${PREV_IFS}"
sleep 2
IFS="
"
echo "Output of $1:"
cat ${TMP_FILE}
echo ""
echo "Checking output of $1"
rv=0
# loop through expected lines
for i in $2
Expand Down

0 comments on commit 728ef81

Please sign in to comment.