Skip to content

Commit 9bb1ef4

Browse files
add env variable to adjust Ult iteration timeout
env variable: NEO_ULT_ITERATION_MAX_TIME Signed-off-by: Artur Harasimiuk <[email protected]>
1 parent 00c41e3 commit 9bb1ef4

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

manifests/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ components:
2020
infra:
2121
branch: master
2222
dest_dir: infra
23-
revision: 35e258616d586f6316c8a58b620340a44c59e6b3
23+
revision: abbb148d208878fdabeb2220421c172d5196244d
2424
type: git
2525
internal:
2626
branch: master

opencl/test/unit_test/main.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,12 @@ int main(int argc, char **argv) {
433433

434434
//ULTs timeout
435435
if (enable_alarm) {
436-
unsigned int alarmTime = NEO::ultIterationMaxTime * ::testing::GTEST_FLAG(repeat);
436+
auto currentUltIterationMaxTime = NEO::ultIterationMaxTime;
437+
auto ultIterationMaxTimeEnv = getenv("NEO_ULT_ITERATION_MAX_TIME");
438+
if (ultIterationMaxTimeEnv != nullptr) {
439+
currentUltIterationMaxTime = atoi(ultIterationMaxTimeEnv);
440+
}
441+
unsigned int alarmTime = currentUltIterationMaxTime * ::testing::GTEST_FLAG(repeat);
437442

438443
struct sigaction sa;
439444
sa.sa_handler = &handle_SIGALRM;

shared/test/unit_test/main.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,12 @@ int main(int argc, char **argv) {
401401
#if defined(__linux__)
402402
//ULTs timeout
403403
if (enable_alarm) {
404-
unsigned int alarmTime = NEO::ultIterationMaxTime * ::testing::GTEST_FLAG(repeat);
404+
auto currentUltIterationMaxTime = NEO::ultIterationMaxTime;
405+
auto ultIterationMaxTimeEnv = getenv("NEO_ULT_ITERATION_MAX_TIME");
406+
if (ultIterationMaxTimeEnv != nullptr) {
407+
currentUltIterationMaxTime = atoi(ultIterationMaxTimeEnv);
408+
}
409+
unsigned int alarmTime = currentUltIterationMaxTime * ::testing::GTEST_FLAG(repeat);
405410

406411
struct sigaction sa;
407412
sa.sa_handler = &handle_SIGALRM;

0 commit comments

Comments
 (0)