diff --git a/projects/hip-tests/catch/multiproc/deviceAllocationMproc.cc b/projects/hip-tests/catch/multiproc/deviceAllocationMproc.cc index e91c0443cef..cddfb6ff4d0 100644 --- a/projects/hip-tests/catch/multiproc/deviceAllocationMproc.cc +++ b/projects/hip-tests/catch/multiproc/deviceAllocationMproc.cc @@ -345,4 +345,4 @@ TEST_CASE("Unit_deviceAllocation_NewDelete_MultProcess") { REQUIRE(res == true); } -#endif +#endif //__linux__ diff --git a/projects/hip-tests/catch/multiproc/hipDeviceGetPCIBusIdMproc.cc b/projects/hip-tests/catch/multiproc/hipDeviceGetPCIBusIdMproc.cc index 55c939c80c7..e0e194515a6 100644 --- a/projects/hip-tests/catch/multiproc/hipDeviceGetPCIBusIdMproc.cc +++ b/projects/hip-tests/catch/multiproc/hipDeviceGetPCIBusIdMproc.cc @@ -255,4 +255,4 @@ TEST_CASE("Unit_hipDeviceGetPCIBusId_CheckPciBusIDWithLspci") { REQUIRE(deviceMatchCount == deviceCount); } -#endif +#endif //__linux__ diff --git a/projects/hip-tests/catch/multiproc/hipDeviceTotalMemMproc.cc b/projects/hip-tests/catch/multiproc/hipDeviceTotalMemMproc.cc index ba189a122e3..184e8bc3a40 100644 --- a/projects/hip-tests/catch/multiproc/hipDeviceTotalMemMproc.cc +++ b/projects/hip-tests/catch/multiproc/hipDeviceTotalMemMproc.cc @@ -174,4 +174,4 @@ TEST_CASE("Unit_hipDeviceTotalMem_MaskedDevices") { * @} */ -#endif +#endif //__linux__ diff --git a/projects/hip-tests/catch/multiproc/hipGetDeviceAttributeMproc.cc b/projects/hip-tests/catch/multiproc/hipGetDeviceAttributeMproc.cc index 42b059b863b..8a1a8ebd94c 100644 --- a/projects/hip-tests/catch/multiproc/hipGetDeviceAttributeMproc.cc +++ b/projects/hip-tests/catch/multiproc/hipGetDeviceAttributeMproc.cc @@ -161,4 +161,4 @@ TEST_CASE("Unit_hipDeviceGetAttribute_MaskedDevices") { SUCCEED("Not enough GPUs to run the masked GPU tests"); } } -#endif +#endif //__linux__ diff --git a/projects/hip-tests/catch/multiproc/hipGetDeviceCountMproc.cc b/projects/hip-tests/catch/multiproc/hipGetDeviceCountMproc.cc index 3d2830f5929..62dba8ba7df 100644 --- a/projects/hip-tests/catch/multiproc/hipGetDeviceCountMproc.cc +++ b/projects/hip-tests/catch/multiproc/hipGetDeviceCountMproc.cc @@ -26,10 +26,20 @@ THE SOFTWARE. #ifdef __linux__ #include #include +#endif // __linux__ #define MAX_SIZE 30 #define VISIBLE_DEVICE 0 +#ifdef _WIN32 +static int setenv(const char* name, const char* value, int overwrite) { + REQUIRE(overwrite == 1); + return _putenv_s(name, value); +} + +static int unsetenv(const char* name) { return _putenv_s(name, ""); } +#endif // _WIN32 + /** * Validate behavior of hipGetDeviceCount for masked devices. */ @@ -51,4 +61,3 @@ TEST_CASE("Unit_hipGetDeviceCount_MaskedDevices") { HIP_CHECK(hipGetDeviceCount(&numDevices)); REQUIRE(numDevices == 1); } -#endif diff --git a/projects/hip-tests/catch/multiproc/hipIpcEventHandle.cc b/projects/hip-tests/catch/multiproc/hipIpcEventHandle.cc index 499ef0862eb..004c41452de 100644 --- a/projects/hip-tests/catch/multiproc/hipIpcEventHandle.cc +++ b/projects/hip-tests/catch/multiproc/hipIpcEventHandle.cc @@ -440,4 +440,4 @@ TEST_CASE("Unit_hipIpcEventHandle_ParameterValidation") { * @} */ -#endif +#endif // __linux__ diff --git a/projects/hip-tests/catch/multiproc/hipIpcMemAccessTest.cc b/projects/hip-tests/catch/multiproc/hipIpcMemAccessTest.cc index f77d5bf6350..c09466e0af6 100644 --- a/projects/hip-tests/catch/multiproc/hipIpcMemAccessTest.cc +++ b/projects/hip-tests/catch/multiproc/hipIpcMemAccessTest.cc @@ -182,6 +182,8 @@ TEST_CASE("Unit_hipIpcMemAccess_Semaphores") { A_h, nullptr, C_h, false); } +#endif // __linux__ + /** * Test Description * ------------------------ @@ -278,4 +280,3 @@ TEST_CASE("Unit_hipIpcMemAccess_ParameterValidation") { * @} */ -#endif diff --git a/projects/hip-tests/catch/multiproc/hipMemCoherencyTstMProc.cc b/projects/hip-tests/catch/multiproc/hipMemCoherencyTstMProc.cc index f91b8b15f60..7696b51ead5 100644 --- a/projects/hip-tests/catch/multiproc/hipMemCoherencyTstMProc.cc +++ b/projects/hip-tests/catch/multiproc/hipMemCoherencyTstMProc.cc @@ -516,4 +516,4 @@ TEST_CASE("Unit_hipHostMalloc_WthEnv1Flg3") { } } #endif -#endif +#endif // __linux__ diff --git a/projects/hip-tests/catch/multiproc/hipMemGetInfoMProc.cc b/projects/hip-tests/catch/multiproc/hipMemGetInfoMProc.cc index c245b97087b..1ecca6b6911 100644 --- a/projects/hip-tests/catch/multiproc/hipMemGetInfoMProc.cc +++ b/projects/hip-tests/catch/multiproc/hipMemGetInfoMProc.cc @@ -390,4 +390,4 @@ TEST_CASE("Unit_hipMemGetInfo_VerifyHiddenFreeMemForAllGpu") { } } #endif -#endif +#endif // __linux__