mirror of
https://github.com/status-im/react-native.git
synced 2025-01-17 21:11:45 +00:00
7ca8e0e8b1
Summary: - TestIdTestModule instrumentation tests is responsible for too many occasional crashes, e.g. https://circleci.com/gh/facebook/react-native/7054. This should fix the problem (will monitor over next week) - Made file naming more consistent - 5 retries don't make e2e tests more stable, reduced back to 3 but I need to investigate how to make it more reliable Closes https://github.com/facebook/react-native/pull/7784 Differential Revision: D3354444 fbshipit-source-id: d058362edbec09522a4828998e01988a82a74487
22 lines
929 B
Bash
Executable File
22 lines
929 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Runs all Android integration tests locally.
|
|
# See http://facebook.github.io/react-native/docs/testing.html
|
|
|
|
set -e
|
|
|
|
which buck > /dev/null || {
|
|
echo "React Native uses the Buck build tool to run tests. Please install Buck: https://buckbuild.com/setup/install.html";
|
|
exit 1;
|
|
}
|
|
|
|
echo "Compiling native code..."
|
|
./gradlew :ReactAndroid:packageReactNdkLibsForBuck
|
|
echo "Building JS bundle..."
|
|
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
|
|
echo "Installing test app on the device..."
|
|
buck fetch ReactAndroid/src/androidTest/buck-runner:instrumentation-tests
|
|
buck install ReactAndroid/src/androidTest/buck-runner:instrumentation-tests
|
|
echo "Running integration tests..."
|
|
adb shell am instrument -w com.facebook.react.tests/android.support.test.runner.AndroidJUnitRunner
|