From d0ce9d1dd563e6ec5c84743ced1b07ff0b3b9cb5 Mon Sep 17 00:00:00 2001 From: Andres Noetzli Date: Mon, 26 Mar 2018 12:59:58 -0700 Subject: [PATCH] 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. --- test/regress/Makefile.levels | 13 ++++++++----- 1 file 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' ' ') -- 2.30.2