Skip to content

Commit 6173861

Browse files
committed
win64/clang+msvc: Skip failing tests and mark flaky test as hopeful
1 parent 6f9af43 commit 6173861

File tree

5 files changed

+36
-3
lines changed

5 files changed

+36
-3
lines changed

Tests/base/NSURL/basic.m

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,16 @@ int main()
5959
url = [NSURL URLWithString: @"https://httpbin.org/silly-file-name"];
6060
data = [url resourceDataUsingCache: NO];
6161
num = [url propertyForKey: NSHTTPPropertyStatusCodeKey];
62+
63+
#if defined(_WIN64) && defined(_MSC_VER)
64+
testHopeful = YES;
65+
#endif
6266
PASS_EQUAL(num, [NSNumber numberWithInt: 404],
6367
"Status of load is 404 for httpbin.org/silly-file-name");
68+
#if defined(_WIN64) && defined(_MSC_VER)
69+
testHopeful = YES;
70+
#endif
71+
6472
str = [url scheme];
6573
PASS([str isEqual: @"https"],
6674
"Scheme of https://httpbin.org/silly-file-name is https");

Tests/base/NSURL/test00.m

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ int main()
112112

113113
START_SET("Shrink")
114114

115+
#if defined(_WIN64) && defined(_MSC_VER)
116+
SKIP("Known to crash on 64-bit Windows with Clang/MSVC.")
117+
#endif
118+
115119
/* Ask the 'respond' helper to send back a response containing
116120
* 'hello' and to shrink the write buffer size it uses on each
117121
* request. We do as many requests as the total response size
@@ -188,6 +192,10 @@ int main()
188192

189193
START_SET([name UTF8String])
190194

195+
#if defined(_WIN64) && defined(_MSC_VER)
196+
SKIP("Known to crash on 64-bit Windows with Clang/MSVC.")
197+
#endif
198+
191199
t = [NSTask launchedHelperWithLaunchPath: respond
192200
arguments: [NSArray arrayWithObjects:
193201
@"-FileName", @"SimpleResponse.dat",

Tests/base/NSURL/test01.m

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,16 @@ int main()
3232
*
3333
* We will mark the test cases as hopeful on Windows.
3434
*/
35-
#if defined(_WIN32)
35+
36+
START_SET("Keepalive")
37+
38+
#if defined(_WIN64) && defined(_MSC_VER)
39+
SKIP("Known to crash on 64-bit Windows with Clang/MSVC.")
40+
#elif defined(_WIN32)
3641
NSLog(@"Marking local web server tests as hopeful because GSInetServerStream is broken on Windows");
3742
testHopeful = YES;
3843
#endif
3944

40-
START_SET("Keepalive")
4145
url = [NSURL URLWithString: @"http://localhost:4322/"];
4246

4347
m = [NSMutableString stringWithCapacity: 2048];

Tests/base/NSURLConnection/test02.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ int main(int argc, char **argv, char **env)
1414
BOOL loaded;
1515
NSString *helperPath;
1616

17+
#if defined(_WIN64) && defined(_MSC_VER)
18+
NSLog(@"Marking tests as hopeful because they are known to fail on 64-bit Windows with Clang/MSVC.")
19+
testHopeful = YES;
20+
#endif
21+
1722
// load the test suite's classes
1823
fm = [NSFileManager defaultManager];
1924
helperPath = [[fm currentDirectoryPath]
@@ -132,5 +137,9 @@ int main(int argc, char **argv, char **env)
132137

133138
DESTROY(arp);
134139

140+
#if defined(_WIN64) && defined(_MSC_VER)
141+
testHopeful = NO;
142+
#endif
143+
135144
return 0;
136145
}

Tests/base/NSURLHandle/test01.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ int main(int argc, char **argv)
3030
*
3131
* We will mark the test cases as hopeful on Windows.
3232
*/
33-
#if defined(_WIN32)
33+
START_SET("Keepalive")
34+
35+
#if defined(_WIN64) && defined(_MSC_VER)
36+
SKIP("Known to crash on 64-bit Windows with Clang/MSVC.")
37+
#elif defined(_WIN32)
3438
NSLog(@"Marking local web server tests as hopeful because GSInetServerStream is broken on Windows");
3539
testHopeful = YES;
3640
#endif

0 commit comments

Comments
 (0)