use malloc shim in malloc tests

This commit is contained in:
Theo Butler
2019-02-13 08:12:07 -05:00
parent e42551bb15
commit 0ff2301083

View File

@@ -81,7 +81,11 @@ foreach(SUPER_SLAB_SIZE 1;16)
unset(SRC)
aux_source_directory(${TESTDIR}/${TEST_CATEGORY}/${TEST} SRC)
set(TESTNAME "${TEST_CATEGORY}-${TEST}-${SUPER_SLAB_SIZE}")
add_executable(${TESTNAME} ${SRC} src/override/new.cc)
if(${TEST} STREQUAL "malloc")
add_executable(${TESTNAME} ${SRC} src/override/malloc.cc)
else()
add_executable(${TESTNAME} ${SRC} src/override/new.cc)
endif()
if (${SUPER_SLAB_SIZE} EQUAL 1)
target_compile_definitions(${TESTNAME} PRIVATE IS_ADDRESS_SPACE_CONSTRAINED)
endif()