File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -3537,6 +3537,19 @@ IsTimeoutStringValid(const char *strTimeout) {
3537
3537
return TRUE ;
3538
3538
}
3539
3539
3540
+ uint32 GetTimeoutValue (const char *strTimeout)
3541
+ {
3542
+ if (strTimeout == nullptr )
3543
+ {
3544
+ return 0 ;
3545
+ }
3546
+
3547
+ char *end = nullptr ;
3548
+ _set_errno (0 );
3549
+ uint32 secTimeout = strtoul (strTimeout, &end, 10 );
3550
+ return secTimeout;
3551
+ }
3552
+
3540
3553
BOOL
3541
3554
GetTestInfoFromNode
3542
3555
(
@@ -3592,17 +3605,20 @@ GetTestInfoFromNode
3592
3605
// Validate the timeout string now to fail early so we don't run any tests when there is an error.
3593
3606
if (!IsTimeoutStringValid (testInfo->data [i])) {
3594
3607
CFG_ERROR_EX (fileName, node->LineNumber ,
3595
- " Invalid timeout specified. Cannot parse or too large.\n " , NULL );
3608
+ " Invalid timeout specified. Cannot parse or too large.\n " , NULL );
3596
3609
childNode->Dump ();
3597
3610
return FALSE ;
3598
3611
}
3599
3612
}
3600
3613
}
3601
3614
}
3602
- if (i == TIK_TIMEOUT && TestTimeout != NULL )
3615
+
3616
+ if (i == TIK_TIMEOUT && TestTimeout != nullptr )
3603
3617
{
3604
3618
// Overriding the timeout value with the command line value (if the command line value is larger)
3605
- if (testInfo->data [i] < TestTimeout)
3619
+ uint32 xmlTimeoutValue = GetTimeoutValue (testInfo->data [i]);
3620
+ uint32 testTimeoutValue = GetTimeoutValue (TestTimeout);
3621
+ if (xmlTimeoutValue < testTimeoutValue)
3606
3622
{
3607
3623
testInfo->data [i] = TestTimeout;
3608
3624
}
You can’t perform that action at this time.
0 commit comments