Move CompilerInterface to ExecutionEnvironment

Change-Id: I14afdd8fc41ecd4ac8c8fcbeecda2539bc847288
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
Maciej Dziuban
2018-08-01 09:06:46 +02:00
committed by sys_ocldev
parent 931b462ee1
commit d2759a0629
18 changed files with 114 additions and 190 deletions

View File

@@ -58,10 +58,10 @@ class CompilerInterfaceTest : public DeviceFixture,
retVal = CL_SUCCESS;
// create the compiler interface
pCompilerInterface.reset(new MockCompilerInterface());
ASSERT_NE(nullptr, pCompilerInterface);
this->pCompilerInterface = new MockCompilerInterface();
bool initRet = pCompilerInterface->initialize();
ASSERT_TRUE(initRet);
pDevice->getExecutionEnvironment()->compilerInterface.reset(pCompilerInterface);
std::string testFile;
@@ -94,12 +94,11 @@ class CompilerInterfaceTest : public DeviceFixture,
delete pContext;
deleteDataReadFromFile(pSource);
pCompilerInterface.reset();
DeviceFixture::TearDown();
}
std::unique_ptr<MockCompilerInterface> pCompilerInterface = nullptr;
MockCompilerInterface *pCompilerInterface;
TranslationArgs inputArgs;
Program *pProgram = nullptr;
MockContext *pContext = nullptr;
@@ -205,12 +204,6 @@ TEST_F(CompilerInterfaceTest, BuildWithDebugData) {
delete cip;
}
TEST_F(CompilerInterfaceTest, GetInstance_Shutdown) {
auto *pCompilerInterface = CompilerInterface::getInstance();
EXPECT_NE(nullptr, pCompilerInterface);
CompilerInterface::shutdown();
}
TEST_F(CompilerInterfaceTest, CompileClToIsa) {
// build from .cl to gen ISA
retVal = pCompilerInterface->build(*pProgram, inputArgs, false);