#!/bin/sh
CMD=CCRegressions
if [ "${PLATFORM_NAME}" == "iphoneos" ]; then
INSTALL_DIR=
SCP_URL=phone:${INSTALL_DIR}
export RSYNC_PASSWORD=alpine
echo "run_tests.sh:${LINENO}: note: Copying stuff to device"
scp ${CONFIGURATION_BUILD_DIR}/CCRegressions ${SCP_URL}
echo "run_tests.sh:${LINENO}: note: Running the test"
xcrun -sdk "$SDKROOT" PurpleExec --env "DYLD_FRAMEWORK_PATH=${INSTALL_DIR}" --cmd ${INSTALL_DIR}/${CMD}
else
echo "run_tests.sh:${LINENO}: note: Running test on simulator (${BUILT_PRODUCTS_DIR}/${CMD})"
export DYLD_ROOT_PATH="${SDKROOT}"
export DYLD_LIBRARY_PATH="${BUILT_PRODUCTS_DIR}"
export DYLD_FRAMEWORK_PATH="${BUILT_PRODUCTS_DIR}"
${BUILT_PRODUCTS_DIR}/${CMD}
fi