From 103fa3d818cab67a73de55a64bb19381db397098 Mon Sep 17 00:00:00 2001 From: Martin Konicek Date: Mon, 13 Mar 2017 13:24:48 -0700 Subject: [PATCH] Skip flaky ScrollView tests Summary: Closes https://github.com/facebook/react-native/pull/12868 Differential Revision: D4699900 Pulled By: hramos fbshipit-source-id: b531f2359734177df1868b453dd1d882e693caa3 --- scripts/run-android-ci-instrumentation-tests.js | 8 ++++++++ scripts/run-android-local-integration-tests.sh | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/run-android-ci-instrumentation-tests.js b/scripts/run-android-ci-instrumentation-tests.js index 329d46070..4d60bf759 100644 --- a/scripts/run-android-ci-instrumentation-tests.js +++ b/scripts/run-android-ci-instrumentation-tests.js @@ -28,11 +28,19 @@ const numberOfRetries = argv.retries || 1; const tryExecNTimes = require('./try-n-times'); const path = require('path'); +// Flaky tests ignored on Circle CI. They still run internally at fb. +const ignoredTests = [ + 'ReactScrollViewTestCase', + 'ReactHorizontalScrollViewTestCase' +]; + // ReactAndroid/src/androidTest/java/com/facebook/react/tests/ReactHorizontalScrollViewTestCase.java const testClasses = ls(`${argv.path}/*.java`) .map(javaFile => { // ReactHorizontalScrollViewTestCase return path.basename(javaFile, '.java'); +}).filter(className => { + return ignoredTests.indexOf(className) === -1; }).map(className => { // com.facebook.react.tests.ReactHorizontalScrollViewTestCase return argv.package + '.' + className; diff --git a/scripts/run-android-local-integration-tests.sh b/scripts/run-android-local-integration-tests.sh index 4d454a1c7..a85d02be3 100755 --- a/scripts/run-android-local-integration-tests.sh +++ b/scripts/run-android-local-integration-tests.sh @@ -20,4 +20,5 @@ 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 +# Use the JS script that runs all tests in a loop and is easy to tweak +node ./scripts/run-android-ci-instrumentation-tests.js --path ./ReactAndroid/src/androidTest/java/com/facebook/react/tests --package com.facebook.react.tests