refactor: Mock file system in ULTs

Functions: fileExists and loadDataToFile
use IO functions from namespace IoFunctions

Now tests that use these functions
are mocked by default,
but some still require access to real files
and have been restored the ability to read files.
They will be mocked in next PRs.

Related-To: NEO-7006
Signed-off-by: Marcel Skierkowski <marcel.skierkowski@intel.com>
This commit is contained in:
Marcel Skierkowski
2025-04-09 15:18:28 +00:00
committed by Compute-Runtime-Automation
parent 077fe1ab48
commit 5d01677454
56 changed files with 349 additions and 80 deletions

View File

@@ -1,10 +1,11 @@
/*
* Copyright (C) 2018-2024 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/helpers/file_io.h"
#include "shared/source/helpers/string.h"
#include "shared/source/kernel/implicit_args_helper.h"
#include "shared/source/memory_manager/allocations_list.h"
@@ -55,6 +56,7 @@ class ProgramDataTestBase : public testing::Test,
void buildAndDecodeProgramPatchList();
void SetUp() override {
USE_REAL_FILE_SYSTEM();
PlatformFixture::setUp();
pClDevice = pPlatform->getClDevice(0);
rootDeviceIndex = pClDevice->getRootDeviceIndex();