# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1601649305 -7200
# Node ID 2d38242a08ddf198df463cc202e1d20e0874a437
# Parent  b2331f3dfeeaaa9bde252db72730ef680d41dc7f
make: Add way to run individual tests

diff -r b2331f3dfeea -r 2d38242a08dd 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