Files
compute-runtime/opencl/test/unit_test/global_environment.h
Mateusz Jablonski 9dbeeea18f Clang-format: restore sorting includes
Change-Id: I34eb993b562c77f56d8fbd51a02ee266c1f76678
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-02-24 10:22:30 +01:00

72 lines
1.8 KiB
C++

/*
* Copyright (C) 2017-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/helpers/hw_info.h"
#include "shared/source/os_interface/os_library.h"
#include "opencl/test/unit_test/mocks/mock_compilers.h"
#include "gtest/gtest.h"
using namespace NEO;
OsLibrary *setAdapterInfo(const PLATFORM *platform, const GT_SYSTEM_INFO *gtSystemInfo, uint64_t gpuAddressSpace);
class TestEnvironment : public ::testing::Environment {
public:
TestEnvironment();
virtual void SetUp() override;
virtual void TearDown() override;
virtual void fclPushDebugVars(
MockCompilerDebugVars &newDebugVars);
virtual void fclPopDebugVars();
virtual void igcPushDebugVars(
MockCompilerDebugVars &newDebugVars);
virtual void igcPopDebugVars();
virtual void setDefaultDebugVars(
MockCompilerDebugVars &fclDefaults,
MockCompilerDebugVars &igcDefaults,
HardwareInfo &hwInfo);
virtual void setMockFileNames(
std::string &fclMockFile,
std::string &igcMockFile);
virtual std::string &fclGetMockFile();
virtual std::string &igcGetMockFile();
protected:
OsLibrary *libraryFrontEnd;
OsLibrary *libraryIGC;
OsLibrary *libraryOS;
std::vector<MockCompilerDebugVars> igcDebugVarStack;
std::vector<MockCompilerDebugVars> fclDebugVarStack;
void (*igcSetDebugVarsFPtr)(MockCompilerDebugVars &debugVars);
void (*fclSetDebugVarsFptr)(MockCompilerDebugVars &debugVars);
MockCompilerDebugVars fclDefaultDebugVars;
MockCompilerDebugVars igcDefaultDebugVars;
HardwareInfo hwInfoDefaultDebugVars;
std::string fclMockFile;
std::string igcMockFile;
MockCompilerEnableGuard mockCompilerGuard;
};
extern TestEnvironment *gEnvironment;