diff --git a/test/libsinsp_e2e/libsinsp_test_var.h.in b/test/libsinsp_e2e/libsinsp_test_var.h.in index 9d9d2675b3..2f9a83e65b 100644 --- a/test/libsinsp_e2e/libsinsp_test_var.h.in +++ b/test/libsinsp_e2e/libsinsp_test_var.h.in @@ -27,4 +27,8 @@ limitations under the License. // Absolute path to the bpf probe .o file #define LIBSINSP_TEST_BPF_PROBE_PATH "${CMAKE_BINARY_DIR}/driver/bpf/probe.o" -#define LIBSINSP_TEST_CAPTURES_PATH "${CMAKE_BINARY_DIR}/test/libsinsp_e2e/captures" +#define LIBSINSP_TEST_CAPTURES_PATH "${CMAKE_BINARY_DIR}/test/libsinsp_e2e/captures/" + +#define LIBSINSP_TEST_RESOURCES_PATH "${CMAKE_BINARY_DIR}/test/libsinsp_e2e/resources/" + +#define LIBSINSP_TEST_PATH "${CMAKE_BINARY_DIR}/test/libsinsp_e2e/" diff --git a/test/libsinsp_e2e/sys_call_test.cpp b/test/libsinsp_e2e/sys_call_test.cpp index a49a10e423..e1e98239a4 100644 --- a/test/libsinsp_e2e/sys_call_test.cpp +++ b/test/libsinsp_e2e/sys_call_test.cpp @@ -1006,7 +1006,9 @@ TEST_F(sys_call_test32, execve_ia32_emulation) run_callback_t test = [&](sinsp* inspector) { - auto ret = system("./resources/execve32 ./resources/execve ./resources/execve32"); + auto ret = system(LIBSINSP_TEST_RESOURCES_PATH "execve32 " + LIBSINSP_TEST_RESOURCES_PATH "execve " + LIBSINSP_TEST_RESOURCES_PATH "execve32"); EXPECT_EQ(0, ret); }; @@ -1074,7 +1076,7 @@ TEST_F(sys_call_test32, quotactl_ko) run_callback_t test = [&](sinsp* inspector) { - subprocess handle("./test_helper_32", {"quotactl_ko"}); + subprocess handle(LIBSINSP_TEST_PATH "/test_helper_32", {"quotactl_ko"}); handle.wait(); };