X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetlab%2Fexp-tool%2FMakefile;h=d62a4c5c8c7f50f25d09fa7e49597cfc3906b375;hb=591cb419cf3694e0ae66a95973e73c61bad9e03d;hp=0aebdaab57c3c338b08f8431a716fe719f1fd82f;hpb=3444fdfb453d3593914cf1e18f9ac2f8b036e986;p=sliver-openvswitch.git diff --git a/planetlab/exp-tool/Makefile b/planetlab/exp-tool/Makefile index 0aebdaab5..d62a4c5c8 100644 --- a/planetlab/exp-tool/Makefile +++ b/planetlab/exp-tool/Makefile @@ -172,8 +172,8 @@ cache/status.%: FORCE @$(SSH) $(HOST_$*) $(SUDO) sliver-ovs status ||: cache/host.%: - @echo "IP lookup for $(call display,$*)" - @host $(HOST_$*) | sed -n 's/^.*has address *//p' > $@ + @echo "IP lookup for $(call display,$*) - logs in $(call log,$@)" + @host $(HOST_$*) | sed -n 's/^.*has address *//p' > $@ 2> $(call log,$@) cache/db.%: @echo "Starting db server on $(call display,$*) - logs in $(call log,$@)" @@ -395,6 +395,21 @@ cache/endpoint.%: cache/host.$$(call rget,%) cache/port.$$(call opp,%) cache/ifa $$(cat cache/port.$(call opp,$(*F))) 2> $(call log,$@) @touch $@ + +###################### +# testing +###################### + +test: $(foreach l,$(LINKS),test-$(l)) + +test-%: ping-% ping-$$(call get,$$*@2)$(SEP)$$(call get,$$*@1) + @true + +ping-%: FORCE + @echo "Testing connectivity $(call get,$*@1) ===> $(call get,$*@2) - logs in $(call log,$@)" + @$(SSH) $(call solve,$(call get,$*@1)) ping -c 1 $(call solve_ip_addr,$(call get,$*@2)) > $(call log,$@) 2>&1 + @echo "Connectivity $(call get,$*@1) ===> $(call get,$*@2) OK" + #################### CLEANTARGETS=$(addprefix del-,$(notdir $(wildcard cache/bridge.*))) clean: $(CLEANTARGETS) @@ -578,6 +593,9 @@ $(foreach host,$(EXTERNAL_HOSTS),del-bridge.$(host)): del-bridge.%: | cache/db.% L/$*$(SEP)* L/*$(SEP)$* \ cache/controller.$* +$(foreach link,$(EXTERNAL_LINKS),ping-$(call get,$(link)@2)$(SEP)$(call get,$(link)@1)): ping-%: FORCE + @echo "Test from external host $(call get,$*@1) to $(call get,$*@2) skipped" + # we assume that a program called tunproxy is available on the # external nodes. $(foreach link,$(EXTERNAL_LINKS),cache/endpoint.$(link)@2): cache/endpoint.%@2: cache/port.%@1 cache/host.$$(call leftnode,%)