Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v9-minor'
Browse files Browse the repository at this point in the history
  • Loading branch information
scip-ci committed Nov 4, 2024
2 parents 5dd8b87 + 4c87fd6 commit bc28644
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,16 @@ ifeq ($(VERBOSE),false)
.SILENT: $(UNITTESTSBIN) $(UNITTESTSOBJ)
endif

# Disable ASLR (address space layout randomization) on Linux via setarch -R
# as this is not compatible with Criterions parametrized tests (https://github.com/Snaipe/Criterion/issues/208)
ifeq ($(OSTYPE),linux)
DISABLE_ASLR := setarch `uname -m` -R
endif

.PHONY: all
all: Criterion $(OBJDIR) $(OBJDIRS) $(BINDIRS) $(UNITTESTSBIN)
make ctestrunner
setarch `uname -m` -R ctest --output-on-failure $(if $(FILTER), -R $(FILTER))
$(DISABLE_ASLR) ctest --output-on-failure $(if $(FILTER), -R $(FILTER))

.PHONY: lint
lint: $(UNITTESTSSRC)
Expand All @@ -195,12 +200,10 @@ $(BINDIRS):
@echo "-> Creating $@ directory"
@-mkdir -p $@

# run the tests with address space layout randomization disabled, as this isn't
# compatible with Criterions parametrized tests (https://github.com/Snaipe/Criterion/issues/208)
.PHONY: test
test: $(UNITTESTSBIN)
make ctestrunner
setarch `uname -m` -R ctest --output-on-failure $(if $(FILTER), -R $(FILTER))
$(DISABLE_ASLR) --output-on-failure $(if $(FILTER), -R $(FILTER))

.PHONY: ctestrunner
ctestrunner: $(UNITTESTSBIN)
Expand Down

0 comments on commit bc28644

Please sign in to comment.