diff --git a/catch/multiproc/deviceAllocationMproc.cc b/catch/multiproc/deviceAllocationMproc.cc index e91c0443c..cddfb6ff4 100644 --- a/catch/multiproc/deviceAllocationMproc.cc +++ b/catch/multiproc/deviceAllocationMproc.cc @@ -345,4 +345,4 @@ TEST_CASE("Unit_deviceAllocation_NewDelete_MultProcess") { REQUIRE(res == true); } -#endif +#endif //__linux__ diff --git a/catch/multiproc/hipDeviceGetPCIBusIdMproc.cc b/catch/multiproc/hipDeviceGetPCIBusIdMproc.cc index 55c939c80..e0e194515 100644 --- a/catch/multiproc/hipDeviceGetPCIBusIdMproc.cc +++ b/catch/multiproc/hipDeviceGetPCIBusIdMproc.cc @@ -255,4 +255,4 @@ TEST_CASE("Unit_hipDeviceGetPCIBusId_CheckPciBusIDWithLspci") { REQUIRE(deviceMatchCount == deviceCount); } -#endif +#endif //__linux__ diff --git a/catch/multiproc/hipDeviceTotalMemMproc.cc b/catch/multiproc/hipDeviceTotalMemMproc.cc index ba189a122..184e8bc3a 100644 --- a/catch/multiproc/hipDeviceTotalMemMproc.cc +++ b/catch/multiproc/hipDeviceTotalMemMproc.cc @@ -174,4 +174,4 @@ TEST_CASE("Unit_hipDeviceTotalMem_MaskedDevices") { * @} */ -#endif +#endif //__linux__ diff --git a/catch/multiproc/hipGetDeviceAttributeMproc.cc b/catch/multiproc/hipGetDeviceAttributeMproc.cc index 42b059b86..8a1a8ebd9 100644 --- a/catch/multiproc/hipGetDeviceAttributeMproc.cc +++ b/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/catch/multiproc/hipGetDeviceCountMproc.cc b/catch/multiproc/hipGetDeviceCountMproc.cc index 3d2830f59..62dba8ba7 100644 --- a/catch/multiproc/hipGetDeviceCountMproc.cc +++ b/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/catch/multiproc/hipIpcEventHandle.cc b/catch/multiproc/hipIpcEventHandle.cc index bd6fdff29..720233aa0 100644 --- a/catch/multiproc/hipIpcEventHandle.cc +++ b/catch/multiproc/hipIpcEventHandle.cc @@ -437,4 +437,4 @@ TEST_CASE("Unit_hipIpcEventHandle_ParameterValidation") { * @} */ -#endif +#endif // __linux__ diff --git a/catch/multiproc/hipIpcMemAccessTest.cc b/catch/multiproc/hipIpcMemAccessTest.cc index f77d5bf63..c09466e0a 100644 --- a/catch/multiproc/hipIpcMemAccessTest.cc +++ b/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/catch/multiproc/hipMemCoherencyTstMProc.cc b/catch/multiproc/hipMemCoherencyTstMProc.cc index 0de5b75ce..781e6c6e7 100644 --- a/catch/multiproc/hipMemCoherencyTstMProc.cc +++ b/catch/multiproc/hipMemCoherencyTstMProc.cc @@ -591,4 +591,4 @@ TEST_CASE("Unit_hipHostMalloc_WthEnv1Flg3") { } } #endif -#endif +#endif // __linux__ diff --git a/catch/multiproc/hipMemGetInfoMProc.cc b/catch/multiproc/hipMemGetInfoMProc.cc index c245b9708..1ecca6b69 100644 --- a/catch/multiproc/hipMemGetInfoMProc.cc +++ b/catch/multiproc/hipMemGetInfoMProc.cc @@ -390,4 +390,4 @@ TEST_CASE("Unit_hipMemGetInfo_VerifyHiddenFreeMemForAllGpu") { } } #endif -#endif +#endif // __linux__