/core/externals/update-engine/externals/google-toolbox-for-mac/UnitTesting/RunIPhoneLaunchDaemons.sh

http://macfuse.googlecode.com/ · Shell · 43 lines · 6 code · 5 blank · 32 comment · 0 complexity · 96a6bbc091392bbf93a7c1f58a03cba5 MD5 · raw file

  1. #!/bin/bash
  2. # RunIPhoneLaunchDaemons.sh
  3. # Copyright 2010 Google Inc.
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6. # use this file except in compliance with the License. You may obtain a copy
  7. # of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13. # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  14. # License for the specific language governing permissions and limitations under
  15. # the License.
  16. #
  17. # Runs all unittests through the iPhone simulator. We don't handle running them
  18. # on the device. To run on the device just choose "run".
  19. # Starts up securityd for us so that we can access the keychain from our tests.
  20. # Turns out that when you run the simulator without the UI front end, that
  21. # some iPhone launch daemons aren't started correctly.
  22. # This script starts up securityd for us.
  23. # We may need to startup other services in the future.
  24. # This script is launched by launchd.
  25. #
  26. # arg1 - root to the iPhone SDK being used
  27. # arg2 - path to the user directory to use
  28. set -o errexit
  29. set -o nounset
  30. # Uncomment the next line to trace execution.
  31. #set -o verbose
  32. # These both need to be set to the root of the iPhone SDK for iPhone
  33. # apps to be able to find their frameworks.
  34. export DYLD_ROOT_PATH="$1"
  35. export IPHONE_SIMULATOR_ROOT="$1"
  36. # This needs to be set to the user's directory to find preference files.
  37. export CFFIXED_USER_HOME="$2"
  38. "$IPHONE_SIMULATOR_ROOT/usr/libexec/securityd"