Report failure given Compiler Library Load failed for L0

- Return ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE given the Compiler
  cannot be loaded.
- Print dlopen and LoadLibrary error strings given Debug Print Messages
  are enabled.

Related-To: LOCI-1313

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
This commit is contained in:
Spruit, Neil R
2021-03-11 17:01:51 -08:00
committed by Compute-Runtime-Automation
parent 95b9880385
commit 7a3095c273
37 changed files with 297 additions and 49 deletions

View File

@ -101,4 +101,21 @@ TEST(OSLibraryWinTest, WhenCreatingFullSystemPathThenProperPathIsConstructed) {
auto fullPath = OsLibrary::createFullSystemPath("test");
EXPECT_STREQ("C:\\System\\test", fullPath.c_str());
}
TEST(OSLibraryWinTest, GivenInvalidLibraryWhenOpeningLibraryThenLoadLibraryErrorIsReturned) {
std::string errorValue;
auto lib = std::make_unique<Windows::OsLibrary>("abc", &errorValue);
EXPECT_FALSE(errorValue.empty());
}
TEST(OSLibraryWinTest, GivenNoLastErrorOnWindowsThenErrorStringisEmpty) {
std::string errorValue;
auto lib = std::make_unique<Windows::OsLibrary>(Os::testDllName, &errorValue);
EXPECT_NE(nullptr, lib);
EXPECT_TRUE(errorValue.empty());
lib.get()->getLastErrorString(&errorValue);
EXPECT_TRUE(errorValue.empty());
lib.get()->getLastErrorString(nullptr);
}