SWDEV-278478 - hipDeviceGetPCIBusId-vs-lspci test enabled only for linux environment

Change-Id: Ia86174505d912a32b07e8e959adfba6391c3284d
This commit is contained in:
sumanthtg
2021-03-24 23:51:47 +05:30
committed by Tao Sang
parent 8e9e8f40e4
commit 5a84691e52
@@ -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");