summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-11-19 08:57:49 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-11-19 08:57:49 (GMT)
commit14ec7c1d858d00e7c69c80c28cf599095dd3feaf (patch)
treec1bbe67b99dbfd4a521682975956b358f53f7bb2 /tests
parent72c49f69099c98bd55334dbad3d68645c72bc707 (diff)
parent8e1f957a669b2f4b84dca7e8a27f2985c0625172 (diff)
downloadtcl-14ec7c1d858d00e7c69c80c28cf599095dd3feaf.zip
tcl-14ec7c1d858d00e7c69c80c28cf599095dd3feaf.tar.gz
tcl-14ec7c1d858d00e7c69c80c28cf599095dd3feaf.tar.bz2
Merge 8.7
Diffstat (limited to 'tests')
-rw-r--r--tests/async.test2
-rw-r--r--tests/binary.test11
-rw-r--r--tests/chanio.test7
-rw-r--r--tests/cmdAH.test2
-rw-r--r--tests/exec.test7
-rw-r--r--tests/fCmd.test7
-rw-r--r--tests/fileName.test2
-rw-r--r--tests/fileSystem.test8
-rw-r--r--tests/format.test5
-rw-r--r--tests/httpcookie.test7
-rw-r--r--tests/io.test11
-rw-r--r--tests/registry.test2
-rw-r--r--tests/socket.test12
-rw-r--r--tests/utf.test12
-rw-r--r--tests/winDde.test2
-rw-r--r--tests/winFCmd.test42
-rw-r--r--tests/winFile.test2
-rw-r--r--tests/winPipe.test2
-rw-r--r--tests/winTime.test6
19 files changed, 89 insertions, 60 deletions
diff --git a/tests/async.test b/tests/async.test
index 642e295..553735b 100644
--- a/tests/async.test
+++ b/tests/async.test
@@ -20,7 +20,7 @@ if {"::tcltest" ni [namespace children]} {
catch [list package require -exact tcl::test [info patchlevel]]
testConstraint testasync [llength [info commands testasync]]
-testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
+testConstraint knownMsvcBug [expr {![info exists ::env(CI_BUILD_WITH_MSVC)]}]
proc async1 {result code} {
global aresult acode
diff --git a/tests/binary.test b/tests/binary.test
index cf3195f..7433fe8 100644
--- a/tests/binary.test
+++ b/tests/binary.test
@@ -759,7 +759,16 @@ test binary-21.12 {Tcl_BinaryObjCmd: scan} -setup {
} -body {
list [binary scan "abc def \x00ghi " A* arg1] $arg1
} -result [list 1 "abc def \x00ghi"]
-
+test binary-21.13 {Tcl_BinaryObjCmd: scan} -setup {
+ unset -nocomplain arg1
+} -body {
+ list [binary scan "abc def \x00 " C* arg1] $arg1
+} -result {1 {abc def }}
+test binary-21.12 {Tcl_BinaryObjCmd: scan} -setup {
+ unset -nocomplain arg1
+} -body {
+ list [binary scan "abc def \x00ghi" C* arg1] $arg1
+} -result {1 {abc def }}
test binary-22.1 {Tcl_BinaryObjCmd: scan} -returnCodes error -body {
binary scan abc b
} -result {not enough arguments for all format specifiers}
diff --git a/tests/chanio.test b/tests/chanio.test
index 8e46e88..16244e2 100644
--- a/tests/chanio.test
+++ b/tests/chanio.test
@@ -47,7 +47,8 @@ namespace eval ::tcl::test::io {
testConstraint testchannelevent [llength [info commands testchannelevent]]
testConstraint testmainthread [llength [info commands testmainthread]]
testConstraint testservicemode [llength [info commands testservicemode]]
- testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
+ testConstraint notWinCI [expr {
+ $::tcl_platform(platform) ne "windows" || ![info exists ::env(CI)]}]
testConstraint notOSX [expr {$::tcl_platform(os) ne "Darwin"}]
# You need a *very* special environment to do some tests. In particular,
@@ -1886,7 +1887,7 @@ test chan-io-20.3 {Tcl_CreateChannel: initial settings} -constraints {unix} -bod
} -result {{{} {}} {auto lf}}
test chan-io-20.5 {Tcl_CreateChannel: install channel in empty slot} -setup {
set path(stdout) [makeFile {} stdout]
-} -constraints {stdio knownMsvcBug} -body {
+} -constraints {stdio notWinCI} -body {
set f [open $path(script) w]
chan puts -nonewline $f {
chan close stdout
@@ -2796,7 +2797,7 @@ test chan-io-29.34 {Tcl_Chan Close, async flush on chan close, using sockets} -s
chan puts $s $l
}
}
-} -constraints {socket tempNotMac fileevent knownMsvcBug} -body {
+} -constraints {socket tempNotMac fileevent notWinCI} -body {
proc accept {s a p} {
variable x
chan event $s readable [namespace code [list readit $s]]
diff --git a/tests/cmdAH.test b/tests/cmdAH.test
index 67c49c7..8c83660 100644
--- a/tests/cmdAH.test
+++ b/tests/cmdAH.test
@@ -30,7 +30,7 @@ testConstraint linkDirectory [expr {
($::tcl_platform(osVersion) >= 5.0
&& [lindex [file system [temporaryDirectory]] 1] eq "NTFS")
}]
-testConstraint notWine [expr {$::tcl_platform(platform) ne "windows" || ![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint notWine [expr {![info exists ::env(CI_USING_WINE)]}]
global env
set cmdAHwd [pwd]
diff --git a/tests/exec.test b/tests/exec.test
index 458e12a..83241a9 100644
--- a/tests/exec.test
+++ b/tests/exec.test
@@ -26,7 +26,8 @@ package require tcltests
# All tests require the "exec" command.
# Skip them if exec is not defined.
testConstraint exec [llength [info commands exec]]
-testConstraint noosx [expr {![info exists ::env(TRAVIS_OSX_IMAGE)] || ![string match xcode* $::env(TRAVIS_OSX_IMAGE)]}]
+# Some skips when running in a macOS CI environment
+testConstraint noosxCI [expr {![info exists ::env(MAC_CI)]}]
unset -nocomplain path
@@ -673,7 +674,9 @@ test exec-18.2 {exec cat deals with weird file names} -body {
# Note that this test cannot be adapted to work on Windows; that platform has
# no kernel support for an analog of O_APPEND. OTOH, that means we can assume
# that there is a POSIX shell...
-test exec-19.1 {exec >> uses O_APPEND} -constraints {exec unix notValgrind noosx} -setup {
+#
+# This test also fails in some cases when building with macOS
+test exec-19.1 {exec >> uses O_APPEND} -constraints {exec unix notValgrind noosxCI} -setup {
set tmpfile [makeFile {0} tmpfile.exec-19.1]
} -body {
# Note that we have to allow for the current contents of the temporary
diff --git a/tests/fCmd.test b/tests/fCmd.test
index 986e2f4..ac8cfb5 100644
--- a/tests/fCmd.test
+++ b/tests/fCmd.test
@@ -41,7 +41,7 @@ if {[testConstraint win]} {
testConstraint reg 1
}
}
-testConstraint notWine [expr {$::tcl_platform(platform) ne "windows" || ![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint notCI [expr {![info exists ::env(CI)] || !$::env(CI)}]
set tmpspace /tmp;# default value
# Find a group that exists on this Unix system, or else skip tests that
@@ -79,6 +79,7 @@ testConstraint darwin9 [expr {
&& [package vsatisfies 1.$::tcl_platform(osVersion) 1.9]
}]
testConstraint notDarwin9 [expr {![testConstraint darwin9]}]
+testConstraint notContinuousIntegration [expr {![info exists ::env(CI)]}]
testConstraint fileSharing 0
testConstraint notFileSharing 1
@@ -2581,7 +2582,9 @@ test fCmd-30.2 {file readable on 'NTUSER.DAT'} -constraints {win notWine} -body
&& [file exists $env(USERPROFILE)/NTUSER.DAT]
&& [file readable $env(USERPROFILE)/NTUSER.DAT]}
} -result {1}
-test fCmd-30.3 {file readable on 'pagefile.sys'} -constraints {win notWine} -body {
+# At least one CI environment (GitHub Actions) is set up with the page file in
+# an unusual location; skip the test if that is so.
+test fCmd-30.3 {file readable on 'pagefile.sys'} -constraints {win notCI} -body {
set r {}
if {[info exists env(SystemDrive)]} {
set path $env(SystemDrive)/pagefile.sys
diff --git a/tests/fileName.test b/tests/fileName.test
index bef5a22..8be4fdd 100644
--- a/tests/fileName.test
+++ b/tests/fileName.test
@@ -31,7 +31,7 @@ if {[testConstraint win]} {
testConstraint symbolicLinkFile 0
testConstraint sharedCdrive [expr {![catch {cd //[info hostname]/c}]}]
}
-testConstraint notWine [expr {$::tcl_platform(platform) ne "windows" || ![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint notWine [expr {![info exists ::env(CI_USING_WINE)]}]
# This match compares the first two words of the result. If the wanted result
# is "equal", then this is successful if the words are equal. If the wanted
# result is "not equal", then this is successful if the words are different.
diff --git a/tests/fileSystem.test b/tests/fileSystem.test
index 93a3f51..a6fa645 100644
--- a/tests/fileSystem.test
+++ b/tests/fileSystem.test
@@ -37,7 +37,9 @@ catch {
testConstraint testfilesystem [llength [info commands ::testfilesystem]]
testConstraint testsetplatform [llength [info commands ::testsetplatform]]
testConstraint testsimplefilesystem [llength [info commands ::testsimplefilesystem]]
-testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
+# Some things fail under all Continuous Integration systems for subtle reasons
+# such as CI often running with elevated privileges in a container.
+testConstraint notInCIenv [expr {![info exists ::env(CI)]}]
cd [tcltest::temporaryDirectory]
makeFile "test file" gorp.file
@@ -316,7 +318,7 @@ test filesystem-1.37 {file normalisation with '/./'} -body {
} -match regexp -result {^(?:[^/]|/(?:[^/]|$))+$}
test filesystem-1.38 {file normalisation with volume relative} -setup {
set dir [pwd]
-} -constraints {win moreThanOneDrive knownMsvcBug} -body {
+} -constraints {win moreThanOneDrive notInCIenv} -body {
set path "[string range [lindex $drives 0] 0 1]foo"
cd [lindex $drives 1]
file norm $path
@@ -565,7 +567,7 @@ test filesystem-7.1.1 {load from vfs} -setup {
cd [file dirname $::ddelib]
testsimplefilesystem 1
# This loads dde via a complex copy-to-temp operation
- load simplefs:/[file tail $::ddelib] dde
+ load simplefs:/[file tail $::ddelib] Dde
testsimplefilesystem 0
return ok
# The real result of this test is what happens when Tcl exits.
diff --git a/tests/format.test b/tests/format.test
index 8d6fd82..44fa64e 100644
--- a/tests/format.test
+++ b/tests/format.test
@@ -20,7 +20,10 @@ testConstraint longIs32bit [expr {$tcl_platform(wordSize) == 4}]
testConstraint longIs64bit [expr {$tcl_platform(wordSize) == 8}]
testConstraint wideIs64bit [expr {wide(0x8000000000000000) < 0}]
testConstraint pointerIs64bit [expr {$tcl_platform(pointerSize) >= 8}]
-testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
+# MSVC uses a broken libc that gets sprintf("%g") wrong. This is a pain
+# particularly in Continuous Integration, and there isn't anything much we can
+# do about it.
+testConstraint knownMsvcBug [expr {![info exists ::env(CI_BUILD_WITH_MSVC)]}]
test format-1.1 {integer formatting} {
format "%*d %d %d %d" 6 34 16923 -12 -1
diff --git a/tests/httpcookie.test b/tests/httpcookie.test
index ca54073..38a18bb 100644
--- a/tests/httpcookie.test
+++ b/tests/httpcookie.test
@@ -16,11 +16,8 @@ if {"::tcltest" ni [namespace children]} {
::tcltest::loadTestedCommands
-testConstraint notOSXtravis [apply {{} {
- upvar 1 env(TRAVIS_OSX_IMAGE) travis
- return [expr {![info exists travis] || ![string match xcode* $travis]}]
-}}]
-testConstraint sqlite3 [expr {[testConstraint notOSXtravis] && ![catch {
+testConstraint notMacCI [expr {![info exists ::env(MAC_CI)]}]
+testConstraint sqlite3 [expr {[testConstraint notMacCI] && ![catch {
package require sqlite3
}]}]
testConstraint cookiejar [expr {[testConstraint sqlite3] && ![catch {
diff --git a/tests/io.test b/tests/io.test
index 8379a09..0aa4ebf 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -43,7 +43,10 @@ testConstraint testchannelevent [llength [info commands testchannelevent]]
testConstraint testmainthread [llength [info commands testmainthread]]
testConstraint testobj [llength [info commands testobj]]
testConstraint testservicemode [llength [info commands testservicemode]]
-testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
+# Some things fail under Windows in Continuous Integration systems for subtle
+# reasons such as CI often running with elevated privileges in a container.
+testConstraint notWinCI [expr {
+ $::tcl_platform(platform) ne "windows" || ![info exists ::env(CI)]}]
testConstraint notOSX [expr {$::tcl_platform(os) ne "Darwin"}]
# You need a *very* special environment to do some tests. In
@@ -2230,7 +2233,7 @@ test io-27.5 {FlushChannel, implicit flush when buffer fills and on close} \
set path(pipe) [makeFile {} pipe]
set path(output) [makeFile {} output]
test io-27.6 {FlushChannel, async flushing, async close} \
- {stdio asyncPipeClose knownMsvcBug} {
+ {stdio asyncPipeClose notWinCI} {
# This test may fail on old Unix systems (seen on IRIX64 6.5) with
# obsolete gettimeofday() calls. See Tcl Bugs 3530533, 1942197.
file delete $path(pipe)
@@ -2834,7 +2837,7 @@ test io-29.31 {Tcl_WriteChars, background flush} stdio {
set result
} ok
test io-29.32 {Tcl_WriteChars, background flush to slow reader} \
- {stdio asyncPipeClose knownMsvcBug} {
+ {stdio asyncPipeClose notWinCI} {
# This test may fail on old Unix systems (seen on IRIX64 6.5) with
# obsolete gettimeofday() calls. See Tcl Bugs 3530533, 1942197.
file delete $path(pipe)
@@ -8132,7 +8135,7 @@ test io-53.17 {[7c187a3773] MBWrite: proper inQueueTail handling} -setup {
removeFile out
} -result {line 100 line}
-test io-54.1 {Recursive channel events} {socket fileevent knownMsvcBug} {
+test io-54.1 {Recursive channel events} {socket fileevent notWinCI} {
# This test checks to see if file events are delivered during recursive
# event loops when there is buffered data on the channel.
diff --git a/tests/registry.test b/tests/registry.test
index dbf4575..c1673b5 100644
--- a/tests/registry.test
+++ b/tests/registry.test
@@ -24,7 +24,7 @@ if {[testConstraint win]} {
testConstraint reg 1
}
}
-testConstraint notWine [expr {$::tcl_platform(platform) ne "windows" || ![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint notWine [expr {![info exists ::env(CI_USING_WINE)]}]
# determine the current locale
testConstraint english [expr {
diff --git a/tests/socket.test b/tests/socket.test
index 82f5968..0cb1411 100644
--- a/tests/socket.test
+++ b/tests/socket.test
@@ -69,15 +69,19 @@ if {"::tcltest" ni [namespace children]} {
catch [list package require -exact tcl::test [info patchlevel]]
::tcltest::loadTestedCommands
-if {[info exists ::env(TRAVIS_OSX_IMAGE)] && [string match xcode* $::env(TRAVIS_OSX_IMAGE)]} {
+# A bad interaction between socket creation, macOS, and unattended CI
+# environments make this whole file impractical to run; too many weird hangs.
+if {[info exists ::env(MAC_CI)]} {
return
}
-testConstraint notWine [expr {$::tcl_platform(platform) ne "windows" || ![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint notWine [expr {![info exists ::env(CI_USING_WINE)]}]
# Some tests require the Thread package or exec command
testConstraint thread [expr {0 == [catch {package require Thread 2.7-}]}]
testConstraint exec [llength [info commands exec]]
-testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
+testConstraint knownMsvcBug [expr {![info exists ::env(CI_BUILD_WITH_MSVC)]}]
+testConstraint notWinCI [expr {
+ $tcl_platform(platform) ne "windows" || ![info exists ::env(CI)]}]
# Produce a random port number in the Dynamic/Private range
# from 49152 through 65535.
@@ -2390,7 +2394,7 @@ test socket-14.10.1 {pending [socket -async] and nonblocking [puts], server is I
removeFile script
} -result {{} ok}
test socket-14.11.0 {pending [socket -async] and nonblocking [puts], no listener, no flush} \
- -constraints {socket knownMsvcBug} \
+ -constraints {socket notWinCI} \
-body {
set sock [socket -async localhost [randport]]
fconfigure $sock -blocking 0
diff --git a/tests/utf.test b/tests/utf.test
index eacff20..8c36b9a 100644
--- a/tests/utf.test
+++ b/tests/utf.test
@@ -253,8 +253,8 @@ test utf-6.22 {Tcl_UtfNext} {testutfnext testbytestring} {
testutfnext [testbytestring \xD0\xF8]
} 1
test utf-6.23 {Tcl_UtfNext} {testutfnext testbytestring} {
- testutfnext [testbytestring \xE8]
-} -1
+ testutfnext [testbytestring \xE8\x00]
+} 1
test utf-6.24 {Tcl_UtfNext} {testutfnext testbytestring} {
testutfnext [testbytestring \xE8]G
} 1
@@ -277,8 +277,8 @@ test utf-6.30.0 {Tcl_UtfNext} {testutfnext testbytestring ucs2_utf16} {
testutfnext [testbytestring \xF2]
} 1
test utf-6.30.1 {Tcl_UtfNext} {testutfnext testbytestring ucs4} {
- testutfnext [testbytestring \xF2]
-} -1
+ testutfnext [testbytestring \xF2\x00]
+} 1
test utf-6.31 {Tcl_UtfNext} {testutfnext testbytestring} {
testutfnext [testbytestring \xF2]G
} 1
@@ -286,8 +286,8 @@ test utf-6.32.0 {Tcl_UtfNext} {testutfnext testbytestring ucs2_utf16} {
testutfnext [testbytestring \xF2\xA0]
} 1
test utf-6.32.1 {Tcl_UtfNext} {testutfnext testbytestring ucs4} {
- testutfnext [testbytestring \xF2\xA0]
-} -1
+ testutfnext [testbytestring \xF2\xA0\x00]
+} 1
test utf-6.33 {Tcl_UtfNext} {testutfnext testbytestring} {
testutfnext [testbytestring \xF2\xD0]
} 1
diff --git a/tests/winDde.test b/tests/winDde.test
index 421578b..9d15357 100644
--- a/tests/winDde.test
+++ b/tests/winDde.test
@@ -24,7 +24,7 @@ if {[testConstraint win]} {
testConstraint dde 1
}
}
-testConstraint notWine [expr {$::tcl_platform(platform) ne "windows" || ![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint notWine [expr {![info exists ::env(CI_USING_WINE)]}]
# -------------------------------------------------------------------------
diff --git a/tests/winFCmd.test b/tests/winFCmd.test
index c390de3..dcc3d67 100644
--- a/tests/winFCmd.test
+++ b/tests/winFCmd.test
@@ -28,8 +28,10 @@ testConstraint testchmod [llength [info commands testchmod]]
testConstraint cdrom 0
testConstraint exdev 0
testConstraint longFileNames 0
-testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
-testConstraint notWine [expr {$::tcl_platform(platform) ne "windows" || ![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+# Some things fail under all Continuous Integration systems for subtle reasons
+# such as CI often running with elevated privileges in a container.
+testConstraint notInCIenv [expr {![info exists ::env(CI)]}]
+testConstraint knownMsvcBug [expr {![info exists ::env(CI_BUILD_WITH_MSVC)]}]
proc createfile {file {string a}} {
set f [open $file w]
@@ -133,25 +135,25 @@ test winFCmd-1.1 {TclpRenameFile: errno: EACCES} -body {
} -constraints {win cdrom testfile} -returnCodes error -result EACCES
test winFCmd-1.2 {TclpRenameFile: errno: EEXIST} -setup {
cleanup
-} -constraints {win testfile notWine} -body {
+} -constraints {win testfile notInCIenv} -body {
file mkdir td1/td2/td3
file mkdir td2
testfile mv td2 td1/td2
} -returnCodes error -result EEXIST
test winFCmd-1.3 {TclpRenameFile: errno: EINVAL} -setup {
cleanup
-} -constraints {win testfile notWine} -body {
+} -constraints {win testfile notInCIenv} -body {
testfile mv / td1
} -returnCodes error -result EINVAL
test winFCmd-1.4 {TclpRenameFile: errno: EINVAL} -setup {
cleanup
-} -constraints {win testfile notWine} -body {
+} -constraints {win testfile notInCIenv} -body {
file mkdir td1
testfile mv td1 td1/td2
} -returnCodes error -result EINVAL
test winFCmd-1.5 {TclpRenameFile: errno: EISDIR} -setup {
cleanup
-} -constraints {win testfile notWine} -body {
+} -constraints {win testfile notInCIenv} -body {
file mkdir td1
createfile tf1
testfile mv tf1 td1
@@ -256,7 +258,7 @@ test winFCmd-1.22 {TclpRenameFile: long dst} -setup {
} -returnCodes error -result ENAMETOOLONG
test winFCmd-1.23 {TclpRenameFile: move dir into self} -setup {
cleanup
-} -constraints {win testfile notWine} -body {
+} -constraints {win testfile notInCIenv} -body {
file mkdir td1
testfile mv [pwd]/td1 td1/td2
} -returnCodes error -result EINVAL
@@ -301,21 +303,21 @@ test winFCmd-1.29 {TclpRenameFile: src is dir} -setup {
} -returnCodes error -result ENOTDIR
test winFCmd-1.30 {TclpRenameFile: dst is dir} -setup {
cleanup
-} -constraints {win testfile notWine} -body {
+} -constraints {win testfile notInCIenv} -body {
file mkdir td1
file mkdir td2/td2
testfile mv td1 td2
} -returnCodes error -result EEXIST
test winFCmd-1.31 {TclpRenameFile: TclpRemoveDirectory fails} -setup {
cleanup
-} -constraints {win testfile notWine} -body {
+} -constraints {win testfile notInCIenv} -body {
file mkdir td1
file mkdir td2/td2
testfile mv td1 td2
} -returnCodes error -result EEXIST
test winFCmd-1.32 {TclpRenameFile: TclpRemoveDirectory succeeds} -setup {
cleanup
-} -constraints {win testfile notWine} -body {
+} -constraints {win testfile notInCIenv} -body {
file mkdir td1/td2
file mkdir td2
testfile mv td1 td2
@@ -344,7 +346,7 @@ test winFCmd-1.34 {TclpRenameFile: src is dir, dst is not} -setup {
} -returnCodes error -result ENOTDIR
test winFCmd-1.35 {TclpRenameFile: src is not dir, dst is} -setup {
cleanup
-} -constraints {win testfile notWine} -body {
+} -constraints {win testfile notInCIenv} -body {
file mkdir td1
createfile tf1
testfile mv tf1 td1
@@ -395,7 +397,7 @@ proc MakeFiles {dirname} {
test winFCmd-1.38 {TclpRenameFile: check rename of conflicting inodes} -setup {
cleanup
-} -constraints {win winNonZeroInodes knownMsvcBug notWine} -body {
+} -constraints {win winNonZeroInodes knownMsvcBug notInCIenv} -body {
file mkdir td1
foreach {a b} [MakeFiles td1] break
file rename -force $a $b
@@ -640,7 +642,7 @@ test winFCmd-5.1 {TclpCopyDirectory: calls TraverseWinTree} -setup {
test winFCmd-6.1 {TclpRemoveDirectory: errno: EACCES} -setup {
cleanup
-} -constraints {winVista testfile testchmod knownMsvcBug notWine} -body {
+} -constraints {winVista testfile testchmod knownMsvcBug notInCIenv} -body {
file mkdir td1
testchmod 0 td1
testfile rmdir td1
@@ -694,7 +696,7 @@ test winFCmd-6.8 {TclpRemoveDirectory: RemoveDirectory fails} -setup {
} -result {1 {tf1 ENOTDIR}}
test winFCmd-6.9 {TclpRemoveDirectory: errno == EACCES} -setup {
cleanup
-} -constraints {winVista testfile testchmod knownMsvcBug notWine} -body {
+} -constraints {winVista testfile testchmod knownMsvcBug notInCIenv} -body {
file mkdir td1
testchmod 0 td1
testfile rmdir td1
@@ -705,14 +707,14 @@ test winFCmd-6.9 {TclpRemoveDirectory: errno == EACCES} -setup {
} -result {td1 EACCES}
test winFCmd-6.11 {TclpRemoveDirectory: attr == -1} -setup {
cleanup
-} -constraints {win testfile notWine} -body {
+} -constraints {win testfile notInCIenv} -body {
testfile rmdir /
# WinXP returns EEXIST, WinNT seems to return EACCES. No policy
# decision has been made as to which is correct.
} -returnCodes error -match regexp -result {^/ E(ACCES|EXIST)$}
test winFCmd-6.13 {TclpRemoveDirectory: write-protected} -setup {
cleanup
-} -constraints {winVista testfile testchmod knownMsvcBug notWine} -body {
+} -constraints {winVista testfile testchmod knownMsvcBug notInCIenv} -body {
file mkdir td1
testchmod 0 td1
testfile rmdir td1
@@ -941,7 +943,7 @@ test winFCmd-9.1 {TraversalDelete: DOTREE_F} -setup {
} -result {}
test winFCmd-9.3 {TraversalDelete: DOTREE_PRED} -setup {
cleanup
-} -constraints {winVista testfile testchmod knownMsvcBug notWine} -body {
+} -constraints {winVista testfile testchmod knownMsvcBug notInCIenv} -body {
file mkdir td1/td2
testchmod 0 td1
testfile rmdir -force td1
@@ -1130,7 +1132,7 @@ test winFCmd-15.2 {SetWinFileAttributes - archive} -constraints {win} -setup {
} -cleanup {
cleanup
} -result {{} 1}
-test winFCmd-15.3 {SetWinFileAttributes - archive} -constraints {win notWine} -setup {
+test winFCmd-15.3 {SetWinFileAttributes - archive} -constraints {win notInCIenv} -setup {
cleanup
} -body {
createfile td1 {}
@@ -1138,7 +1140,7 @@ test winFCmd-15.3 {SetWinFileAttributes - archive} -constraints {win notWine} -s
} -cleanup {
cleanup
} -result {{} 0}
-test winFCmd-15.4 {SetWinFileAttributes - hidden} -constraints {win notWine} -setup {
+test winFCmd-15.4 {SetWinFileAttributes - hidden} -constraints {win notInCIenv} -setup {
cleanup
} -body {
createfile td1 {}
@@ -1171,7 +1173,7 @@ test winFCmd-15.7 {SetWinFileAttributes - readonly} -setup {
} -cleanup {
cleanup
} -result {{} 0}
-test winFCmd-15.8 {SetWinFileAttributes - system} -constraints {win notWine} -setup {
+test winFCmd-15.8 {SetWinFileAttributes - system} -constraints {win notInCIenv} -setup {
cleanup
} -body {
createfile td1 {}
diff --git a/tests/winFile.test b/tests/winFile.test
index 07bee07..357195e 100644
--- a/tests/winFile.test
+++ b/tests/winFile.test
@@ -24,7 +24,7 @@ testConstraint notNTFS 0
if {[testConstraint testvolumetype]} {
testConstraint notNTFS [expr {[testvolumetype] eq "NTFS"}]
}
-testConstraint notWine [expr {$::tcl_platform(platform) ne "windows" || ![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint notWine [expr {![info exists ::env(CI_USING_WINE)]}]
test winFile-1.1 {TclpGetUserHome} -constraints {win} -body {
glob ~nosuchuser
diff --git a/tests/winPipe.test b/tests/winPipe.test
index d35373a..25b5517 100644
--- a/tests/winPipe.test
+++ b/tests/winPipe.test
@@ -28,7 +28,7 @@ set org_pwd [pwd]
set bindir [file join $org_pwd [file dirname [info nameofexecutable]]]
set cat32 [file join $bindir cat32.exe]
-testConstraint notWine [expr {$::tcl_platform(platform) ne "windows" || ![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint notWine [expr {![info exists ::env(CI_USING_WINE)]}]
# several test-cases here expect current directory == [temporaryDirectory]:
diff --git a/tests/winTime.test b/tests/winTime.test
index c03e316..12d9b2d 100644
--- a/tests/winTime.test
+++ b/tests/winTime.test
@@ -19,7 +19,9 @@ if {"::tcltest" ni [namespace children]} {
catch [list package require -exact tcl::test [info patchlevel]]
testConstraint testwinclock [llength [info commands testwinclock]]
-testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
+# Some things fail under all Continuous Integration systems for subtle reasons
+# such as CI often running with elevated privileges in a container.
+testConstraint notInCIenv [expr {![info exists ::env(CI)]}]
# The next two tests will crash on Windows if the check for negative
# clock values is not done properly.
@@ -41,7 +43,7 @@ test winTime-1.2 {TclpGetDate} {win} {
# with the Windows clock. 30 sec really isn't enough,
# but how much time does a tester have patience for?
-test winTime-2.1 {Synchronization of Tcl and Windows clocks} {testwinclock knownMsvcBug} {
+test winTime-2.1 {Synchronization of Tcl and Windows clocks} {testwinclock notInCIenv} {
# May fail due to OS/hardware discrepancies. See:
# http://support.microsoft.com/default.aspx?scid=kb;en-us;274323
set failed {}