mirror of
https://github.com/status-im/react-native.git
synced 2025-01-28 18:25:06 +00:00
Running OSS instrumentation tests with BUCK
Reviewed By: mkonicek Differential Revision: D2839833 fb-gh-sync-id: ae9aa52962aba1b9057a93804c86b54cd161a8be
This commit is contained in:
parent
8be1dd62ef
commit
c817764d6a
@ -3,15 +3,24 @@
|
||||
package="com.facebook.react.tests"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
<application>
|
||||
<activity
|
||||
android:name="com.facebook.react.testing.ReactAppTestActivity"
|
||||
android:theme="@style/Theme.ReactNative.AppCompat.Light.NoActionBar.FullScreen"/>
|
||||
</application>
|
||||
<uses-sdk android:targetSdkVersion="7" />
|
||||
<supports-screens android:anyDensity="true" />
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<!-- needed for screenshot tests -->
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
|
||||
<application>
|
||||
<activity
|
||||
android:name="com.facebook.react.testing.ReactAppTestActivity"/>
|
||||
<!--<activity-->
|
||||
<!--android:name="com.facebook.react.testing.ReactAppTestActivity"-->
|
||||
<!--android:theme="@style/Theme.ReactNative.AppCompat.Light.NoActionBar.FullScreen"-->
|
||||
<!--/>-->
|
||||
</application>
|
||||
<instrumentation
|
||||
android:name="android.support.test.runner.AndroidJUnitRunner"
|
||||
android:targetPackage="com.facebook.react.tests"
|
||||
android:label="Integration tests for catalyst."/>
|
||||
|
||||
</manifest>
|
||||
|
66
ReactAndroid/src/androidTest/BUCK_temp
Normal file
66
ReactAndroid/src/androidTest/BUCK_temp
Normal file
@ -0,0 +1,66 @@
|
||||
include_defs('//ReactAndroid/DEFS')
|
||||
|
||||
|
||||
CATALYST_PRIMERY_DEX_PATTERNS = [
|
||||
'/CatalystAppShell^',
|
||||
'/CatalystApplicationImpl^',
|
||||
'^com/facebook/buck/android/support/exopackage/',
|
||||
'/FbInstrumentationTestRunner^',
|
||||
'/PrimaryDexFactories^',
|
||||
'/Screenshot^',
|
||||
'/DexmakerMockMaker^',
|
||||
'/AndroidJUnitRunner^',
|
||||
'/InstrumentationRunListener^',
|
||||
'/ExposedInstrumentationApi^',
|
||||
'/TestApplication^',
|
||||
'/ApplicationWithInjector^',
|
||||
'/RunListener^',
|
||||
]
|
||||
|
||||
JS_BUNDLE_DEPS = [
|
||||
#':intern-schema',
|
||||
# '//java/com/facebook/graphql:schema',
|
||||
# '//java/com/facebook/graphql/graphql-data:locate_node'
|
||||
]
|
||||
|
||||
|
||||
# instrumentation tests that will run for tests located in GitHub open sourced folder
|
||||
android_binary (
|
||||
name = 'react_oss',
|
||||
manifest = 'AndroidManifest.xml',
|
||||
keystore = '//keystores:debug',
|
||||
use_split_dex = True,
|
||||
linear_alloc_hard_limit = 10 * 1024 * 1024,
|
||||
primary_dex_patterns = CATALYST_PRIMERY_DEX_PATTERNS,
|
||||
deps = [
|
||||
# ':integration_test_oss_bundle_js',
|
||||
react_native_integration_tests_target('java/com/facebook/react/tests:tests'),
|
||||
# '//java/com/facebook/catalyst/js/react-native-github/ReactAndroid/src/main/res:shell',
|
||||
],
|
||||
)
|
||||
|
||||
# Building this rule will produce a file named messenger_test.apk
|
||||
android_instrumentation_apk(
|
||||
name = 'react_oss_test_apk',
|
||||
manifest = 'AndroidManifest.xml',
|
||||
apk = ':react_oss',
|
||||
deps = [
|
||||
# react_native_integration_tests_target('java/com/facebook/react/tests:tests'),
|
||||
# react_native_integration_tests_target('java/com/facebook/react/tests:tests'),
|
||||
# '//java/com/facebook/catalyst:integration_test_oss_bundle_js#dev',
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
|
||||
android_instrumentation_test(
|
||||
name = 'react_oss_test',
|
||||
apk = ':react_oss_test_apk',
|
||||
)
|
||||
|
||||
sh_binary(
|
||||
name = 'integration_test_oss_bundle_js',
|
||||
main = 'buildBundle.sh',
|
||||
# deps = [':InstallReactNativeNodeModules'],
|
||||
visibility = ['PUBLIC'],
|
||||
)
|
4
ReactAndroid/src/androidTest/buildBundle.sh
Executable file
4
ReactAndroid/src/androidTest/buildBundle.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
# TODO put output to temp folder?
|
||||
node ./local-cli/cli.js bundle --entry-file ReactAndroid/src/androidTest/assets/TestBundle.js --dev --platform android --bundle-output ReactAndroid/src/androidTest/assets/ReactAndroidTestBundle.js
|
Loading…
x
Reference in New Issue
Block a user