diff --git a/CHANGELOG b/CHANGELOG index 31af73fa5e..bc9f641715 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -216,6 +216,11 @@ Build system - attempted to fix detection of CPLEX library on macOS and Windows systems +Testing +------- + +- added parameter FILTER for tests/Makefile to run only tests with a specific pattern (ctest with -R FILTER) + Miscellaneous ------------- diff --git a/tests/Makefile b/tests/Makefile index 15c84f3597..f40767ed14 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -173,7 +173,7 @@ endif .PHONY: all all: Criterion $(OBJDIR) $(OBJDIRS) $(BINDIRS) $(UNITTESTSBIN) make ctestrunner - setarch `uname -m` -R ctest --output-on-failure + setarch `uname -m` -R ctest --output-on-failure $(if $(FILTER), -R $(FILTER)) .PHONY: lint lint: $(UNITTESTSSRC) @@ -200,7 +200,7 @@ $(BINDIRS): .PHONY: test test: $(UNITTESTSBIN) make ctestrunner - setarch `uname -m` -R ctest --output-on-failure + setarch `uname -m` -R ctest --output-on-failure $(if $(FILTER), -R $(FILTER)) .PHONY: ctestrunner ctestrunner: $(UNITTESTSBIN) diff --git a/tests/README.md b/tests/README.md index 544799ba71..228d0485b2 100644 --- a/tests/README.md +++ b/tests/README.md @@ -89,10 +89,14 @@ This creates `CTestTestfile.cmake` with a list of the test to run and then calls make BUGS=true ``` -You can also run a single test, e.g. ` +You can also run a single test, e.g. ``` >> ./bin/cons/quadratic/gauge.linux.x86_64.gnu.dbg.spx2 ``` +To run all tests that match a regular expression, use +``` + >> make FILTER=gauge +``` Note, that parameterized tests will not work on systems that have address space layout randomization (ASLR) enabled. One can disable ASLR for a