Kernel Source Level debugger support 4/n

- adding DebugSurface allocation and setup
- unit tests refactors:
  - mock kernel with kernel debug option
  - separating fixtures to headers
  - added helper for getting internal-options kernels
    filenames

Change-Id: I7b6f4d46e2ab7cff0da8d5212483f44ae0d4be31
This commit is contained in:
Hoppe, Mateusz
2018-03-21 12:58:30 +01:00
committed by sys_ocldev
parent 7b1fd38fe6
commit 7f32eb06d1
20 changed files with 372 additions and 59 deletions

View File

@ -24,6 +24,7 @@
#include "unit_tests/fixtures/program_fixture.h"
#include "unit_tests/global_environment.h"
#include "unit_tests/helpers/kernel_binary_helper.h"
#include "unit_tests/helpers/kernel_filename_helper.h"
#include "unit_tests/mocks/mock_program.h"
#include "unit_tests/program/program_tests.h"
#include "unit_tests/program/program_from_binary.h"
@ -53,12 +54,9 @@ class ProgramWithKernelDebuggingTest : public ProgramSimpleFixture,
ProgramSimpleFixture::SetUp();
device = pDevice;
std::string fullName(CompilerOptions::debugKernelEnable);
// remove leading spaces
size_t position = fullName.find_first_not_of(" ");
std::string filename(fullName, position);
// replace space with underscore
std::replace(filename.begin(), filename.end(), ' ', '_');
std::string filename;
std::string kernelOption(CompilerOptions::debugKernelEnable);
KernelFilenameHelper::getKernelFilenameFromInternalOption(kernelOption, filename);
kbHelper = new KernelBinaryHelper(filename, false);
CreateProgramWithSource(