diff --git a/.gitignore b/.gitignore index a524f640..33c960fb 100644 --- a/.gitignore +++ b/.gitignore @@ -28,8 +28,7 @@ *.i*86 *.x86_64 *.hex -src/rpcserver/rpcserver -src/rpcserver_* +src/rpcserver/rpcserver_* # Caches __pycache__ diff --git a/src/build_ios.sh b/src/build_ios.sh deleted file mode 100755 index e0b45c01..00000000 --- a/src/build_ios.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -ARCH="arm64" -SDK="iphoneos" -SYSROOT="$(xcrun --sdk iphoneos --show-sdk-path)" -CC="$(xcrun -f --sdk $SDK clang)" -CFLAGS="-arch $ARCH --sysroot=$SYSROOT" - -cd rpcserver -make clean -make all SERVER_CC="$CC" SERVER_CFLAGS="$CFLAGS" - -cd .. - -server_binary=rpcserver_${SDK}_${ARCH} -cp rpcserver/rpcserver $server_binary - -for i in $server_binary ; do - codesign -s - --entitlements ents.plist --generate-entitlement-der $i -done diff --git a/src/rpcclient/tests/test_spawn.py b/src/rpcclient/tests/test_spawn.py index f380361e..774ccad0 100644 --- a/src/rpcclient/tests/test_spawn.py +++ b/src/rpcclient/tests/test_spawn.py @@ -25,6 +25,7 @@ def test_spawn_foreground_sanity(client, argv, expected_stdout, errorcode): assert expected_stdout == stdout.read().strip() +@pytest.mark.local_only @pytest.mark.parametrize('argv,expected_stdout,errorcode', [ [['/bin/sleep', '0'], '', 0], [['/bin/echo', 'blat'], 'blat', 0], @@ -46,6 +47,8 @@ def test_spawn_background_sanity(client): client.processes.kill(spawn_result.pid) +@pytest.mark.local_only +@pytest.mark.local_only def test_spawn_background_stress(client): for i in range(1000): test_spawn_background_sanity(client) diff --git a/src/rpcserver/build_darwin.sh b/src/rpcserver/build_darwin.sh new file mode 100755 index 00000000..351465a7 --- /dev/null +++ b/src/rpcserver/build_darwin.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +NC='\033[0m' # No Color +RED='\033[0;31m' +GREEN='\033[0;32m' + +for i in iphoneos,arm64 macosx,x86_64 +do + IFS="," + set -- $i; + + echo "${GREEN}Building $1:$2 ${NC}" + + SDK="$1" + ARCH="$2" + SYSROOT="$(xcrun --sdk $SDK --show-sdk-path)" + CC="$(xcrun -f --sdk $SDK clang)" + CFLAGS="-arch $ARCH --sysroot=$SYSROOT" + + make clean + make all SERVER_CC="$CC" SERVER_CFLAGS="$CFLAGS" + + server_binary=rpcserver_${SDK}_${ARCH} + cp rpcserver $server_binary + + if test "$SDK" = 'iphoneos'; then + codesign -s - --entitlements ents.plist --generate-entitlement-der $server_binary + fi +done + +# clean old binaries +make clean diff --git a/src/ents.plist b/src/rpcserver/ents.plist similarity index 100% rename from src/ents.plist rename to src/rpcserver/ents.plist