Redefine functions with test hooks only for tests

Android build has issues with these defines, this will allow the build to
succeed if it doesn't need to build the tests.
This commit is contained in:
Alex Lapenkou
2021-09-22 14:59:53 -07:00
committed by Alexander Lapenkov
parent c9ebff0fd6
commit 8daac7958f
3 changed files with 16 additions and 11 deletions

View File

@@ -12,7 +12,7 @@ func_to_hook(int arg1, int arg2) {
return arg1 + arg2;
}
#define func_to_hook JEMALLOC_HOOK(func_to_hook, test_hooks_libc_hook)
#define func_to_hook JEMALLOC_TEST_HOOK(func_to_hook, test_hooks_libc_hook)
TEST_BEGIN(unhooked_call) {
test_hooks_libc_hook = NULL;