Ocloc - fix binary output filename with "-output_no_suffix"

Resolves: NEO-7474

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2022-11-03 11:58:40 +00:00
committed by Compute-Runtime-Automation
parent 91c69e0fe7
commit 3ca628c388
3 changed files with 5 additions and 5 deletions

View File

@ -38,7 +38,7 @@ components:
dest_dir: kernels_bin
type: git
branch: kernels_bin
revision: 1982-406
revision: 1982-408
kmdaf:
branch: kmdaf
dest_dir: kmdaf

View File

@ -2597,7 +2597,7 @@ TEST(OfflineCompilerTest, givenOutputNoSuffixFlagAndNonEmptyOutputFileNameAndNon
mockOfflineCompiler.writeOutAllFiles();
const auto outputFileIt = mockOfflineCompiler.uniqueHelper->interceptedFiles.find("some_output_filename");
const auto outputFileIt = mockOfflineCompiler.uniqueHelper->interceptedFiles.find("some_output_filename.bin");
ASSERT_NE(mockOfflineCompiler.uniqueHelper->interceptedFiles.end(), outputFileIt);
EXPECT_EQ("12345678", outputFileIt->second);
@ -2613,7 +2613,7 @@ TEST(OfflineCompilerTest, givenInputFileNameAndOutputNoSuffixFlagAndEmptyOutputF
mockOfflineCompiler.writeOutAllFiles();
const auto outputFileIt = mockOfflineCompiler.uniqueHelper->interceptedFiles.find("important_file");
const auto outputFileIt = mockOfflineCompiler.uniqueHelper->interceptedFiles.find("important_file.bin");
ASSERT_NE(mockOfflineCompiler.uniqueHelper->interceptedFiles.end(), outputFileIt);
EXPECT_EQ("12345678", outputFileIt->second);
@ -2637,7 +2637,7 @@ TEST(OfflineCompilerTest, givenNonEmptyOutputDirectoryWhenWritingOutAllFilesTheD
EXPECT_EQ("/home/important", mockOfflineCompiler.createdDirs[1]);
EXPECT_EQ("/home/important/compilation", mockOfflineCompiler.createdDirs[2]);
const auto outputFileIt = mockOfflineCompiler.uniqueHelper->interceptedFiles.find("/home/important/compilation/some_output_filename");
const auto outputFileIt = mockOfflineCompiler.uniqueHelper->interceptedFiles.find("/home/important/compilation/some_output_filename.bin");
ASSERT_NE(mockOfflineCompiler.uniqueHelper->interceptedFiles.end(), outputFileIt);
EXPECT_EQ("12345678", outputFileIt->second);

View File

@ -1178,7 +1178,7 @@ void OfflineCompiler::writeOutAllFiles() {
if (!elfBinary.empty()) {
std::string elfOutputFile;
if (outputNoSuffix) {
elfOutputFile = generateFilePath(outputDirectory, fileBase, "");
elfOutputFile = generateFilePath(outputDirectory, fileBase, ".bin");
} else {
elfOutputFile = generateFilePath(outputDirectory, fileBase, ".bin") + generateOptsSuffix();
}