summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2018-03-26 12:59:58 -0700
committerGitHub <noreply@github.com>2018-03-26 12:59:58 -0700
commitd0ce9d1dd563e6ec5c84743ced1b07ff0b3b9cb5 (patch)
tree6456cb965fe0463ffbba3dc55fada2be8dd01dff /test
parent8b5b4e7c9df5bd9d5959c7c92a5b28c951881d49 (diff)
Add support for filtering regressions with regex (#1711)
This commit adds support for filtering the regression tests using a regex. For example: ``` TEST_REGEX=quantifiers make regress0 ``` Runs regression tests from level 0 that have "quantifiers" in their name.
Diffstat (limited to 'test')
-rw-r--r--test/regress/Makefile.levels13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/regress/Makefile.levels b/test/regress/Makefile.levels
index 9e4d3fa20..0bd958688 100644
--- a/test/regress/Makefile.levels
+++ b/test/regress/Makefile.levels
@@ -2,17 +2,20 @@
# a regression level.
# Regression level 1 is the default
-TESTS = $(REG0_TESTS) $(REG1_TESTS)
+ALL_TESTS = $(REG0_TESTS) $(REG1_TESTS)
ifeq ($(REGRESSION_LEVEL),0)
-TESTS = $(REG0_TESTS)
+ALL_TESTS = $(REG0_TESTS)
endif
ifeq ($(REGRESSION_LEVEL),2)
-TESTS = $(REG0_TESTS) $(REG1_TESTS) $(REG2_TESTS)
+ALL_TESTS = $(REG0_TESTS) $(REG1_TESTS) $(REG2_TESTS)
endif
ifeq ($(REGRESSION_LEVEL),3)
-TESTS = $(REG0_TESTS) $(REG1_TESTS) $(REG2_TESTS) $(REG3_TESTS)
+ALL_TESTS = $(REG0_TESTS) $(REG1_TESTS) $(REG2_TESTS) $(REG3_TESTS)
endif
ifeq ($(REGRESSION_LEVEL),4)
-TESTS = $(REG0_TESTS) $(REG1_TESTS) $(REG2_TESTS) $(REG3_TESTS) $(REG4_TESTS)
+ALL_TESTS = $(REG0_TESTS) $(REG1_TESTS) $(REG2_TESTS) $(REG3_TESTS) $(REG4_TESTS)
endif
+
+TEST_REGEX ?= ".*"
+TESTS = $(shell echo $(ALL_TESTS) | tr ' ' '\n' | grep $(TEST_REGEX) | tr '\n' ' ')
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback