|
@@ -8,6 +8,12 @@ RELX_TARGETS = $(addprefix relx-,$(RELX_CASES))
|
|
|
|
|
|
.PHONY: relx $(RELX_TARGETS)
|
|
|
|
|
|
+ifeq ($(PLATFORM),msys2)
|
|
|
+RELX_REL_EXT = .cmd
|
|
|
+else
|
|
|
+RELX_REL_EXT =
|
|
|
+endif
|
|
|
+
|
|
|
relx: $(RELX_TARGETS)
|
|
|
|
|
|
relx-rel: build clean
|
|
@@ -104,22 +110,14 @@ endif
|
|
|
|
|
|
$i "Start initial release and confirm it runs the old code"
|
|
|
ifeq ($(PLATFORM),msys2)
|
|
|
- $t $(APP)/tmp/bin/$(APP)_release.cmd install $v
|
|
|
- $t $(APP)/tmp/bin/$(APP)_release.cmd start $v
|
|
|
- $t sleep 1
|
|
|
- $t test `$(APP)/tmp/bin/$(APP)_release.cmd rpcterms test test` = old
|
|
|
-else
|
|
|
- $t $(APP)/tmp/bin/$(APP)_release start $v
|
|
|
- $t sleep 1
|
|
|
- $t test `$(APP)/tmp/bin/$(APP)_release rpcterms test test` = old
|
|
|
+ $t $(APP)/tmp/bin/$(APP)_release$(RELX_REL_EXT) install $v
|
|
|
endif
|
|
|
+ $t $(APP)/tmp/bin/$(APP)_release$(RELX_REL_EXT) start $v
|
|
|
+ $t sleep 1
|
|
|
+ $t test `$(APP)/tmp/bin/$(APP)_release$(RELX_REL_EXT) rpcterms test test` = old
|
|
|
|
|
|
- $i "Check that it's 1 avalible version"
|
|
|
-ifeq ($(PLATFORM),msys2)
|
|
|
- $t test `$(APP)/tmp/bin/$(APP)_release.cmd versions |wc -l` = "2"
|
|
|
-else
|
|
|
- $t test `$(APP)/tmp/bin/$(APP)_release versions |wc -l` = "2"
|
|
|
-endif
|
|
|
+ $i "Check that it's 1 available version"
|
|
|
+ $t test `$(APP)/tmp/bin/$(APP)_release$(RELX_REL_EXT) versions | wc -l` = "2"
|
|
|
|
|
|
$i "Copy the relup tarball to the release directory"
|
|
|
$t mkdir $(APP)/tmp/releases/2
|
|
@@ -127,45 +125,24 @@ endif
|
|
|
$t test -f $(APP)/tmp/releases/2/$(APP)_release.tar.gz
|
|
|
|
|
|
$i "Upgrade the release and confirm it runs the new code"
|
|
|
-ifeq ($(PLATFORM),msys2)
|
|
|
- $t $(APP)/tmp/bin/$(APP)_release.cmd upgrade "2"
|
|
|
+ $t $(APP)/tmp/bin/$(APP)_release$(RELX_REL_EXT) upgrade "2"
|
|
|
$t sleep 1
|
|
|
- $t test `$(APP)/tmp/bin/$(APP)_release.cmd rpcterms test test` = new
|
|
|
-else
|
|
|
- $i "Upgrade running release"
|
|
|
- $t $(APP)/tmp/bin/$(APP)_release upgrade "2"
|
|
|
- $t sleep 1
|
|
|
- $t test `$(APP)/tmp/bin/$(APP)_release rpcterms test test` = new
|
|
|
-endif
|
|
|
+ $t test `$(APP)/tmp/bin/$(APP)_release$(RELX_REL_EXT) rpcterms test test` = new
|
|
|
|
|
|
- $i "Check that it's 2 avalible versions"
|
|
|
-ifeq ($(PLATFORM),msys2)
|
|
|
- $t test `$(APP)/tmp/bin/$(APP)_release.cmd versions |wc -l` = "3"
|
|
|
-else
|
|
|
- $t test `$(APP)/tmp/bin/$(APP)_release versions |wc -l` = "3"
|
|
|
-endif
|
|
|
+ $i "Check that it's 2 available versions"
|
|
|
+ $t test `$(APP)/tmp/bin/$(APP)_release$(RELX_REL_EXT) versions | wc -l` = "3"
|
|
|
|
|
|
$i "Downgrade the release and confirm it runs the old code"
|
|
|
-ifeq ($(PLATFORM),msys2)
|
|
|
- $t $(APP)/tmp/bin/$(APP)_release.cmd downgrade "1"
|
|
|
- $t sleep 1
|
|
|
- $t test `$(APP)/tmp/bin/$(APP)_release.cmd rpcterms test test` = old
|
|
|
-else
|
|
|
- $i "Downgrade running release"
|
|
|
- $t $(APP)/tmp/bin/$(APP)_release downgrade "1"
|
|
|
+ $t $(APP)/tmp/bin/$(APP)_release$(RELX_REL_EXT) downgrade "1"
|
|
|
$t sleep 1
|
|
|
- $t test `$(APP)/tmp/bin/$(APP)_release rpcterms test test` = old
|
|
|
-endif
|
|
|
+ $t test `$(APP)/tmp/bin/$(APP)_release$(RELX_REL_EXT) rpcterms test test` = old
|
|
|
|
|
|
$i "Stop the release"
|
|
|
+ $t $(APP)/_rel/$(APP)_release/bin/$(APP)_release$(RELX_REL_EXT) stop $v
|
|
|
ifeq ($(PLATFORM),msys2)
|
|
|
- $t $(APP)/_rel/$(APP)_release/bin/$(APP)_release.cmd stop $v
|
|
|
- $t $(APP)/_rel/$(APP)_release/bin/$(APP)_release.cmd uninstall $v
|
|
|
-else
|
|
|
- $t $(APP)/_rel/$(APP)_release/bin/$(APP)_release stop $v
|
|
|
+ $t $(APP)/_rel/$(APP)_release/bin/$(APP)_release$(RELX_REL_EXT) uninstall $v
|
|
|
endif
|
|
|
|
|
|
-
|
|
|
relx-start-stop: build clean
|
|
|
|
|
|
$i "Bootstrap a new release named $(APP)"
|
|
@@ -176,35 +153,24 @@ relx-start-stop: build clean
|
|
|
$i "Build the release"
|
|
|
$t $(MAKE) -C $(APP) $v
|
|
|
|
|
|
+ $i "Start the release"
|
|
|
ifeq ($(PLATFORM),msys2)
|
|
|
- $i "Install and start the release"
|
|
|
$t $(APP)/_rel/$(APP)_release/bin/$(APP)_release.cmd install $v
|
|
|
- $t $(APP)/_rel/$(APP)_release/bin/$(APP)_release.cmd start $v
|
|
|
- $t sleep 1
|
|
|
-
|
|
|
- $i "Ping the release"
|
|
|
- $t $(APP)/_rel/$(APP)_release/bin/$(APP)_release.cmd ping $v
|
|
|
-
|
|
|
- $i "Stop and uninstall the release"
|
|
|
- $t $(APP)/_rel/$(APP)_release/bin/$(APP)_release.cmd stop $v
|
|
|
- $t $(APP)/_rel/$(APP)_release/bin/$(APP)_release.cmd uninstall $v
|
|
|
-
|
|
|
- $i "Check that further pings get no replies"
|
|
|
- $t ! $(APP)/_rel/$(APP)_release/bin/$(APP)_release.cmd ping $v
|
|
|
-else
|
|
|
- $i "Start the release"
|
|
|
- $t $(APP)/_rel/$(APP)_release/bin/$(APP)_release start $v
|
|
|
+endif
|
|
|
+ $t $(APP)/_rel/$(APP)_release/bin/$(APP)_release$(RELX_REL_EXT) start $v
|
|
|
$t sleep 1
|
|
|
|
|
|
$i "Ping the release"
|
|
|
- $t $(APP)/_rel/$(APP)_release/bin/$(APP)_release ping $v
|
|
|
+ $t $(APP)/_rel/$(APP)_release/bin/$(APP)_release$(RELX_REL_EXT) ping $v
|
|
|
|
|
|
$i "Stop the release"
|
|
|
- $t $(APP)/_rel/$(APP)_release/bin/$(APP)_release stop $v
|
|
|
+ $t $(APP)/_rel/$(APP)_release/bin/$(APP)_release$(RELX_REL_EXT) stop $v
|
|
|
+ifeq ($(PLATFORM),msys2)
|
|
|
+ $t $(APP)/_rel/$(APP)_release/bin/$(APP)_release.cmd uninstall $v
|
|
|
+endif
|
|
|
|
|
|
$i "Check that further pings get no replies"
|
|
|
- $t ! $(APP)/_rel/$(APP)_release/bin/$(APP)_release ping $v
|
|
|
-endif
|
|
|
+ $t ! $(APP)/_rel/$(APP)_release/bin/$(APP)_release$(RELX_REL_EXT) ping $v
|
|
|
|
|
|
relx-tar: build clean
|
|
|
|