mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 01:31:08 +00:00
Update to have helper subtask tell master when it is ready for tests to start
This commit is contained in:
parent
0950bed43b
commit
1c81bc1193
2 changed files with 13 additions and 7 deletions
|
@ -134,6 +134,11 @@
|
|||
[serverStream scheduleInRunLoop: rl forMode: NSDefaultRunLoopMode];
|
||||
[serverStream open];
|
||||
|
||||
/* Tell main test program we are ready to handle a request
|
||||
*/
|
||||
[[NSFileHandle fileHandleWithStandardOutput] writeData:
|
||||
[@"Ready" dataUsingEncoding: NSASCIIStringEncoding]];
|
||||
|
||||
// run for one minute, then quit
|
||||
[rl runUntilDate: [NSDate dateWithTimeIntervalSinceNow: 60]];
|
||||
return 0;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <Foundation/Foundation.h>
|
||||
#include "Testing.h"
|
||||
#include "ObjectTesting.h"
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "Testing.h"
|
||||
#import "ObjectTesting.h"
|
||||
#import "../NSURL/Helpers/Launch.h"
|
||||
|
||||
/* This test collection examines the responses when a variety of HTTP
|
||||
* status codes are returned by the server. Relies on the
|
||||
|
@ -31,12 +32,12 @@ int main(int argc, char **argv)
|
|||
helpers = [helpers stringByAppendingPathComponent: @"obj"];
|
||||
statusServer = [helpers stringByAppendingPathComponent: @"StatusServer"];
|
||||
|
||||
t = [NSTask launchedTaskWithLaunchPath: statusServer arguments: nil];
|
||||
|
||||
t = [NSTask launchedHelperWithLaunchPath: statusServer
|
||||
arguments: nil
|
||||
timeout: 10.0];
|
||||
|
||||
if (t != nil)
|
||||
{
|
||||
// pause, so that the server is set up
|
||||
[NSThread sleepUntilDate: [NSDate dateWithTimeIntervalSinceNow: 0.5]];
|
||||
// try some different requests
|
||||
handle = [[[cls alloc] initWithURL: url cached: NO] autorelease];
|
||||
rxd = [handle loadInForeground];
|
||||
|
|
Loading…
Reference in a new issue