Skip to content

Commit

Permalink
Merge branch 'make-filter-test' into 'v92-bugfix'
Browse files Browse the repository at this point in the history
Add filter parameter to tests Makefile

See merge request integer/scip!3563
  • Loading branch information
svigerske committed Nov 4, 2024
2 parents 7569b95 + 9498a5a commit 13eb65d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,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
-------------

Expand Down
4 changes: 2 additions & 2 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
6 changes: 5 additions & 1 deletion tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 13eb65d

Please sign in to comment.