2018-12-07 11:11:19 +01:00
|
|
|
/*
|
2019-02-27 11:39:32 +01:00
|
|
|
* Copyright (C) 2018-2019 Intel Corporation
|
2018-12-07 11:11:19 +01:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2019-08-29 12:15:33 +02:00
|
|
|
#include "core/os_interface/windows/debug_registry_reader.h"
|
2019-09-02 12:04:22 +02:00
|
|
|
#include "runtime/os_interface/ocl_reg_path.h"
|
2019-02-27 11:39:32 +01:00
|
|
|
|
2019-05-09 10:56:25 +02:00
|
|
|
namespace NEO {
|
2018-12-07 11:11:19 +01:00
|
|
|
class TestedRegistryReader : public RegistryReader {
|
|
|
|
|
public:
|
2019-09-02 12:04:22 +02:00
|
|
|
TestedRegistryReader(bool userScope) : RegistryReader(userScope, oclRegPath){};
|
|
|
|
|
TestedRegistryReader(std::string regKey) : RegistryReader(false, regKey){};
|
2018-12-07 11:11:19 +01:00
|
|
|
HKEY getHkeyType() const {
|
|
|
|
|
return igdrclHkeyType;
|
|
|
|
|
}
|
|
|
|
|
using RegistryReader::getSetting;
|
2019-10-10 11:14:58 +02:00
|
|
|
|
2019-10-09 11:40:50 +02:00
|
|
|
char *getenv(const char *envVar) override {
|
|
|
|
|
if (strcmp(envVar, "TestedEnvironmentVariable") == 0) {
|
|
|
|
|
return "TestedEnvironmentVariableValue";
|
2019-10-10 11:14:58 +02:00
|
|
|
} else if (strcmp(envVar, "TestedEnvironmentIntVariable") == 0) {
|
|
|
|
|
return "1234";
|
2019-10-09 11:40:50 +02:00
|
|
|
} else {
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-12-07 11:11:19 +01:00
|
|
|
const char *getRegKey() const {
|
|
|
|
|
return registryReadRootKey.c_str();
|
|
|
|
|
}
|
|
|
|
|
};
|
2019-05-09 10:56:25 +02:00
|
|
|
} // namespace NEO
|