Force ocloc cmdline log after fail even if -q option specified

Related-To: NEO-4784

Signed-off-by: Konstanty Misiak <konstanty.misiak@intel.com>
This commit is contained in:
Konstanty Misiak 2021-02-08 15:14:24 +01:00 committed by Compute-Runtime-Automation
parent c5a7481999
commit 46ece15e09
3 changed files with 6 additions and 5 deletions

View File

@ -67,6 +67,7 @@ TEST(OclocApiTests, WhenGoodFamilyNameIsProvidedThenSuccessIsReturned) {
TEST(OclocApiTests, WhenArgsWithMissingFileAreGivenThenErrorMessageIsProduced) {
const char *argv[] = {
"ocloc",
"-q",
"-file",
"test_files/IDoNotExist.cl",
"-device",
@ -81,7 +82,7 @@ TEST(OclocApiTests, WhenArgsWithMissingFileAreGivenThenErrorMessageIsProduced) {
std::string output = testing::internal::GetCapturedStdout();
EXPECT_EQ(retVal, NEO::OfflineCompiler::ErrorCode::INVALID_FILE);
EXPECT_NE(std::string::npos, output.find("Command was: ocloc -file test_files/IDoNotExist.cl -device "s + argv[4]));
EXPECT_NE(std::string::npos, output.find("Command was: ocloc -q -file test_files/IDoNotExist.cl -device "s + argv[5]));
}
TEST(OclocApiTests, GivenIncludeHeadersWhenCompilingThenPassesToFclHeadersPackedAsElf) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2020 Intel Corporation
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*

View File

@ -59,10 +59,10 @@ Examples:
extern "C" {
void printOclocCmdLine(unsigned int numArgs, const char *argv[], std::unique_ptr<OclocArgHelper> &helper) {
helper->printf("Command was:");
printf("Command was:");
for (auto i = 0u; i < numArgs; ++i)
helper->printf(" %s", argv[i]);
helper->printf("\n");
printf(" %s", argv[i]);
printf("\n");
}
int oclocInvoke(unsigned int numArgs, const char *argv[],