File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -169,11 +169,16 @@ ifeq ($(VERBOSE),false)
169
169
.SILENT : $(UNITTESTSBIN ) $(UNITTESTSOBJ )
170
170
endif
171
171
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
172
177
173
178
.PHONY : all
174
179
all : Criterion $(OBJDIR ) $(OBJDIRS ) $(BINDIRS ) $(UNITTESTSBIN )
175
180
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 ) )
177
182
178
183
.PHONY : lint
179
184
lint : $(UNITTESTSSRC )
@@ -195,12 +200,10 @@ $(BINDIRS):
195
200
@echo " -> Creating $@ directory"
196
201
@-mkdir -p $@
197
202
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)
200
203
.PHONY : test
201
204
test : $(UNITTESTSBIN )
202
205
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 ) )
204
207
205
208
.PHONY : ctestrunner
206
209
ctestrunner : $(UNITTESTSBIN )
You can’t perform that action at this time.
0 commit comments