Skip to content

Commit 9498a5a

Browse files
mmghannamsvigerske
authored andcommitted
Add FILTER parameter to tests Makefile
1 parent 7569b95 commit 9498a5a

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

Diff for: CHANGELOG

+5
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ Build system
6767

6868
- attempted to fix detection of CPLEX library on macOS and Windows systems
6969

70+
Testing
71+
-------
72+
73+
- added parameter FILTER for tests/Makefile to run only tests with a specific pattern (ctest with -R FILTER)
74+
7075
Miscellaneous
7176
-------------
7277

Diff for: tests/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ endif
173173
.PHONY: all
174174
all: Criterion $(OBJDIR) $(OBJDIRS) $(BINDIRS) $(UNITTESTSBIN)
175175
make ctestrunner
176-
setarch `uname -m` -R ctest --output-on-failure
176+
setarch `uname -m` -R ctest --output-on-failure $(if $(FILTER), -R $(FILTER))
177177

178178
.PHONY: lint
179179
lint: $(UNITTESTSSRC)
@@ -200,7 +200,7 @@ $(BINDIRS):
200200
.PHONY: test
201201
test: $(UNITTESTSBIN)
202202
make ctestrunner
203-
setarch `uname -m` -R ctest --output-on-failure
203+
setarch `uname -m` -R ctest --output-on-failure $(if $(FILTER), -R $(FILTER))
204204

205205
.PHONY: ctestrunner
206206
ctestrunner: $(UNITTESTSBIN)

Diff for: tests/README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,14 @@ This creates `CTestTestfile.cmake` with a list of the test to run and then calls
8989
make BUGS=true
9090
```
9191

92-
You can also run a single test, e.g. `
92+
You can also run a single test, e.g.
9393
```
9494
>> ./bin/cons/quadratic/gauge.linux.x86_64.gnu.dbg.spx2
9595
```
96+
To run all tests that match a regular expression, use
97+
```
98+
>> make FILTER=gauge
99+
```
96100

97101
Note, that parameterized tests will not work on systems that have address
98102
space layout randomization (ASLR) enabled. One can disable ASLR for a

0 commit comments

Comments
 (0)