mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
improve test output to differentiate between ULT and AUB
Related-To: NEO-5901 Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
a77d2b1dde
commit
c13dcbd143
@@ -16,6 +16,9 @@
|
||||
#include <vector>
|
||||
|
||||
std::string lastTest("");
|
||||
namespace NEO {
|
||||
extern const char *executionName;
|
||||
}
|
||||
|
||||
class CCustomEventListener : public ::testing::TestEventListener {
|
||||
public:
|
||||
@@ -106,26 +109,28 @@ class CCustomEventListener : public ::testing::TestEventListener {
|
||||
if (unitTest.Failed()) {
|
||||
ultStatus = "FAILED";
|
||||
}
|
||||
auto executionNameLen = strlen(NEO::executionName);
|
||||
|
||||
if (hardwarePrefix != "---") {
|
||||
paddingS = std::string(hardwarePrefix.length(), ' ');
|
||||
paddingE = std::string(hardwarePrefix.length(), '=');
|
||||
paddingS = std::string(hardwarePrefix.length() + executionNameLen, ' ');
|
||||
paddingE = std::string(hardwarePrefix.length() + executionNameLen, '=');
|
||||
|
||||
fprintf(
|
||||
stdout,
|
||||
"\n"
|
||||
"%s=====================\n"
|
||||
"== %s ULTs %s ==\n"
|
||||
"%s=====================\n",
|
||||
paddingE.c_str(), hardwarePrefix.c_str(), ultStatus.c_str(), paddingE.c_str());
|
||||
"%s==================\n"
|
||||
"== %s %ss %s ==\n"
|
||||
"%s==================\n",
|
||||
paddingE.c_str(), hardwarePrefix.c_str(), NEO::executionName, ultStatus.c_str(), paddingE.c_str());
|
||||
} else {
|
||||
paddingE = std::string(executionNameLen, '=');
|
||||
fprintf(
|
||||
stdout,
|
||||
"\n"
|
||||
"=====================\n"
|
||||
"== ULTs %s ==\n"
|
||||
"=====================\n",
|
||||
ultStatus.c_str());
|
||||
"%s==================\n"
|
||||
"== %ss %s ==\n"
|
||||
"%s==================\n",
|
||||
paddingE.c_str(), NEO::executionName, ultStatus.c_str(), paddingE.c_str());
|
||||
}
|
||||
|
||||
fprintf(
|
||||
@@ -136,7 +141,7 @@ class CCustomEventListener : public ::testing::TestEventListener {
|
||||
"Tests failed: %d\n"
|
||||
"Tests disabled: %d\n"
|
||||
" Time elapsed: %d ms\n"
|
||||
"%s=====================\n",
|
||||
"%s==================\n",
|
||||
testsRun,
|
||||
testsPassed,
|
||||
testsSkipped,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -8,5 +8,6 @@
|
||||
#include "test_mode.h"
|
||||
|
||||
namespace NEO {
|
||||
const char *executionName = "ULT";
|
||||
TestMode testMode = defaultTestMode;
|
||||
} // namespace NEO
|
||||
|
||||
@@ -46,6 +46,7 @@ const char *fSeparator = "/";
|
||||
namespace NEO {
|
||||
extern const char *hardwarePrefix[];
|
||||
extern const HardwareInfo *hardwareInfoTable[IGFX_MAX_PRODUCT];
|
||||
extern const char *executionName;
|
||||
|
||||
extern const unsigned int ultIterationMaxTime;
|
||||
extern bool useMockGmm;
|
||||
@@ -217,6 +218,14 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
std::string envVar = std::string("NEO_") + executionName + "_DISABLE_TEST_ALARM";
|
||||
char *envValue = getenv(envVar.c_str());
|
||||
if (envValue != nullptr) {
|
||||
enable_alarm = false;
|
||||
}
|
||||
}
|
||||
|
||||
::testing::InitGoogleMock(&argc, argv);
|
||||
HardwareInfo hwInfoForTests = DEFAULT_TEST_PLATFORM::hwInfo;
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ set(IGDRCL_SRCS_offline_compiler_tests
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ocloc_api_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ocloc_fatbinary_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ocloc_fatbinary_tests.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ocloc_tests_configuration.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ocloc_validator_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/offline_compiler_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/offline_compiler_tests.h
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
namespace NEO {
|
||||
const char *executionName = "OCLOC";
|
||||
} // namespace NEO
|
||||
@@ -12,5 +12,6 @@ namespace NEO {
|
||||
unsigned int ultIterationMaxTime = 180;
|
||||
bool useMockGmm = false;
|
||||
const char *executionDirectorySuffix = "_aub";
|
||||
const char *executionName = "AUB";
|
||||
TestMode testMode = defaultTestMode;
|
||||
} // namespace NEO
|
||||
|
||||
@@ -11,5 +11,6 @@ namespace NEO {
|
||||
unsigned int ultIterationMaxTime = 45;
|
||||
bool useMockGmm = true;
|
||||
const char *executionDirectorySuffix = "";
|
||||
const char *executionName = "ULT";
|
||||
TestMode testMode = defaultTestMode;
|
||||
} // namespace NEO
|
||||
Reference in New Issue
Block a user