mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00
Do not override LD_LIBRARY_PATH when running tests
Related-To: NEO-5632 Signed-off-by: Pawel Cieslak <pawel.cieslak@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
a304e609fe
commit
5eae946fe3
@ -168,7 +168,7 @@ if(MSVC)
|
||||
)
|
||||
set(RUN_ULT_CMD $<TARGET_FILE:${TARGET_NAME}>)
|
||||
else()
|
||||
set(RUN_ULT_CMD LD_LIBRARY_PATH=$<TARGET_FILE_DIR:${TARGET_NAME}> $<TARGET_FILE:${TARGET_NAME}>)
|
||||
set(RUN_ULT_CMD $<TARGET_FILE:${TARGET_NAME}>)
|
||||
endif()
|
||||
|
||||
add_dependencies(unit_tests ${TARGET_NAME})
|
||||
|
@ -145,9 +145,7 @@ if(MSVC)
|
||||
)")
|
||||
set(RUN_ULT_CMD $<TARGET_FILE:${TARGET_NAME}>)
|
||||
else()
|
||||
set(RUN_ULT_CMD LD_LIBRARY_PATH=$<TARGET_FILE_DIR:${TARGET_NAME}>
|
||||
$<TARGET_FILE:${TARGET_NAME}>
|
||||
)
|
||||
set(RUN_ULT_CMD $<TARGET_FILE:${TARGET_NAME}>)
|
||||
endif()
|
||||
|
||||
add_dependencies(unit_tests ${TARGET_NAME})
|
||||
|
@ -134,7 +134,7 @@ if(MSVC)
|
||||
)
|
||||
set(RUN_ULT_CMD $<TARGET_FILE:${TARGET_NAME}>)
|
||||
else()
|
||||
set(RUN_ULT_CMD LD_LIBRARY_PATH=$<TARGET_FILE_DIR:${TARGET_NAME}> $<TARGET_FILE:${TARGET_NAME}>)
|
||||
set(RUN_ULT_CMD $<TARGET_FILE:${TARGET_NAME}>)
|
||||
endif()
|
||||
|
||||
add_dependencies(unit_tests ${TARGET_NAME})
|
||||
|
@ -201,12 +201,19 @@ int main(int argc, char **argv) {
|
||||
bool enable_segv = true;
|
||||
if (getenv("IGDRCL_TEST_SELF_EXEC") == nullptr) {
|
||||
std::string wd = getRunPath(argv[0]);
|
||||
setenv("LD_LIBRARY_PATH", wd.c_str(), 1);
|
||||
char *ldLibraryPath = getenv("LD_LIBRARY_PATH");
|
||||
|
||||
if (ldLibraryPath == nullptr) {
|
||||
setenv("LD_LIBRARY_PATH", wd.c_str(), 1);
|
||||
} else {
|
||||
std::string ldLibraryPathConcat = wd + ":" + std::string(ldLibraryPath);
|
||||
setenv("LD_LIBRARY_PATH", ldLibraryPathConcat.c_str(), 1);
|
||||
}
|
||||
|
||||
setenv("IGDRCL_TEST_SELF_EXEC", wd.c_str(), 1);
|
||||
execv(argv[0], argv);
|
||||
printf("FATAL ERROR: cannot self-exec test: %s!, errno: %d\n", argv[0], errno);
|
||||
return -1;
|
||||
} else {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -193,12 +193,19 @@ int main(int argc, char **argv) {
|
||||
bool enable_abrt = true;
|
||||
if (getenv("IGDRCL_TEST_SELF_EXEC") == nullptr) {
|
||||
std::string wd = getRunPath(argv[0]);
|
||||
setenv("LD_LIBRARY_PATH", wd.c_str(), 1);
|
||||
char *ldLibraryPath = getenv("LD_LIBRARY_PATH");
|
||||
|
||||
if (ldLibraryPath == nullptr) {
|
||||
setenv("LD_LIBRARY_PATH", wd.c_str(), 1);
|
||||
} else {
|
||||
std::string ldLibraryPathConcat = wd + ":" + std::string(ldLibraryPath);
|
||||
setenv("LD_LIBRARY_PATH", ldLibraryPathConcat.c_str(), 1);
|
||||
}
|
||||
|
||||
setenv("IGDRCL_TEST_SELF_EXEC", wd.c_str(), 1);
|
||||
execv(argv[0], argv);
|
||||
printf("FATAL ERROR: cannot self-exec test: %s!, errno: %d\n", argv[0], errno);
|
||||
return -1;
|
||||
} else {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user