mirror of
https://github.com/status-im/react-native.git
synced 2025-01-13 19:15:05 +00:00
Reverted commit D3436833
Summary: Some changes are required to this scripts in order to successfully run it on Sandcastle: - the packager needs to be started before the test - no xcpretty available, piping to anything else (e.g. `cat`) fails Closes https://github.com/facebook/react-native/pull/8123 Differential Revision: D3436833 Pulled By: avaly fbshipit-source-id: e284d6eaf370720b9a0f2468b114a596028f7107
This commit is contained in:
parent
23ce29528f
commit
b98a05ebd3
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -ex
|
set -e
|
||||||
|
|
||||||
SCRIPTS=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
SCRIPTS=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||||
ROOT=$(dirname $SCRIPTS)
|
ROOT=$(dirname $SCRIPTS)
|
||||||
@ -16,17 +16,9 @@ function cleanup {
|
|||||||
WATCHMAN_LOGS=/usr/local/Cellar/watchman/3.1/var/run/watchman/$USER.log
|
WATCHMAN_LOGS=/usr/local/Cellar/watchman/3.1/var/run/watchman/$USER.log
|
||||||
[ -f $WATCHMAN_LOGS ] && cat $WATCHMAN_LOGS
|
[ -f $WATCHMAN_LOGS ] && cat $WATCHMAN_LOGS
|
||||||
fi
|
fi
|
||||||
[ $SERVER_PID ] && kill -9 $SERVER_PID
|
|
||||||
}
|
}
|
||||||
trap cleanup EXIT
|
trap cleanup EXIT
|
||||||
|
|
||||||
# Run the packager process directly
|
|
||||||
node ./local-cli/cli.js start &
|
|
||||||
SERVER_PID=$!
|
|
||||||
|
|
||||||
XCODE_PROJECT="Examples/UIExplorer/UIExplorer.xcodeproj"
|
|
||||||
XCODE_SCHEME="UIExplorer"
|
|
||||||
XCODE_SDK="iphonesimulator"
|
|
||||||
if [ -z "$XCODE_DESTINATION" ]; then
|
if [ -z "$XCODE_DESTINATION" ]; then
|
||||||
XCODE_DESTINATION="platform=iOS Simulator,name=iPhone 5,OS=9.3"
|
XCODE_DESTINATION="platform=iOS Simulator,name=iPhone 5,OS=9.3"
|
||||||
fi
|
fi
|
||||||
@ -35,22 +27,17 @@ fi
|
|||||||
set +e
|
set +e
|
||||||
OUTPUT_TOOL=$(which xcpretty)
|
OUTPUT_TOOL=$(which xcpretty)
|
||||||
set -e
|
set -e
|
||||||
|
if [ -z "$OUTPUT_TOOL" ]; then
|
||||||
|
OUTPUT_TOOL="sed"
|
||||||
|
fi
|
||||||
|
|
||||||
# TODO: We use xcodebuild because xctool would stall when collecting info about
|
# TODO: We use xcodebuild because xctool would stall when collecting info about
|
||||||
# the tests before running them. Switch back when this issue with xctool has
|
# the tests before running them. Switch back when this issue with xctool has
|
||||||
# been resolved.
|
# been resolved.
|
||||||
if [ -z "$OUTPUT_TOOL" ]; then
|
xcodebuild \
|
||||||
xcodebuild \
|
-project Examples/UIExplorer/UIExplorer.xcodeproj \
|
||||||
-project $XCODE_PROJECT \
|
-scheme UIExplorer \
|
||||||
-scheme $XCODE_SCHEME \
|
-sdk iphonesimulator \
|
||||||
-sdk $XCODE_SDK \
|
-destination "$XCODE_DESTINATION" \
|
||||||
-destination "$XCODE_DESTINATION" \
|
test \
|
||||||
test
|
| $OUTPUT_TOOL && exit ${PIPESTATUS[0]}
|
||||||
else
|
|
||||||
xcodebuild \
|
|
||||||
-project $XCODE_PROJECT \
|
|
||||||
-scheme $XCODE_SCHEME \
|
|
||||||
-sdk $XCODE_SDK \
|
|
||||||
-destination "$XCODE_DESTINATION" \
|
|
||||||
test | $OUTPUT_TOOL && exit ${PIPESTATUS[0]}
|
|
||||||
fi
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user