-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PLAT-12987] FIx React Native CLI iOS test (#2250)
Fix the React Native CLI iOS tests to ensure that they run on CI Ensure that CI tests fail if the Maze Runner tests fail
- Loading branch information
Showing
4 changed files
with
14 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,20 @@ | ||
VERSION=$1 | ||
set -euo pipefail | ||
|
||
function check_status { | ||
if [[ $1 != 0 ]]; then | ||
popd | ||
exit $1 | ||
fi | ||
} | ||
VERSION=$1 | ||
|
||
# Build the app within Maze Runner, checking for the source map upload | ||
mkdir -p build | ||
pushd test/react-native-cli | ||
bundle install | ||
REACT_NATIVE_VERSION=$VERSION bundle exec maze-runner features/build-app-tests/build-ios-app.feature | ||
|
||
# TODO: Reinstate as part of PLAT-6764 | ||
#check_status $? | ||
|
||
# Export the IPA separately from MazeRunner (running it inside failed for an unknown reason) | ||
cd features/fixtures | ||
xcrun --log xcodebuild -exportArchive -archivePath "${VERSION}/${VERSION}.xcarchive" -exportPath output -verbose -exportOptionsPlist exportOptions.plist | ||
check_status $? | ||
|
||
# Clear the archive away | ||
rm -rf ${VERSION}/${VERSION}.xcarchive | ||
|
||
# Copy file to build directory, ensuring the exit code bubbles up | ||
cp output/${VERSION}.ipa ../../../../build | ||
STATUS=$? | ||
popd | ||
exit $STATUS |