Skip to content
This repository has been archived by the owner on Mar 25, 2023. It is now read-only.

Commit

Permalink
Updated for Xcode bot
Browse files Browse the repository at this point in the history
  • Loading branch information
swisspol committed Jan 12, 2015
1 parent a271c4b commit 61de812
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
Expand All @@ -25,7 +25,7 @@
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldUseLaunchSchemeArgsEnv = "NO"
buildConfiguration = "Debug">
<Testables>
<TestableReference
Expand All @@ -48,6 +48,18 @@
ReferencedContainer = "container:GCDTelnetServer.xcodeproj">
</BuildableReference>
</MacroExpansion>
<EnvironmentVariables>
<EnvironmentVariable
key = "DYLD_INSERT_LIBRARIES"
value = "/usr/lib/libgmalloc.dylib"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "NSZombieEnabled"
value = "YES"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
Expand All @@ -58,15 +70,6 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E298C46B19ED859F00C76821"
BuildableName = "Tests.xctest"
BlueprintName = "GCDTelnetServer (Tests)"
ReferencedContainer = "container:GCDTelnetServer.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
Expand All @@ -76,18 +79,9 @@
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E298C46B19ED859F00C76821"
BuildableName = "Tests.xctest"
BlueprintName = "GCDTelnetServer (Tests)"
ReferencedContainer = "container:GCDTelnetServer.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
buildConfiguration = "Release">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
Expand Down
2 changes: 1 addition & 1 deletion Run-Tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ rm -rf "$BUILD_DIR"
xcodebuild -sdk "$OSX_SDK" -target "$OSX_TARGET" -configuration "$CONFIGURATION" build "SYMROOT=$BUILD_DIR"

# Run tests
xcodebuild test -scheme "Tests"
xcodebuild test -scheme "Bot"

# Done
echo "\nAll tests completed successfully!"
5 changes: 3 additions & 2 deletions Tests/GCDTelnetServer_Tests.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

#import "GCDTelnetServer.h"

#define kTestPort 3333
#define kCommunicationSleepDelay (100 * 1000)

@interface GCDTelnetServer_Tests : XCTestCase
Expand All @@ -47,15 +48,15 @@ - (void)testCLIParsing {
}

- (void)testHandlers {
GCDTelnetServer* server = [[GCDTelnetServer alloc] initWithPort:4444 startHandler:^NSString*(GCDTelnetConnection* connection) {
GCDTelnetServer* server = [[GCDTelnetServer alloc] initWithPort:kTestPort startHandler:^NSString*(GCDTelnetConnection* connection) {
return @"Hello World!\n";
} lineHandler:^NSString *(GCDTelnetConnection* connection, NSString* line) {
return [line stringByAppendingString:@"\n"];
}];
XCTAssertTrue([server start]);

XCTestExpectation* expectation = [self expectationWithDescription:nil];
[GCDTCPConnection connectAsynchronouslyToHost:@"localhost" port:4444 timeout:1.0 completion:^(GCDTCPConnection* connection) {
[GCDTCPConnection connectAsynchronouslyToHost:@"localhost" port:kTestPort timeout:1.0 completion:^(GCDTCPConnection* connection) {
XCTAssertNotNil(connection);
[connection open];

Expand Down

0 comments on commit 61de812

Please sign in to comment.