From 5a84691e521e09af303c64beedcb1ff02eb30f45 Mon Sep 17 00:00:00 2001 From: sumanthtg Date: Wed, 24 Mar 2021 23:51:47 +0530 Subject: [PATCH] SWDEV-278478 - hipDeviceGetPCIBusId-vs-lspci test enabled only for linux environment Change-Id: Ia86174505d912a32b07e8e959adfba6391c3284d --- hipamd/tests/src/runtimeApi/device/hipDeviceGetPCIBusId.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hipamd/tests/src/runtimeApi/device/hipDeviceGetPCIBusId.cpp b/hipamd/tests/src/runtimeApi/device/hipDeviceGetPCIBusId.cpp index 3b6dcabde5..68ff7ba04f 100644 --- a/hipamd/tests/src/runtimeApi/device/hipDeviceGetPCIBusId.cpp +++ b/hipamd/tests/src/runtimeApi/device/hipDeviceGetPCIBusId.cpp @@ -73,6 +73,7 @@ bool comparePciBusIDWithHipDeviceGetAttribute() { return testResult; } +#ifdef __linux__ bool compareHipDeviceGetPCIBusIdWithLspci() { FILE *fpipe; bool testResult = false; @@ -151,6 +152,7 @@ bool compareHipDeviceGetPCIBusIdWithLspci() { } return testResult; } +#endif /** * Validates negative scenarios for hipDeviceGetPCIBusId @@ -212,7 +214,7 @@ int main(int argc, char* argv[]) { } if (p_tests == 0x2) { -#ifdef __unix__ +#ifdef __linux__ testResult &= compareHipDeviceGetPCIBusIdWithLspci(); #else printf("Detected non-linux OS. Skipping the test\n");