refactor: don't call OsLibrary::load directly, use function pointer

this allows mocking this call in ULT

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2024-08-19 12:50:05 +00:00
committed by Compute-Runtime-Automation
parent 006285105d
commit 579af57161
51 changed files with 124 additions and 137 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2023 Intel Corporation
* Copyright (C) 2020-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -265,7 +265,7 @@ int NlApi::nlaNestEnd(struct nl_msg *msg, struct nlattr *attr) {
}
NlApi::NlApi() {
genlLibraryHandle.reset(NEO::OsLibrary::load(std::string(libgenlFile)));
genlLibraryHandle.reset(NEO::OsLibrary::loadFunc(std::string(libgenlFile)));
}
NlApi::~NlApi() = default;