浏览代码

Merge pull request #330 from hamchapman/update-run-test-script

Updates throughout test-related files to try and make run_test.sh work
Dan Federman 9 年之前
父节点
当前提交
f661897c4b

+ 1 - 0
TestSupport/ensure_virtualenv.sh

@@ -6,6 +6,7 @@ else
 	python extern/virtualenv/virtualenv.py $VIRTUALENV_PATH
 	source $VIRTUALENV_PATH/bin/activate
 	pushd TestSupport/sr-testharness/
+  env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" pip install cryptography
 	python setup.py develop
 	popd
 fi

+ 5 - 5
TestSupport/run_test.sh

@@ -11,16 +11,16 @@ pushd TestSupport/sr-testharness/
 python setup.py develop
 popd
 
-source .env/bin/activate 
+source .env/bin/activate
 sr-testharness -i '' -c "$TEST_SCENARIOS" &
 
 CHILD_PID=$!
 
-extra_opts="VALID_ARCHS=i386 ARCH=i386"
+DESTINATION="OS=9.2,name=iPhone 6s"
+SDK="iphonesimulator"
+SHARED_ARGS="-configuration $CONFIGURATION -sdk $SDK"
 
-SHARED_ARGS="-arch i386 -configuration $CONFIGURATION -sdk iphonesimulator"
-
-xcodebuild -scheme SocketRocketTests $SHARED_ARGS TEST_AFTER_BUILD=YES  clean build $extra_opts
+xcodebuild -scheme SocketRocketTests -destination "$DESTINATION" $SHARED_ARGS TEST_AFTER_BUILD=YES clean build
 RESULT=$?
 
 kill $CHILD_PID

+ 2 - 1
TestSupport/sr-testharness/setup.py

@@ -20,7 +20,8 @@ setup(name='srtestharness',
       install_requires=[
           # -*- Extra requirements: -*-
           'autobahntestsuite',
-          'autobahn',
+          'autobahn==0.10.1',
+          'cryptography>=0.7'
       ],
       entry_points="""
       # -*- Entry points: -*-

+ 1 - 1
TestSupport/sr-testharness/srtestharness/runner.py

@@ -9,7 +9,7 @@ from twisted.internet import reactor
 from twisted.web.server import Site
 from twisted.web.static import File
 from autobahntestsuite.fuzzing import FuzzingServerFactory
-from autobahn.websocket import listenWS
+from autobahn.twisted.websocket import listenWS
 
 class jsondict(dict):
     def __init__(self, json_value):