Skip to content

Commit

Permalink
Merge branch 'master' into rejectResponderTerminationProp
Browse files Browse the repository at this point in the history
  • Loading branch information
hramos authored May 22, 2017
2 parents 9b5bd89 + 3d3f74d commit 9638046
Show file tree
Hide file tree
Showing 1,453 changed files with 38,303 additions and 42,428 deletions.
5 changes: 4 additions & 1 deletion .buckconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
[android]
target = Google Inc.:Google APIs:23

[download]
max_number_of_retries = 3

[maven_repositories]
central = https://repo1.maven.org/maven2

[alias]
movies = //Examples/Movies/android/app:app
uiexplorer = //Examples/UIExplorer/android/app:app
rntester = //RNTester/android/app:app
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
**/staticBundle.js
**/main.js
Libraries/vendor/**/*
packager/src/worker-farm/**/*
8 changes: 4 additions & 4 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ emoji=true

module.system=haste

experimental.strict_type_args=true
experimental.strict_call_arity=true

munge_underscores=true

Expand All @@ -41,12 +41,12 @@ suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FixMe

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-1]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-1]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-6]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-6]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

unsafe.enable_getters_and_setters=true

[version]
^0.41.0
^0.46.0
27 changes: 17 additions & 10 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,36 @@
Please read the following carefully before opening a new issue.
Your issue may be closed if it does not provide the information required by this template.

We use GitHub Issues for tracking bugs in React Native.
We use GitHub Issues exclusively for tracking bugs in React Native.

- If you have a non-bug question, ask on Stack Overflow: http://stackoverflow.com/questions/tagged/react-native
- If you have a question, ask on Stack Overflow: http://stackoverflow.com/questions/tagged/react-native
- If you have a feature request, post it on Canny: https://react-native.canny.io/feature-requests

Your issue may be closed without explanation if it does not provide the information required by this template.
Make sure your issue reproduces on master. Your issue may already have been fixed!
If your issue is present in master and in the stable release, try to reproduce your bug on https://snack.expo.io/
If you can't reproduce the bug on Snack, provide a sample project.
At the very least, provide an example of your code.

--- Please use this template, and delete everything above this line before submitting your issue ---
--- Delete everything above this line ---

### Description

[FILL THIS OUT: Explain what you did, what you expected to happen, and what actually happens.]
Explain what you did, what you expected to happen, and what actually happens.

### Reproduction
### Reproduction Steps and Sample Code

List all the steps required to reproduce the issue you're reporting. These steps should be clear and concise.

***An example of your code is REQUIRED***

