From: Andres Noetzli Date: Mon, 26 Mar 2018 19:59:58 +0000 (-0700) Subject: Add support for filtering regressions with regex (#1711) X-Git-Tag: cvc5-1.0.0~5205 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d0ce9d1dd563e6ec5c84743ced1b07ff0b3b9cb5;p=cvc5.git 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. --- 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' ' ')