From 364ba5e8b94ce0664b5fbb16c62fdc9fc60fdc4c Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 6 Dec 2019 14:51:39 +0000 Subject: Exclude some test-cases with possible timing problems on Windows. Double ;; in generic/tclTimer.c --- generic/tclTimer.c | 2 +- tests/clock.test | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/generic/tclTimer.c b/generic/tclTimer.c index 33838ec..c4d22ce 100644 --- a/generic/tclTimer.c +++ b/generic/tclTimer.c @@ -882,7 +882,7 @@ Tcl_AfterObjCmd( if (objc == 3) { commandPtr = objv[2]; } else { - commandPtr = Tcl_ConcatObj(objc-2, objv+2);; + commandPtr = Tcl_ConcatObj(objc-2, objv+2); } command = Tcl_GetStringFromObj(commandPtr, &length); for (afterPtr = assocPtr->firstAfterPtr; afterPtr != NULL; diff --git a/tests/clock.test b/tests/clock.test index f6cba28..265feed 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -31,6 +31,7 @@ testConstraint detroit \ [expr {![catch {clock format 0 -timezone :America/Detroit -format %z}]}] testConstraint y2038 \ [expr {[clock format 2158894800 -format %z -timezone :America/Detroit] eq {-0400}}] +testConstraint knownWindowsTimingProblem [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}] # TEST PLAN @@ -35438,7 +35439,7 @@ test clock-33.4a {clock milliseconds} { expr { [clock milliseconds] + 1 } concat {} } {} -test clock-33.5 {clock clicks tests, millisecond timing test} { +test clock-33.5 {clock clicks tests, millisecond timing test} knownWindowsTimingProblem { # This test can fail on a system that is so heavily loaded that # the test takes >60 ms to run. set start [clock clicks -milli] @@ -35450,7 +35451,7 @@ test clock-33.5 {clock clicks tests, millisecond timing test} { "ok" : "test should have taken 0-60 ms, actually took [expr $end - $start]"} } {ok} -test clock-33.5a {clock tests, millisecond timing test} { +test clock-33.5a {clock tests, millisecond timing test} knownWindowsTimingProblem { # This test can fail on a system that is so heavily loaded that # the test takes >60 ms to run. set start [clock milliseconds] @@ -35469,7 +35470,7 @@ test clock-33.7 {clock clicks, milli with too much abbreviation} { list [catch { clock clicks - } msg] $msg } {1 {ambiguous option "-": must be -milliseconds or -microseconds}} -test clock-33.8 {clock clicks test, microsecond timing test} { +test clock-33.8 {clock clicks test, microsecond timing test} knownWindowsTimingProblem { # This test can fail on a system that is so heavily loaded that # the test takes >60 ms to run. set start [clock clicks -micro] @@ -35477,7 +35478,7 @@ test clock-33.8 {clock clicks test, microsecond timing test} { set end [clock clicks -micro] expr {($end > $start) && (($end - $start) <= 60000)} } {1} -test clock-33.8a {clock test, microsecond timing test} { +test clock-33.8a {clock test, microsecond timing test} knownWindowsTimingProblem { # This test can fail on a system that is so heavily loaded that # the test takes >60 ms to run. set start [clock microseconds] -- cgit v0.12