[FILL THIS OUT: Try to reproduce your bug on https://sketch.expo.io/ and provide a link. If you can't reproduce the bug on Sketch, provide a sample project.]

### Solution

[FILL THIS OUT: What needs to be done to address this issue? Ideally, provide a pull request with a fix.]
What needs to be done to address this issue? Ideally, provide a pull request with a fix.

### Additional Information

* React Native version: [FILL THIS OUT: Does the bug reproduce on the latest RN release?]
* React Native version: [FILL THIS OUT: Be specific, filling out "latest" here is not enough.]
* Platform: [FILL THIS OUT: iOS, Android, or both?]
* Operating System: [FILL THIS OUT: MacOS, Linux, or Windows?]
* Development Operating System: [FILL THIS OUT: Are you developing on macOS, Linux, or Windows?]
* Dev tools: [FILL THIS OUT: Xcode or Android Studio version, iOS or Android SDK version, if applicable]
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,5 @@ node_modules
/ReactAndroid/src/androidTest/assets/AndroidTestBundle.js
*.js.meta

/coverage
/third-party
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ install:
- $yarn install

script:
- if [[ "$TEST_TYPE" = objc-ios ]]; then travis_retry travis_wait ./scripts/objc-test-ios.sh; fi
- if [[ "$TEST_TYPE" = objc-ios ]]; then travis_retry travis_wait ./scripts/objc-test-ios.sh test; fi
- if [[ "$TEST_TYPE" = objc-tvos ]]; then travis_retry travis_wait ./scripts/objc-test-tvos.sh; fi
- if [[ "$TEST_TYPE" = e2e-objc ]]; then node ./scripts/run-ci-e2e-tests.js --ios --js --retries 3; fi
- if [[ ( "$TEST_TYPE" = podspecs ) && ( "$TRAVIS_PULL_REQUEST" = "false" ) ]]; then gem install cocoapods && ./scripts/process-podspecs.sh; fi
Expand Down
2 changes: 1 addition & 1 deletion ContainerShip/Dockerfile.android
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ADD build.gradle /app/build.gradle
ADD react.gradle /app/react.gradle

# run gradle downloads
RUN ./gradlew :ReactAndroid:downloadBoost :ReactAndroid:downloadDoubleConversion :ReactAndroid:downloadFolly :ReactAndroid:downloadGlog
RUN ./gradlew :ReactAndroid:downloadBoost :ReactAndroid:downloadDoubleConversion :ReactAndroid:downloadFolly :ReactAndroid:downloadGlog :ReactAndroid:downloadJSCHeaders

# compile native libs with Gradle script, we need bridge for unit and integration tests
RUN ./gradlew :ReactAndroid:packageReactNdkLibsForBuck -Pjobs=1 -Pcom.android.build.threadPoolSize=1
Expand Down
47 changes: 35 additions & 12 deletions ContainerShip/Dockerfile.android-base
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM library/ubuntu:16.04

# set default build arguments
ARG ANDROID_VERSION=25.2.3
ARG BUCK_VERSION=2016.11.11.01
ARG BUCK_VERSION=f3452a6a7ab15a60e94c962e686293acbe677473
ARG NDK_VERSION=10e
ARG NODE_VERSION=6.2.0
ARG WATCHMAN_VERSION=4.7.0
Expand Down Expand Up @@ -30,7 +30,7 @@ RUN n $NODE_VERSION
# download buck
RUN git clone https://github.com/facebook/buck.git /opt/buck
WORKDIR /opt/buck
RUN git checkout v$BUCK_VERSION
RUN git checkout $BUCK_VERSION

# build buck
RUN ant
Expand Down Expand Up @@ -62,17 +62,40 @@ RUN unzip ndk.zip
# cleanup NDK
RUN rm ndk.zip

# add android SDK tools
# 2 - Android SDK Platform-tools, revision 25.0.3
# 12 - Android SDK Build-tools, revision 23.0.1
# 35 - SDK Platform Android 6.0, API 23, revision 3
# 39 - SDK Platform Android 4.4.2, API 19, revision 4
# 102 - ARM EABI v7a System Image, Android API 19, revision 5
# 103 - Intel x86 Atom System Image, Android API 19, revision 5
# 131 - Google APIs, Android API 23, revision 1
# 166 - Android Support Repository, revision 41
RUN echo "y" | android update sdk -u -a -t 2,12,35,39,102,103,131,166
# Add android SDK tools

# Android SDK Platform-tools, revision 25.0.4
RUN echo "y" | android update sdk -u -a -t $(android list sdk -a | grep "Android SDK Platform-tools, revision 25.0.4" | awk '{ print $1 }' | sed 's/.$//')

# Android SDK Build-tools, revision 23.0.1
RUN echo "y" | android update sdk -u -a -t $(android list sdk -a | grep "Android SDK Build-tools, revision 23.0.1" | awk '{ print $1 }' | sed 's/.$//')

# SDK Platform Android 6.0, API 23, revision 3
RUN echo "y" | android update sdk -u -a -t $(android list sdk -a | grep "SDK Platform Android 6.0, API 23" | awk '{ print $1 }' | sed 's/.$//')

# SDK Platform Android 4.4.2, API 19, revision 4
RUN echo "y" | android update sdk -u -a -t $(android list sdk -a | grep "SDK Platform Android 4.4.2, API 19, revision 4" | awk '{ print $1 }' | sed 's/.$//')

# ARM EABI v7a System Image, Android API 19, revision 5
RUN echo "y" | android update sdk -u -a -t $(android list sdk -a | grep "ARM EABI v7a System Image, Android API 19, revision 5" | awk '{ print $1 }' | sed 's/.$//')

# Intel x86 Atom System Image, Android API 19, revision 5
RUN echo "y" | android update sdk -u -a -t $(android list sdk -a | grep "Intel x86 Atom System Image, Android API 19, revision 5" | awk '{ print $1 }' | sed 's/.$//')

# Google APIs, Android API 23, revision 1
RUN echo "y" | android update sdk -u -a -t $(android list sdk -a | grep "Google APIs, Android API 23, revision 1" | awk '{ print $1 }' | sed 's/.$//')

# Android Support Repository, revision 45
RUN echo "y" | android update sdk -u -a -t $(android list sdk -a | grep "Android Support Repository" | awk '{ print $1 }' | sed 's/.$//')

# Link adb executable
RUN ln -s /opt/android/platform-tools/adb /usr/bin/adb

# Install google-chrome
RUN curl -fsSL https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
&& apt-get update \
&& apt-get install -y google-chrome-stable

# clean up unnecessary directories
RUN rm -rf /opt/android/system-images/android-19/default/x86
20 changes: 15 additions & 5 deletions ContainerShip/scripts/run-android-ci-instrumentation-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const colors = {

const test_opts = {
FILTER: new RegExp(argv.filter || '.*', 'i'),
IGNORE: argv.ignore || null,
PACKAGE: argv.package || 'com.facebook.react.tests',
PATH: argv.path || './ReactAndroid/src/androidTest/java/com/facebook/react/tests',
RETRIES: parseInt(argv.retries || 2, 10),
Expand All @@ -53,12 +54,21 @@ let testClasses = fs.readdirSync(path.resolve(process.cwd(), test_opts.PATH))
return file.endsWith('.java');
}).map((clazz) => {
return path.basename(clazz, '.java');
}).map((clazz) => {
return test_opts.PACKAGE + '.' + clazz;
}).filter((clazz) => {
return test_opts.FILTER.test(clazz);
});

if (test_opts.IGNORE) {
test_opts.IGNORE = new RegExp(test_opts.IGNORE, 'i');
testClasses = testClasses.filter(className => {
return !test_opts.IGNORE.test(className);
});
}

testClasses = testClasses.map((clazz) => {
return test_opts.PACKAGE + '.' + clazz;
}).filter((clazz) => {
return test_opts.FILTER.test(clazz);
});

// only process subset of the tests at corresponding offset and count if args provided
if (test_opts.COUNT != null && test_opts.OFFSET != null) {
const testCount = testClasses.length;
Expand Down Expand Up @@ -112,7 +122,7 @@ return async.mapSeries(testClasses, (clazz, callback) => {
print_test_suite_results(results);

const failures = results.filter((test) => {
test.status === 'failure';
return test.status === 'failure';
});

return failures.length === 0 ? process.exit(0) : process.exit(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ watchman shutdown-server
node local-cli/cli.js bundle --platform android --dev true --entry-file ReactAndroid/src/androidTest/js/TestBundle.js --bundle-output ReactAndroid/src/androidTest/assets/AndroidTestBundle.js

# build test APK
buck install ReactAndroid/src/androidTest/buck-runner:instrumentation-tests --config build.threads=1
source ./scripts/circle-ci-android-setup.sh && NO_BUCKD=1 retry3 buck install ReactAndroid/src/androidTest/buck-runner:instrumentation-tests --config build.threads=1

# run installed apk with tests
node ./ContainerShip/scripts/run-android-ci-instrumentation-tests.js $*
exit $?
8 changes: 6 additions & 2 deletions ContainerShip/scripts/run-ci-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@ RUN_CLI_INSTALL=1
RUN_IOS=0
RUN_JS=0

RETRY_COUNT=${RETRY_COUNT:-3}
RETRY_COUNT=${RETRY_COUNT:-2}
AVD_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 8 | head -n 1)

ANDROID_NPM_DEPS="[email protected] [email protected] [email protected] [email protected] [email protected]"
CLI_PACKAGE=$ROOT/react-native-cli/react-native-cli-*.tgz
PACKAGE=$ROOT/react-native-*.tgz
REACT_NATIVE_MAX_WORKERS=1

# solve issue with max user watches limit
echo 65536 | tee -a /proc/sys/fs/inotify/max_user_watches
watchman shutdown-server

# retries command on failure
# $1 -- max attempts
# $2 -- command to run
Expand Down Expand Up @@ -177,7 +181,6 @@ function e2e_suite() {
cd ..
keytool -genkey -v -keystore android/keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"

echo "Starting packager server"
node ./node_modules/.bin/appium >> /dev/null &
APPIUM_PID=$!
echo "Starting appium server $APPIUM_PID"
Expand All @@ -193,6 +196,7 @@ function e2e_suite() {
return 1
fi

echo "Starting packager server"
npm start >> /dev/null &
SERVER_PID=$!
sleep 15
Expand Down
5 changes: 0 additions & 5 deletions Examples/.eslintrc

This file was deleted.

Loading

0 comments on commit 9638046

Please sign in to comment.