SWDEV-273235 - Linux: catch2 shared lib to executable (#2421)

Change-Id: I17101e39fd05eb35c087ebdf3cb005d428d9f206
This commit is contained in:
agunashe
2021-11-25 21:32:29 -08:00
کامیت شده توسط GitHub
والد 07c2e5b668
کامیت f90c5d218c
26فایلهای تغییر یافته به همراه121 افزوده شده و 183 حذف شده
@@ -4,13 +4,15 @@ set(TEST_SRC
printfSpecifiers.cc
)
# Create shared lib of all tests
add_library(printfTests SHARED EXCLUDE_FROM_ALL ${TEST_SRC})
if(HIP_PLATFORM MATCHES "amd")
set_property(TARGET printfTests PROPERTY CXX_STANDARD 17)
else()
target_compile_options(printfTests PUBLIC -std=c++17)
endif()
# Add dependency on build_tests to build it on this custom target
add_dependencies(build_tests printfTests)
if(HIP_PLATFORM MATCHES "amd")
hip_add_exe_to_target(NAME printfTests
TEST_SRC ${TEST_SRC}
TEST_TARGET_NAME build_tests
PROPERTY CXX_STANDARD 17)
elseif (HIP_PLATFORM MATCHES "nvidia")
hip_add_exe_to_target(NAME printfTests
TEST_SRC ${TEST_SRC}
TEST_TARGET_NAME build_tests
COMPILE_OPTIONS -std=c++17)
endif()
@@ -51,7 +51,7 @@ xyzzy
00000042
)here");
hip::SpawnProc proc("unit/printfExe/printfFlags", true);
hip::SpawnProc proc("printfExe/printfFlags", true);
REQUIRE(proc.run() == 0);
REQUIRE(proc.getOutput() == reference);
}
@@ -89,7 +89,7 @@ x
)here");
#endif
hip::SpawnProc proc("unit/printfExe/printfSepcifiers", true);
hip::SpawnProc proc("printfExe/printfSepcifiers", true);
REQUIRE(0 == proc.run());
REQUIRE(proc.getOutput() == reference);
}