Skip to content

Commit bac4186

Browse files
committed
[MERGE #5294 @dilijev] OS#16539423: rl -timeout <seconds> now only overrrides the XML timeout if -timeout is longer.
Merge pull request #5294 from dilijev:fix-rl-timeout
2 parents f8e9e55 + 2f6e467 commit bac4186

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

bin/rl/rl.cpp

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3573,14 +3573,14 @@ GetTestInfoFromNode
35733573

35743574
if (childNode->Data != NULL && childNode->Data[0] != '\0')
35753575
{
3576-
char * data = childNode->Data;
3577-
if (i == TIK_SOURCE_PATH && IsRelativePath(childNode->Data))
3578-
{
3579-
// Make sure sourcepath is not relative, if relative make it full path
3580-
data = MakeFullPath(fileName, data);
3581-
ASSERT(data != NULL);
3582-
}
3583-
testInfo->data[i] = data;
3576+
char * data = childNode->Data;
3577+
if (i == TIK_SOURCE_PATH && IsRelativePath(childNode->Data))
3578+
{
3579+
// Make sure sourcepath is not relative, if relative make it full path
3580+
data = MakeFullPath(fileName, data);
3581+
ASSERT(data != NULL);
3582+
}
3583+
testInfo->data[i] = data;
35843584
}
35853585
else
35863586
{
@@ -3592,18 +3592,20 @@ GetTestInfoFromNode
35923592
// Validate the timeout string now to fail early so we don't run any tests when there is an error.
35933593
if (!IsTimeoutStringValid(testInfo->data[i])) {
35943594
CFG_ERROR_EX(fileName, node->LineNumber,
3595-
"Invalid timeout specified. Cannot parse or too large.\n", NULL);
3595+
"Invalid timeout specified. Cannot parse or too large.\n", NULL);
35963596
childNode->Dump();
35973597
return FALSE;
35983598
}
3599-
36003599
}
36013600
}
36023601
}
36033602
if (i == TIK_TIMEOUT && TestTimeout != NULL)
36043603
{
3605-
// Overriding the timeout value with the command line value
3606-
testInfo->data[i] = TestTimeout;
3604+
// Overriding the timeout value with the command line value (if the command line value is larger)
3605+
if (testInfo->data[i] < TestTimeout)
3606+
{
3607+
testInfo->data[i] = TestTimeout;
3608+
}
36073609
}
36083610
}
36093611

0 commit comments

Comments
 (0)