mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Skip all NSURL* test cases using GSInetServerStream on Windows (#268)
* Mark all test cases using GSSocketStream as hopeful on win32 * Update ChangeLog * Remove allow-test-failures flag
This commit is contained in:
parent
0f9edb188b
commit
a8c421d485
16 changed files with 227 additions and 8 deletions
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
|
@ -43,7 +43,6 @@ jobs:
|
|||
CXX: g++
|
||||
|
||||
- name: Windows MinGW GCC x86_64
|
||||
allow-test-failures: true
|
||||
os: windows-2019
|
||||
arch: x86_64
|
||||
msystem: MINGW64
|
||||
|
@ -64,7 +63,6 @@ jobs:
|
|||
LDFLAGS: -fuse-ld=lld
|
||||
|
||||
- name: Windows MSVC Clang gnustep-2.0 x86_64
|
||||
allow-test-failures: true
|
||||
os: windows-2019
|
||||
arch: x64
|
||||
host: x86_64-pc-windows
|
||||
|
|
19
ChangeLog
19
ChangeLog
|
@ -6,6 +6,25 @@
|
|||
C99 does not support implicit function declarations. Add string.h
|
||||
and unistd.h when applicable.
|
||||
|
||||
2022-08-23 Hugo Melder <contact@hugomelder.com>
|
||||
|
||||
* Tests/base/NSURL/basic.m:
|
||||
Fix URL description and resource specifier test value on win32.
|
||||
* Tests/base/NSURL/test00.m:
|
||||
* Tests/base/NSURL/test01.m:
|
||||
* Tests/base/NSURL/test02.m:
|
||||
* Tests/base/NSURLConnection/test01.m:
|
||||
* Tests/base/NSURLConnection/test02.m:
|
||||
* Tests/base/NSURLConnection/test03.m:
|
||||
* Tests/base/NSURLConnection/test04.m:
|
||||
* Tests/base/NSURLConnection/test05.m:
|
||||
* Tests/base/NSURLConnection/test06.m:
|
||||
* Tests/base/NSURLConnection/test07.m:
|
||||
* Tests/base/NSURLHandle/test00.m:
|
||||
* Tests/base/NSURLHandle/test01.m:
|
||||
Skip all test cases using the GSInetServerStream class as
|
||||
it is broken on win32.
|
||||
|
||||
2022-08-16 Hugo Melder <contact@hugomelder.com>
|
||||
|
||||
* Source/NSPredicate.m:
|
||||
|
|
|
@ -101,10 +101,10 @@ int main()
|
|||
str = [url path];
|
||||
PASS_EQUAL(str, @"C:\\WINDOWS",
|
||||
"Path of file URL C:\\WINDOWS is C:\\WINDOWS");
|
||||
PASS_EQUAL([url description], @"file://localhost/C:%5CWINDOWS/",
|
||||
"File URL C:\\WINDOWS is file://localhost/C:%%5CWINDOWS/");
|
||||
PASS_EQUAL([url resourceSpecifier], @"//localhost/C:%5CWINDOWS/",
|
||||
"resourceSpecifier of C:\\WINDOWS is //localhost/C:%%5CWINDOWS/");
|
||||
PASS_EQUAL([url description], @"file:///C:%5CWINDOWS/",
|
||||
"File URL C:\\WINDOWS is file:///C:%%5CWINDOWS/");
|
||||
PASS_EQUAL([url resourceSpecifier], @"/C:%5CWINDOWS/",
|
||||
"resourceSpecifier of C:\\WINDOWS is /C:%5CWINDOWS/");
|
||||
#else
|
||||
url = [NSURL fileURLWithPath: @"/usr"];
|
||||
str = [url path];
|
||||
|
|
|
@ -27,6 +27,19 @@ int main()
|
|||
keepalive = [helpers stringByAppendingPathComponent: @"keepalive"];
|
||||
respond = [helpers stringByAppendingPathComponent: @"respond"];
|
||||
|
||||
/* The following test cases depend on the keepalive and response
|
||||
* HTTP servers. Both servers use the GSInetServerStream
|
||||
* class which is completely broken on Windows.
|
||||
*
|
||||
* See: https://github.com/gnustep/libs-base/issues/266
|
||||
*
|
||||
* We will mark the test cases as hopeful on Windows.
|
||||
*/
|
||||
#if defined(_WIN32)
|
||||
NSLog(@"Marking local web server tests as hopeful because GSInetServerStream is broken on Windows");
|
||||
testHopeful = YES;
|
||||
#endif
|
||||
|
||||
START_SET("-resourceDataUsingCache")
|
||||
const char *lit = "This is the data in the first chunk\r\n"
|
||||
"and this is the second one\r\n"
|
||||
|
@ -209,6 +222,11 @@ int main()
|
|||
END_SET([name UTF8String])
|
||||
}
|
||||
LEAVE_POOL
|
||||
|
||||
#if defined(_WIN32)
|
||||
testHopeful = NO;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -24,6 +24,19 @@ int main()
|
|||
helpers = [helpers stringByAppendingPathComponent: @"obj"];
|
||||
keepalive = [helpers stringByAppendingPathComponent: @"keepalive"];
|
||||
|
||||
/* The following test cases depend on the keepalive
|
||||
* HTTP server. This server uses the GSInetServerStream
|
||||
* class which is completely broken on Windows.
|
||||
*
|
||||
* See: https://github.com/gnustep/libs-base/issues/266
|
||||
*
|
||||
* We will mark the test cases as hopeful on Windows.
|
||||
*/
|
||||
#if defined(_WIN32)
|
||||
NSLog(@"Marking local web server tests as hopeful because GSInetServerStream is broken on Windows");
|
||||
testHopeful = YES;
|
||||
#endif
|
||||
|
||||
START_SET("Keepalive")
|
||||
url = [NSURL URLWithString: @"http://localhost:4322/"];
|
||||
|
||||
|
@ -63,6 +76,11 @@ int main()
|
|||
END_SET("Keepalive")
|
||||
|
||||
LEAVE_POOL
|
||||
|
||||
#if defined(_WIN32)
|
||||
testHopeful = NO;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -29,6 +29,19 @@ int main()
|
|||
helpers = [helpers stringByAppendingPathComponent: @"Helpers"];
|
||||
helpers = [helpers stringByAppendingPathComponent: @"obj"];
|
||||
capture = [helpers stringByAppendingPathComponent: @"capture"];
|
||||
|
||||
/* The following test cases depend on the capture
|
||||
* HTTP server. The server uses the GSInetServerStream
|
||||
* class which is completely broken on Windows.
|
||||
*
|
||||
* See: https://github.com/gnustep/libs-base/issues/266
|
||||
*
|
||||
* We will mark the test cases as hopeful on Windows.
|
||||
*/
|
||||
#if defined(_WIN32)
|
||||
NSLog(@"Marking local web server tests as hopeful because GSInetServerStream is broken on Windows");
|
||||
testHopeful = YES;
|
||||
#endif
|
||||
|
||||
m = [NSMutableString stringWithCapacity: 2048];
|
||||
for (i = 0; i < 128; i++)
|
||||
|
@ -124,6 +137,11 @@ int main()
|
|||
END_SET("Secure")
|
||||
|
||||
LEAVE_POOL
|
||||
|
||||
#if defined(_WIN32)
|
||||
testHopeful = NO;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -32,6 +32,11 @@ int main()
|
|||
"NSURLConnection +connectionWithRequest: delegate: with nil as delegate returns a instance");
|
||||
|
||||
response = nil;
|
||||
|
||||
#if defined(_WIN32)
|
||||
testHopeful = YES;
|
||||
#endif
|
||||
|
||||
data = [NSURLConnection sendSynchronousRequest: mutable
|
||||
returningResponse: &response
|
||||
error: &error];
|
||||
|
@ -40,6 +45,10 @@ int main()
|
|||
PASS(response != nil && [(NSHTTPURLResponse*)response statusCode] > 0,
|
||||
"NSURLConnection synchronous load returns a response");
|
||||
|
||||
#if defined(_WIN32)
|
||||
testHopeful = NO;
|
||||
#endif
|
||||
|
||||
path = [[NSFileManager defaultManager] currentDirectoryPath];
|
||||
path = [path stringByAppendingPathComponent: @"basic.m"];
|
||||
[mutable setURL: [NSURL fileURLWithPath: path]];
|
||||
|
|
|
@ -56,6 +56,18 @@ int main(int argc, char **argv, char **env)
|
|||
NSString *urlString;
|
||||
NSURLRequest *req;
|
||||
Delegate *del;
|
||||
|
||||
/* The following test cases depend on the GSInetServerStream
|
||||
* class which is completely broken on Windows.
|
||||
*
|
||||
* See: https://github.com/gnustep/libs-base/issues/266
|
||||
*
|
||||
* We will mark the test cases as hopeful on Windows.
|
||||
*/
|
||||
#if defined(_WIN32)
|
||||
NSLog(@"Marking local web server tests as hopeful because GSInetServerStream is broken on Windows");
|
||||
testHopeful = YES;
|
||||
#endif
|
||||
|
||||
duration = 0.0;
|
||||
timing = 0.1;
|
||||
|
@ -93,5 +105,9 @@ int main(int argc, char **argv, char **env)
|
|||
|
||||
[arp release]; arp = nil;
|
||||
|
||||
#if defined(_WIN32)
|
||||
testHopeful = NO;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -29,6 +29,18 @@ int main(int argc, char **argv, char **env)
|
|||
TestWebServer *server;
|
||||
NSURLConnectionTest *testCase;
|
||||
BOOL debug = NO;
|
||||
|
||||
/* The following test cases depend on the GSInetServerStream
|
||||
* class which is completely broken on Windows.
|
||||
*
|
||||
* See: https://github.com/gnustep/libs-base/issues/266
|
||||
*
|
||||
* We will mark the test cases as hopeful on Windows.
|
||||
*/
|
||||
#if defined(_WIN32)
|
||||
NSLog(@"Marking local web server tests as hopeful because GSInetServerStream is broken on Windows");
|
||||
testHopeful = YES;
|
||||
#endif
|
||||
|
||||
testClass = [bundle principalClass]; // NSURLConnectionTest
|
||||
|
||||
|
@ -130,8 +142,11 @@ int main(int argc, char **argv, char **env)
|
|||
format: @"can't load bundle TestConnection"];
|
||||
}
|
||||
|
||||
#if defined(_WIN32)
|
||||
testHopeful = NO;
|
||||
#endif
|
||||
|
||||
DESTROY(arp);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -15,6 +15,18 @@ int main(int argc, char **argv, char **env)
|
|||
NSBundle *bundle;
|
||||
BOOL loaded;
|
||||
NSString *helperPath;
|
||||
|
||||
/* The following test cases depend on the GSInetServerStream
|
||||
* class which is completely broken on Windows.
|
||||
*
|
||||
* See: https://github.com/gnustep/libs-base/issues/266
|
||||
*
|
||||
* We will mark the test cases as hopeful on Windows.
|
||||
*/
|
||||
#if defined(_WIN32)
|
||||
NSLog(@"Marking local web server tests as hopeful because GSInetServerStream is broken on Windows");
|
||||
testHopeful = YES;
|
||||
#endif
|
||||
|
||||
// load the test suite's classes
|
||||
fm = [NSFileManager defaultManager];
|
||||
|
@ -142,5 +154,9 @@ int main(int argc, char **argv, char **env)
|
|||
|
||||
DESTROY(arp);
|
||||
|
||||
#if defined(_WIN32)
|
||||
testHopeful = NO;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -14,6 +14,18 @@ int main(int argc, char **argv, char **env)
|
|||
BOOL loaded;
|
||||
NSString *helperPath;
|
||||
|
||||
/* The following test cases depend on the GSInetServerStream
|
||||
* class which is completely broken on Windows.
|
||||
*
|
||||
* See: https://github.com/gnustep/libs-base/issues/266
|
||||
*
|
||||
* We will mark the test cases as hopeful on Windows.
|
||||
*/
|
||||
#if defined(_WIN32)
|
||||
NSLog(@"Marking local web server tests as hopeful because GSInetServerStream is broken on Windows");
|
||||
testHopeful = YES;
|
||||
#endif
|
||||
|
||||
// load the test suite's classes
|
||||
fm = [NSFileManager defaultManager];
|
||||
helperPath = [[fm currentDirectoryPath]
|
||||
|
@ -163,6 +175,9 @@ int main(int argc, char **argv, char **env)
|
|||
format: @"can't load bundle TestConnection"];
|
||||
}
|
||||
|
||||
#if defined(_WIN32)
|
||||
testHopeful = NO;
|
||||
#endif
|
||||
|
||||
DESTROY(arp);
|
||||
|
||||
|
|
|
@ -14,6 +14,18 @@ int main(int argc, char **argv, char **env)
|
|||
NSBundle *bundle;
|
||||
BOOL loaded;
|
||||
NSString *helperPath;
|
||||
|
||||
/* The following test cases depend on the GSInetServerStream
|
||||
* class which is completely broken on Windows.
|
||||
*
|
||||
* See: https://github.com/gnustep/libs-base/issues/266
|
||||
*
|
||||
* We will mark the test cases as hopeful on Windows.
|
||||
*/
|
||||
#if defined(_WIN32)
|
||||
NSLog(@"Marking local web server tests as hopeful because GSInetServerStream is broken on Windows");
|
||||
testHopeful = YES;
|
||||
#endif
|
||||
|
||||
// load the test suite's classes
|
||||
fm = [NSFileManager defaultManager];
|
||||
|
@ -180,6 +192,9 @@ int main(int argc, char **argv, char **env)
|
|||
format: @"can't load bundle TestConnection"];
|
||||
}
|
||||
|
||||
#if defined(_WIN32)
|
||||
testHopeful = NO;
|
||||
#endif
|
||||
|
||||
DESTROY(arp);
|
||||
|
||||
|
|
|
@ -13,6 +13,18 @@ int main(int argc, char **argv, char **env)
|
|||
NSBundle *bundle;
|
||||
BOOL loaded;
|
||||
NSString *helperPath;
|
||||
|
||||
/* The following test cases depend on the GSInetServerStream
|
||||
* class which is completely broken on Windows.
|
||||
*
|
||||
* See: https://github.com/gnustep/libs-base/issues/266
|
||||
*
|
||||
* We will mark the test cases as hopeful on Windows.
|
||||
*/
|
||||
#if defined(_WIN32)
|
||||
NSLog(@"Marking local web server tests as hopeful because GSInetServerStream is broken on Windows");
|
||||
testHopeful = YES;
|
||||
#endif
|
||||
|
||||
// load the test suite's classes
|
||||
fm = [NSFileManager defaultManager];
|
||||
|
@ -65,6 +77,9 @@ int main(int argc, char **argv, char **env)
|
|||
format: @"can't load bundle TestConnection"];
|
||||
}
|
||||
|
||||
#if defined(_WIN32)
|
||||
testHopeful = NO;
|
||||
#endif
|
||||
|
||||
DESTROY(arp);
|
||||
|
||||
|
|
|
@ -13,6 +13,18 @@ int main(int argc, char **argv, char **env)
|
|||
NSBundle *bundle;
|
||||
BOOL loaded;
|
||||
NSString *helperPath;
|
||||
|
||||
/* The following test cases depend on the GSInetServerStream
|
||||
* class which is completely broken on Windows.
|
||||
*
|
||||
* See: https://github.com/gnustep/libs-base/issues/266
|
||||
*
|
||||
* We will mark the test cases as hopeful on Windows.
|
||||
*/
|
||||
#if defined(_WIN32)
|
||||
NSLog(@"Marking local web server tests as hopeful because GSInetServerStream is broken on Windows");
|
||||
testHopeful = YES;
|
||||
#endif
|
||||
|
||||
// load the test suite's classes
|
||||
fm = [NSFileManager defaultManager];
|
||||
|
@ -97,6 +109,9 @@ int main(int argc, char **argv, char **env)
|
|||
format: @"can't load bundle TestConnection"];
|
||||
}
|
||||
|
||||
#if defined(_WIN32)
|
||||
testHopeful = NO;
|
||||
#endif
|
||||
|
||||
DESTROY(arp);
|
||||
|
||||
|
|
|
@ -151,10 +151,26 @@ resourceDidFailLoadingWithReason: (NSString *)reason
|
|||
int main(int argc, char **argv)
|
||||
{
|
||||
int status;
|
||||
|
||||
/* The following test cases depend on the GSInetServerStream
|
||||
* class which is completely broken on Windows.
|
||||
*
|
||||
* See: https://github.com/gnustep/libs-base/issues/266
|
||||
*
|
||||
* We will mark the test cases as hopeful on Windows.
|
||||
*/
|
||||
#if defined(_WIN32)
|
||||
NSLog(@"Marking local web server tests as hopeful because GSInetServerStream is broken on Windows");
|
||||
testHopeful = YES;
|
||||
#endif
|
||||
|
||||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
status = [[[[TestObject alloc] init] autorelease] runTest];
|
||||
[arp release]; arp = nil;
|
||||
|
||||
#if defined(_WIN32)
|
||||
testHopeful = NO;
|
||||
#endif
|
||||
|
||||
return status;
|
||||
}
|
||||
|
|
|
@ -23,6 +23,18 @@ int main(int argc, char **argv)
|
|||
NSData *resp;
|
||||
NSData *rxd;
|
||||
|
||||
/* The following test cases depend on the GSInetServerStream
|
||||
* class which is completely broken on Windows.
|
||||
*
|
||||
* See: https://github.com/gnustep/libs-base/issues/266
|
||||
*
|
||||
* We will mark the test cases as hopeful on Windows.
|
||||
*/
|
||||
#if defined(_WIN32)
|
||||
NSLog(@"Marking local web server tests as hopeful because GSInetServerStream is broken on Windows");
|
||||
testHopeful = YES;
|
||||
#endif
|
||||
|
||||
url = [NSURL URLWithString: @"http://localhost:1234/200"];
|
||||
cls = [NSURLHandle URLHandleClassForURL: url];
|
||||
resp = [NSData dataWithBytes: "Hello\r\n" length: 7];
|
||||
|
@ -62,7 +74,11 @@ int main(int argc, char **argv)
|
|||
}
|
||||
|
||||
[arp release]; arp = nil ;
|
||||
|
||||
|
||||
#if defined(_WIN32)
|
||||
testHopeful = NO;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue