Changeset

11121:2d38242a08dd

make: Add way to run individual tests
author Kim Alvefur <zash@zash.se>
date Fri, 02 Oct 2020 16:35:05 +0200
parents 11120:b2331f3dfeea
children 11122:d60094d9b458
files GNUmakefile
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/GNUmakefile	Wed Sep 30 09:50:33 2020 +0100
+++ b/GNUmakefile	Fri Oct 02 16:35:05 2020 +0200
@@ -75,6 +75,9 @@
 test:
 	$(BUSTED) --lua=$(RUNWITH)
 
+test-%:
+	$(BUSTED) --lua=$(RUNWITH) -r $*
+
 integration-test: all
 	$(MKDIR) data
 	$(RUNWITH) prosodyctl --config ./spec/scansion/prosody.cfg.lua start
@@ -82,6 +85,13 @@
 	$(RUNWITH) prosodyctl --config ./spec/scansion/prosody.cfg.lua stop \
 	exit $$R
 
+integration-test-%: all
+	$(MKDIR) data
+	$(RUNWITH) prosodyctl --config ./spec/scansion/prosody.cfg.lua start
+	$(SCANSION) ./spec/scansion/$*.scs; R=$$? \
+	$(RUNWITH) prosodyctl --config ./spec/scansion/prosody.cfg.lua stop \
+	exit $$R
+
 coverage:
 	-rm -- luacov.*
 	$(BUSTED) --lua=$(RUNWITH) -c