diff options
author | Steve Bennett <steveb@workware.net.au> | 2017-11-25 10:32:41 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2017-11-25 10:33:45 +1000 |
commit | 0ed921a607a37699c46834a39ab39534cb9eda15 (patch) | |
tree | 451ce92d690340ba7c705adc24ebc6a70d482003 /tests/event.test | |
parent | c9badb5105f12fd1b16ba22093b86c0637183a2c (diff) | |
download | jimtcl-0ed921a607a37699c46834a39ab39534cb9eda15.zip jimtcl-0ed921a607a37699c46834a39ab39534cb9eda15.tar.gz jimtcl-0ed921a607a37699c46834a39ab39534cb9eda15.tar.bz2 |
tests: If ipv6 sockets can't be bound, don't test
This is a workaround for IPv6 tests failing on Travis
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests/event.test')
-rw-r--r-- | tests/event.test | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tests/event.test b/tests/event.test index 096f21b..6f7b729 100644 --- a/tests/event.test +++ b/tests/event.test @@ -15,8 +15,21 @@ needs cmd after eventloop testConstraint socket [expr {[info commands socket] ne ""}] testConstraint exec [expr {[info commands exec] ne ""}] testConstraint signal [expr {[info commands signal] ne ""}] -catch {[socket -ipv6 stream ::1:5000]} ipv6res -testConstraint ipv6 [expr {$ipv6res ne "ipv6 not supported"}] +catch {[socket -ipv6 stream ::1:5000]} res +set ipv6 1 +if {[string match "*not supported" $res]} { + set ipv6 0 +} else { + # Also, if we can't bind an IPv6 socket, don't run IPv6 tests + if {[catch { + [socket -ipv6 stream.server ::1:5000] close + } msg opts]} { + puts msg=$msg + parray opts + set ipv6 0 + } +} +testConstraint ipv6 $ipv6 test event-5.1 {Tcl_BackgroundError, HandleBgErrors procedures} jim { catch {rename bgerror {}} |