aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorKrister Svanlund <[email protected]>2017-02-15 12:47:24 +0100
committerLoïc Hoguin <[email protected]>2017-04-25 18:32:20 +0200
commit6ddfc12cb359ee34146d94736a4df9872c66cc3e (patch)
tree13cc698ae2951274c7d5067c52b8be679511301d /test
parent5a2ca3b0c0212a12e9d546187a96c9dc84103b3c (diff)
downloaderlang.mk-6ddfc12cb359ee34146d94736a4df9872c66cc3e.tar.gz
erlang.mk-6ddfc12cb359ee34146d94736a4df9872c66cc3e.tar.bz2
erlang.mk-6ddfc12cb359ee34146d94736a4df9872c66cc3e.zip
Fix of handling relx.config release version
Diffstat (limited to 'test')
-rw-r--r--test/plugin_relx.mk19
1 files changed, 18 insertions, 1 deletions
diff --git a/test/plugin_relx.mk b/test/plugin_relx.mk
index f2d7f07..ad29669 100644
--- a/test/plugin_relx.mk
+++ b/test/plugin_relx.mk
@@ -3,7 +3,7 @@
# Sleeps when interacting with relx script are necessary after start and upgrade
# as both of those interactions are not synchronized.
-RELX_CASES = rel relup start-stop tar
+RELX_CASES = rel relup start-stop tar vsn
RELX_TARGETS = $(addprefix relx-,$(RELX_CASES))
.PHONY: relx $(RELX_TARGETS)
@@ -195,3 +195,20 @@ relx-tar: build clean
$i "Check that tarball exists"
$t test -f $(APP)/_rel/$(APP)_release/$(APP)_release-1.tar.gz
+
+relx-vsn: build clean
+
+ $i "Bootstrap a new release named $(APP)"
+ $t mkdir $(APP)/
+ $t cp ../erlang.mk $(APP)/
+ $t $(MAKE) -C $(APP) -f erlang.mk bootstrap bootstrap-rel $v
+
+ $i "Replace the vsn"
+ $t sed -i.bak s/"\"1\""/"{cmd, \"echo -n 2\"}"/ $(APP)/relx.config
+
+ $i "Build the release"
+ $t $(MAKE) -C $(APP) $v
+
+ $i "Check that the correct release exists"
+ $t ! test -d $(APP)/_rel/$(APP)_release/releases/1
+ $t test -d $(APP)/_rel/$(APP)_release/releases/2