make: Add way to run individual tests
authorKim Alvefur <zash@zash.se>
Fri, 02 Oct 2020 16:35:05 +0200
changeset 11125 2d38242a08dd
parent 11124 b2331f3dfeea
child 11126 d60094d9b458
make: Add way to run individual tests
GNUmakefile
--- 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