2017-12-21 00:45:38 +01:00
|
|
|
/*
|
2022-01-12 15:27:20 +00:00
|
|
|
* Copyright (C) 2018-2022 Intel Corporation
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
2019-02-27 11:39:32 +01:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
2022-01-12 15:27:20 +00:00
|
|
|
|
2020-02-27 16:17:08 +01:00
|
|
|
#include "shared/offline_compiler/source/multi_command.h"
|
2022-01-12 15:27:20 +00:00
|
|
|
#include "shared/offline_compiler/source/ocloc_error_code.h"
|
2020-02-27 16:17:08 +01:00
|
|
|
#include "shared/offline_compiler/source/offline_compiler.h"
|
2019-02-27 11:39:32 +01:00
|
|
|
|
2022-01-25 15:59:24 +00:00
|
|
|
#include "opencl/test/unit_test/offline_compiler/mock/mock_argument_helper.h"
|
|
|
|
|
2017-12-21 00:45:38 +01:00
|
|
|
#include <cstdint>
|
2020-03-10 14:02:09 +01:00
|
|
|
#include <memory>
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
namespace NEO {
|
2017-12-21 00:45:38 +01:00
|
|
|
|
|
|
|
class OfflineCompilerTests : public ::testing::Test {
|
|
|
|
public:
|
2020-04-15 17:15:07 +02:00
|
|
|
OfflineCompiler *pOfflineCompiler = nullptr;
|
2022-01-12 15:27:20 +00:00
|
|
|
int retVal = OclocErrorCode::SUCCESS;
|
2022-01-25 15:59:24 +00:00
|
|
|
std::map<std::string, std::string> filesMap;
|
|
|
|
std::unique_ptr<MockOclocArgHelper> oclocArgHelperWithoutInput = std::make_unique<MockOclocArgHelper>(filesMap);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void SetUp() override {
|
|
|
|
oclocArgHelperWithoutInput->setAllCallBase(true);
|
|
|
|
}
|
2017-12-21 00:45:38 +01:00
|
|
|
};
|
|
|
|
|
2019-05-14 16:47:35 +02:00
|
|
|
class MultiCommandTests : public ::testing::Test {
|
|
|
|
public:
|
|
|
|
void createFileWithArgs(const std::vector<std::string> &, int numOfBuild);
|
|
|
|
void deleteFileWithArgs();
|
2019-11-21 13:52:43 +01:00
|
|
|
void deleteOutFileList();
|
2020-03-13 14:59:00 +01:00
|
|
|
MultiCommand *pMultiCommand = nullptr;
|
2019-05-14 16:47:35 +02:00
|
|
|
std::string nameOfFileWithArgs;
|
2019-11-21 13:52:43 +01:00
|
|
|
std::string outFileList;
|
2022-01-12 15:27:20 +00:00
|
|
|
int retVal = OclocErrorCode::SUCCESS;
|
2022-01-25 15:59:24 +00:00
|
|
|
std::map<std::string, std::string> filesMap;
|
|
|
|
std::unique_ptr<MockOclocArgHelper> oclocArgHelperWithoutInput = std::make_unique<MockOclocArgHelper>(filesMap);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void SetUp() override {
|
|
|
|
oclocArgHelperWithoutInput->setAllCallBase(true);
|
|
|
|
}
|
2019-05-14 16:47:35 +02:00
|
|
|
};
|
2019-03-26 11:59:46 +01:00
|
|
|
} // namespace NEO
|