File tree Expand file tree Collapse file tree 1 file changed +17
-10
lines changed Expand file tree Collapse file tree 1 file changed +17
-10
lines changed Original file line number Diff line number Diff line change 1
1
// RUN: %target-run-stdlib-swift
2
2
// REQUIRES: executable_test
3
3
4
- // REQUIRES: OS=linux-gnu
5
-
6
4
import Swift
7
5
import StdlibUnittest
8
6
9
-
7
+ #if os(Linux) || os(FreeBSD)
10
8
import Glibc
9
+ #endif
11
10
12
11
var GlibcTestSuite = TestSuite ( " Glibc " )
13
12
14
- GlibcTestSuite . test ( " errno " ) {
15
- errno = 0
16
- expectEqual ( 0 , errno)
17
- close ( - 1 )
18
- expectEqual ( EBADF, errno)
13
+ GlibcTestSuite . test ( " errno " )
14
+ . skip ( . custom( {
15
+ !( linuxAny ( reason: " " ) . evaluate ( ) || freeBSDAny ( reason: " " ) . evaluate ( ) )
16
+ } , reason: " Only Linux and FreeBSD are supported " ) ) . code {
17
+ errno = 0
18
+ expectEqual ( 0 , errno)
19
+ close ( - 1 )
20
+ expectEqual ( EBADF, errno)
19
21
}
20
22
23
+
21
24
var GlibcIoctlConstants = TestSuite ( " GlibcIoctlConstants " )
22
25
23
- GlibcIoctlConstants . test ( " tty ioctl constants availability " ) {
24
- let aConstant = TIOCGWINSZ
26
+ GlibcIoctlConstants . test ( " tty ioctl constants availability " )
27
+ . skip ( . custom( {
28
+ !( linuxAny ( reason: " " ) . evaluate ( ) || freeBSDAny ( reason: " " ) . evaluate ( ) )
29
+ } , reason: " Only Linux and FreeBSD are supported " ) ) . code {
30
+ let aConstant = TIOCGWINSZ
25
31
}
26
32
33
+
27
34
runAllTests ( )
You can’t perform that action at this time.
0 commit comments