2022-01-12 23:27:20 +08:00
|
|
|
/*
|
2023-02-16 02:19:30 +08:00
|
|
|
* Copyright (C) 2022-2023 Intel Corporation
|
2022-01-12 23:27:20 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2023-02-16 02:19:30 +08:00
|
|
|
#include "gtest/gtest.h"
|
2022-01-12 23:27:20 +08:00
|
|
|
#include "mock/mock_argument_helper.h"
|
2022-04-12 20:53:04 +08:00
|
|
|
#include "mock/mock_ocloc_igc_facade.h"
|
2022-01-12 23:27:20 +08:00
|
|
|
#include "mock/mock_offline_linker.h"
|
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
|
|
|
|
class OfflineLinkerTest : public ::testing::Test {
|
|
|
|
public:
|
2022-04-12 20:53:04 +08:00
|
|
|
OfflineLinkerTest() {
|
|
|
|
mockOclocIgcFacade = std::make_unique<MockOclocIgcFacade>(&mockArgHelper);
|
|
|
|
}
|
|
|
|
|
2022-01-12 23:27:20 +08:00
|
|
|
void SetUp() override;
|
|
|
|
void TearDown() override;
|
|
|
|
|
|
|
|
std::string getEmptySpirvFile() const;
|
|
|
|
std::string getEmptyLlvmBcFile() const;
|
|
|
|
MockOfflineLinker::InputFileContent createFileContent(const std::string &content, IGC::CodeType::CodeType_t codeType) const;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
MockOclocArgHelper::FilesMap mockArgHelperFilesMap{};
|
|
|
|
MockOclocArgHelper mockArgHelper{mockArgHelperFilesMap};
|
2022-04-12 20:53:04 +08:00
|
|
|
std::unique_ptr<MockOclocIgcFacade> mockOclocIgcFacade{};
|
2022-01-12 23:27:20 +08:00
|
|
|
char binaryToReturn[8]{7, 7, 7, 7, 0, 1, 2, 3};
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace NEO
|