File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -169,11 +169,16 @@ ifeq ($(VERBOSE),false)
169169.SILENT : $(UNITTESTSBIN ) $(UNITTESTSOBJ )
170170endif
171171
172+ # Disable ASLR (address space layout randomization) on Linux via setarch -R
173+ # as this is not compatible with Criterions parametrized tests (https://github.com/Snaipe/Criterion/issues/208)
174+ ifeq ($(OSTYPE ) ,linux)
175+ DISABLE_ASLR := setarch ` uname -m ` -R
176+ endif
172177
173178.PHONY : all
174179all : Criterion $(OBJDIR ) $(OBJDIRS ) $(BINDIRS ) $(UNITTESTSBIN )
175180 make ctestrunner
176- setarch ` uname -m ` -R ctest --output-on-failure $(if $(FILTER ) , -R $(FILTER ) )
181+ $( DISABLE_ASLR ) ctest --output-on-failure $(if $(FILTER ) , -R $(FILTER ) )
177182
178183.PHONY : lint
179184lint : $(UNITTESTSSRC )
@@ -195,12 +200,10 @@ $(BINDIRS):
195200 @echo " -> Creating $@ directory"
196201 @-mkdir -p $@
197202
198- # run the tests with address space layout randomization disabled, as this isn't
199- # compatible with Criterions parametrized tests (https://github.com/Snaipe/Criterion/issues/208)
200203.PHONY : test
201204test : $(UNITTESTSBIN )
202205 make ctestrunner
203- setarch ` uname -m ` -R ctest --output-on-failure $(if $(FILTER ) , -R $(FILTER ) )
206+ $( DISABLE_ASLR ) --output-on-failure $(if $(FILTER ) , -R $(FILTER ) )
204207
205208.PHONY : ctestrunner
206209ctestrunner : $(UNITTESTSBIN )
You can’t perform that action at this time.
0 commit comments