From eba8349b2c75c6244f5cbe33088c90eec93c4323 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 27 Aug 2019 11:37:19 +0000 Subject: Backport two knownMsvcBug markers, which hit us (again) on Travis. --- tests/cmdMZ.test | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test index 45d68b3..93bd6b1 100644 --- a/tests/cmdMZ.test +++ b/tests/cmdMZ.test @@ -28,6 +28,8 @@ namespace eval ::tcl::test::cmdMZ { namespace import ::tcl::unsupported::timerate } + testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}] + # Tcl_PwdObjCmd test cmdMZ-1.1 {Tcl_PwdObjCmd} { @@ -162,7 +164,7 @@ test cmdMZ-return-2.15 {return opton handling} -setup { } -cleanup { rename p {} } -result {1 c {a b}} - + test cmdMZ-return-2.16 {return opton handling} -setup { proc p {} { return -code error -errorcode [list a b] c @@ -172,7 +174,7 @@ test cmdMZ-return-2.16 {return opton handling} -setup { } -cleanup { rename p {} } -result {1 c {a b}} - + test cmdMZ-return-2.17 {return opton handling} -setup { proc p {} { return -code error -errorcode a\ b c @@ -182,7 +184,7 @@ test cmdMZ-return-2.17 {return opton handling} -setup { } -cleanup { rename p {} } -result {1 c {a b}} - + # Check that the result of a [return -options $opts $result] is # indistinguishable from that of the originally caught script, no @@ -301,7 +303,7 @@ test cmdMZ-4.10 {Tcl_SplitObjCmd: basic split commands} { foreach f [split {]\n} {}] { append x $f } - return $x + return $x } foo } {]\n} @@ -325,7 +327,7 @@ test cmdMZ-4.13 {Tcl_SplitObjCmd: basic split commands} { # The tests for Tcl_SubstObjCmd are in subst.test # The tests for Tcl_SwitchObjCmd are in switch.test -# todo: rewrite this if monotonic clock is provided resp. command "after" +# todo: rewrite this if monotonic clock is provided resp. command "after" # gets microsecond accuracy (RFE [fdfbd5e10] gets merged): proc _nrt_sleep {msec} { set usec [expr {$msec * 1000}] @@ -348,7 +350,7 @@ test cmdMZ-5.4 {Tcl_TimeObjCmd: nothing happens with negative iteration counts} test cmdMZ-5.5 {Tcl_TimeObjCmd: result format} { regexp {^\d+ microseconds per iteration} [time {format 1}] } 1 -test cmdMZ-5.6 {Tcl_TimeObjCmd: slower commands take longer} { +test cmdMZ-5.6 {Tcl_TimeObjCmd: slower commands take longer} knownMsvcBug { expr {[lindex [time {_nrt_sleep 1}] 0] < [lindex [time {_nrt_sleep 20}] 0]} } 1 test cmdMZ-5.7 {Tcl_TimeObjCmd: errors generate right trace} { @@ -401,7 +403,7 @@ test cmdMZ-6.5a {Tcl_TimeRateObjCmd: result format and one iteration} { test cmdMZ-6.5b {Tcl_TimeRateObjCmd: result format without iterations} { regexp {^0 \ws/# 0 # 0 #/sec 0 net-ms$} [timerate {} 0 0] } 1 -test cmdMZ-6.6 {Tcl_TimeRateObjCmd: slower commands take longer, but it remains almost the same time of measument} { +test cmdMZ-6.6 {Tcl_TimeRateObjCmd: slower commands take longer, but it remains almost the same time of measument} knownMsvcBug { set m1 [timerate {_nrt_sleep 0} 20] set m2 [timerate {_nrt_sleep 0.2} 20] list \ -- cgit v0.12 From ac370c9a7305ebde8a9d3439fa5260e925d3bba3 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 27 Aug 2019 11:53:43 +0000 Subject: One more knownMsvcBug marker (seen in Travis). Properly export ::tcltest::testConstraint in cmdMZ.test --- tests/cmdMZ.test | 1 + tests/io.test | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test index 93bd6b1..98cb0fb 100644 --- a/tests/cmdMZ.test +++ b/tests/cmdMZ.test @@ -22,6 +22,7 @@ namespace eval ::tcl::test::cmdMZ { namespace import ::tcltest::makeFile namespace import ::tcltest::removeFile namespace import ::tcltest::temporaryDirectory + namespace import ::tcltest::testConstraint namespace import ::tcltest::test if {[namespace which -command ::tcl::unsupported::timerate] ne ""} { diff --git a/tests/io.test b/tests/io.test index 0703ee2..13ff38c 100644 --- a/tests/io.test +++ b/tests/io.test @@ -7893,7 +7893,7 @@ test io-53.15 {[ed29c4da21] DoRead: fblocked seen as error} -setup { removeFile out } -result 100 -test io-54.1 {Recursive channel events} {socket fileevent} { +test io-54.1 {Recursive channel events} {socket fileevent knownMsvcBug} { # This test checks to see if file events are delivered during recursive # event loops when there is buffered data on the channel. -- cgit v0.12