Allow cloc tests to be run from default location.

Change-Id: Ic5f8e34ff261b45100c98a6065b1aeaab3c4d665
This commit is contained in:
Zdunowski, Piotr
2018-02-21 14:42:23 +01:00
committed by sys_ocldev
parent b4f79e036f
commit 46f3efd79c
2 changed files with 25 additions and 3 deletions

View File

@@ -272,11 +272,13 @@ int main(int argc, char **argv) {
#ifdef WIN32
#include <direct.h>
_chdir(hardwarePrefix[productFamily]);
if (_chdir(hardwarePrefix[productFamily])) {
std::cout << "chdir into " << hardwarePrefix[productFamily] << " directory failed.\nThis might cause test failures." << std::endl;
}
#elif defined(__linux__)
#include <unistd.h>
if (chdir(hardwarePrefix[productFamily]) != 0) {
std::cout << "chdir failed! Ignoring." << std::endl;
std::cout << "chdir into " << hardwarePrefix[productFamily] << " directory failed.\nThis might cause test failures." << std::endl;
}
#endif