From 45b1245e12ee56a85bb8fb942f98673902fd706f Mon Sep 17 00:00:00 2001
From: Kim Alvefur <zash@zash.se>
Date: Thu, 10 Jan 2019 14:27:01 +0100
Subject: GNUmakefile: Add target for running scansion

---
 GNUmakefile | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'GNUmakefile')

diff --git a/GNUmakefile b/GNUmakefile
index 6c134679..dd199997 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -21,6 +21,7 @@ MKDIR_PRIVATE=$(MKDIR) -m750
 
 LUACHECK=luacheck
 BUSTED=busted
+SCANSION=scansion
 
 .PHONY: all test coverage clean install
 
@@ -71,6 +72,11 @@ clean:
 test:
 	$(BUSTED) --lua=$(RUNWITH)
 
+integration-test: all
+	$(RUNWITH) prosodyctl --config ./spec/scansion/prosody.cfg.lua start
+	$(SCANSION) -d ./spec/scansion
+	$(RUNWITH) prosodyctl --config ./spec/scansion/prosody.cfg.lua stop
+
 coverage:
 	-rm -- luacov.*
 	$(BUSTED) --lua=$(RUNWITH) -c
-- 
cgit v1.2.3


From df36d51cd7e63834fce8d0d38f3547d873195c95 Mon Sep 17 00:00:00 2001
From: Kim Alvefur <zash@zash.se>
Date: Thu, 24 Jan 2019 05:48:55 +0100
Subject: GNUmakefile: Stop Prosody in case of failure in integration-test

Normally make skips the remaning steps in the rule if one fails. This
collects the status code and re-returns it after stopping the running
Prosody instance.
---
 GNUmakefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'GNUmakefile')

diff --git a/GNUmakefile b/GNUmakefile
index dd199997..977e91c6 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -74,8 +74,9 @@ test:
 
 integration-test: all
 	$(RUNWITH) prosodyctl --config ./spec/scansion/prosody.cfg.lua start
-	$(SCANSION) -d ./spec/scansion
-	$(RUNWITH) prosodyctl --config ./spec/scansion/prosody.cfg.lua stop
+	$(SCANSION) -d ./spec/scansion; R=$$? \
+	$(RUNWITH) prosodyctl --config ./spec/scansion/prosody.cfg.lua stop \
+	exit $$R
 
 coverage:
 	-rm -- luacov.*
-- 
cgit v1.2.3


From b733d61de629dabbc1678781711b3775b7ce17cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= <pep@bouah.net>
Date: Thu, 12 Sep 2019 15:17:12 +0200
Subject: Prepare required data folder for integration tests

---
 GNUmakefile | 1 +
 1 file changed, 1 insertion(+)

(limited to 'GNUmakefile')

diff --git a/GNUmakefile b/GNUmakefile
index 977e91c6..15362f5c 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -73,6 +73,7 @@ test:
 	$(BUSTED) --lua=$(RUNWITH)
 
 integration-test: all
+	$(MKDIR) data
 	$(RUNWITH) prosodyctl --config ./spec/scansion/prosody.cfg.lua start
 	$(SCANSION) -d ./spec/scansion; R=$$? \
 	$(RUNWITH) prosodyctl --config ./spec/scansion/prosody.cfg.lua stop \
-- 
cgit v1.2.3