Bläddra i källkod

Fix and update test running from Xcode.

Nikita Lutsenko 9 år sedan
förälder
incheckning
840c9050c6

+ 2 - 2
SocketRocket.xcodeproj/xcshareddata/xcschemes/SocketRocket.xcscheme

@@ -46,7 +46,7 @@
             ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
             ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
             <ActionContent
             <ActionContent
                title = "Run Script"
                title = "Run Script"
-               scriptText = "PIDFILE=$TMPDIR/srtharness.pid&#10;if [ -r $PIDFILE ]; then&#10;    EXISTING_PID=`cat $PIDFILE`&#10;    echo &quot;Killing Dangling SRTextharneess PID:&quot; $EXISTING_PID&#10;    kill $EXISTING_PID&#10;    rm $PIDFILE&#10;fi&#10;&#10;pushd $PROJECT_DIR&#10;&#10;export MACOSX_DEPLOYMENT_TARGET=&#10;&#10;bash TestSupport/ensure_virtualenv.sh $PROJECT_DIR/.env&#10;source .env/bin/activate&#10;&#10;rm -rf &quot;$PROJECT_DIR/reports/clients/&quot;&#10;nohup sr-testharness -i &apos;&apos; -c &apos;*&apos; &amp;&#10;&#10;#nohup sr-testharness -k hello_test_harness -i &apos;&apos; -c &apos;*&apos; &amp;&#10;&#10;echo $! &gt; $PIDFILE&#10;&#10;popd"
+               scriptText = "PIDFILE=$TMPDIR/sr_test_server.pid&#10;&#10;if [ -r $PIDFILE ]; then&#10;    EXISTING_PID=`cat $PIDFILE`&#10;    echo &quot;Killing Dangling SRTextharneess PID:&quot; $EXISTING_PID&#10;    kill $EXISTING_PID&#10;    rm $PIDFILE&#10;fi&#10;&#10;pushd $PROJECT_DIR&#10;&#10;export MACOSX_DEPLOYMENT_TARGET=&#10;&#10;bash TestSupport/setup_env.sh $PROJECT_DIR/.env&#10;&#10;rm -rf &quot;$PROJECT_DIR/reports/clients/&quot;&#10;&#10;nohup TestSupport/run_test_server.sh &amp;&#10;&#10;echo $! &gt; $PIDFILE&#10;&#10;popd"
                shellToInvoke = "/bin/bash">
                shellToInvoke = "/bin/bash">
                <EnvironmentBuildable>
                <EnvironmentBuildable>
                   <BuildableReference
                   <BuildableReference
@@ -65,7 +65,7 @@
             ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
             ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
             <ActionContent
             <ActionContent
                title = "Run Script"
                title = "Run Script"
-               scriptText = "PIDFILE=$TMPDIR/srtharness.pid&#10;if [ -r $PIDFILE ]; then&#10;    EXISTING_PID=`cat $PIDFILE`&#10;    echo &quot;Killing SRTestharness PID:&quot; $EXISTING_PID&#10;    kill $EXISTING_PID&#10;    rm $PIDFILE&#10;fi&#10;&#10;&#10;open $PROJECT_DIR/pages/results/index.html&#10;"
+               scriptText = "PIDFILE=$TMPDIR/sr_test_server.pid&#10;&#10;if [ -r $PIDFILE ]; then&#10;    EXISTING_PID=`cat $PIDFILE`&#10;    echo &quot;Killing SR TestServer PID:&quot; $EXISTING_PID&#10;    kill $EXISTING_PID&#10;    rm $PIDFILE&#10;fi&#10;&#10;&#10;open $PROJECT_DIR/pages/results/index.html&#10;"
                shellToInvoke = "/bin/bash">
                shellToInvoke = "/bin/bash">
                <EnvironmentBuildable>
                <EnvironmentBuildable>
                   <BuildableReference
                   <BuildableReference

+ 1 - 2
Tests/Utilities/SRAutobahnUtilities.m

@@ -27,8 +27,7 @@ NSString *SRAutobahnTestAgentName(void)
 
 
 NSURL *SRAutobahnTestServerURL(void)
 NSURL *SRAutobahnTestServerURL(void)
 {
 {
-    NSString *serverURLString = [[NSProcessInfo processInfo].environment objectForKey:@"SR_TEST_URL"];
-    return [NSURL URLWithString:serverURLString];
+    return [NSURL URLWithString:@"ws://localhost:9001"];
 }
 }
 
 
 ///--------------------------------------
 ///--------------------------------------