Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Run $IPHONE_SIMULATOR_ROOT/usr/libexec/securityd to ensure keychain w…

…orks during GHUNIT_CLI
  • Loading branch information...
commit 56312fcac61e8ac3a70226e19ec854178dbe483d 1 parent ee7229d
hborders authored
Showing with 17 additions and 1 deletion.
  1. +10 −0 Scripts/RunIPhoneSecurityd.sh
  2. +7 −1 Scripts/RunTests.sh
10 Scripts/RunIPhoneSecurityd.sh
View
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+set -u
+
+export DYLD_ROOT_PATH="$1"
+export IPHONE_SIMULATOR_ROOT="$1"
+export CFFIXED_USER_HOME="$2"
+
+"$IPHONE_SIMULATOR_ROOT"/usr/libexec/securityd
8 Scripts/RunTests.sh
View
@@ -14,7 +14,7 @@ export CFFIXED_USER_HOME="$TEMP_FILES_DIR/iPhone Simulator User Dir" # Be compat
if [ -d $"CFFIXED_USER_HOME" ]; then
rm -rf "$CFFIXED_USER_HOME"
fi
-mkdir "$CFFIXED_USER_HOME"
+mkdir -p "$CFFIXED_USER_HOME"
export NSDebugEnabled=YES
export NSZombieEnabled=YES
@@ -37,6 +37,12 @@ if [ ! -e "$TEST_TARGET_EXECUTABLE_PATH" ]; then
exit 1
fi
+# If trapping fails, make sure we kill any running securityd
+launchctl list | grep GHUNIT_RunIPhoneSecurityd && launchctl remove GHUNIT_RunIPhoneSecurityd
+SCRIPTS_PATH=`cd $(dirname $0); pwd`
+launchctl submit -l GHUNIT_RunIPhoneSecurityd -- "$SCRIPTS_PATH"/RunIPhoneSecurityd.sh $IPHONE_SIMULATOR_ROOT $CFFIXED_USER_HOME
+trap "launchctl remove GHUNIT_RunIPhoneSecurityd" EXIT TERM INT
+
RUN_CMD="\"$TEST_TARGET_EXECUTABLE_PATH\" -RegisterForSystemEvents"
echo "Running: $RUN_CMD"
Please sign in to comment.
Something went wrong with that request. Please try again.