diff options
author | Loïc Hoguin <[email protected]> | 2019-06-28 12:05:27 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2019-06-28 12:05:27 +0200 |
commit | 5e8c5fa7a0e009b7d73b26937ea23f3b685a3f2f (patch) | |
tree | c460dad3243bc0600b1d8e08e70f9e24be7b660f /test/plugin_relx.mk | |
parent | 80ddc8d5a8a6a60da99fb34fb5f12ce4f36d8d63 (diff) | |
download | erlang.mk-5e8c5fa7a0e009b7d73b26937ea23f3b685a3f2f.tar.gz erlang.mk-5e8c5fa7a0e009b7d73b26937ea23f3b685a3f2f.tar.bz2 erlang.mk-5e8c5fa7a0e009b7d73b26937ea23f3b685a3f2f.zip |
Try to make relx-start-stop more reliable
Using new wait_for_success/wait_for_failure functions that will
loop the ping commands up to 10 times then give up. This allows
us to remove the "sleep 1" and lets us handle intermittent
slowness at the same time.
Diffstat (limited to 'test/plugin_relx.mk')
-rw-r--r-- | test/plugin_relx.mk | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/test/plugin_relx.mk b/test/plugin_relx.mk index c65e672..2771e8f 100644 --- a/test/plugin_relx.mk +++ b/test/plugin_relx.mk @@ -301,28 +301,27 @@ ifeq ($(PLATFORM),msys2) $t $(APP)/_rel/$(APP)_release/bin/$(APP)_release$(RELX_REL_EXT) install endif $t $(APP)/_rel/$(APP)_release/bin/$(APP)_release$(RELX_REL_EXT) start - $t sleep 1 $i "Ping the release" - $t $(APP)/_rel/$(APP)_release/bin/$(APP)_release$(RELX_REL_EXT) ping + $t $(call wait_for_success,$(APP)/_rel/$(APP)_release/bin/$(APP)_release$(RELX_REL_EXT) ping) $i "Stop the release" $t $(APP)/_rel/$(APP)_release/bin/$(APP)_release$(RELX_REL_EXT) stop - $t sleep 1 ifeq ($(PLATFORM),msys2) + $t sleep 1 $t $(APP)/_rel/$(APP)_release/bin/$(APP)_release$(RELX_REL_EXT) uninstall endif - $i "Check that there's no erl_crash.dump file" - $t test ! -f $(APP)/_rel/$(APP)_release/erl_crash.dump - ifneq ($(PLATFORM),msys2) # The script will not return false on Windows when the ping fails. # It sometimes also gets stuck. So we just skip the ping for now. $i "Check that further pings get no replies" - $t ! $(APP)/_rel/$(APP)_release/bin/$(APP)_release$(RELX_REL_EXT) ping + $t $(call wait_for_failure,$(APP)/_rel/$(APP)_release/bin/$(APP)_release$(RELX_REL_EXT) ping) endif + $i "Check that there's no erl_crash.dump file" + $t test ! -f $(APP)/_rel/$(APP)_release/erl_crash.dump + relx-tar: init $i "Bootstrap a new release named $(APP)" |