Commit af1078ad authored by Erik Chen's avatar Erik Chen Committed by Commit Bot

Remove flaky ProfilingProcessHost tests on Android.

memlog_browsertests is now run as part of android_browsertests. There is no need
to run these same tests in chrome_public_test_apk.

Change-Id: Id058589bb87d0acf2d121f66f27b3f090b67a945
Bug: 970205
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1959052
Auto-Submit: Erik Chen <erikchen@chromium.org>
Reviewed-by: default avatarEtienne Bergeron <etienneb@chromium.org>
Reviewed-by: default avatarTommy Nyquist <nyquist@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#723515}
parent d413c169
...@@ -1172,7 +1172,6 @@ chrome_common_shared_library("libchromefortest") { ...@@ -1172,7 +1172,6 @@ chrome_common_shared_library("libchromefortest") {
"//chrome/browser/subresource_filter:test_support", "//chrome/browser/subresource_filter:test_support",
"//components/autofill_assistant/browser:test_support", "//components/autofill_assistant/browser:test_support",
"//components/crash/android:crash_android", "//components/crash/android:crash_android",
"//components/heap_profiling:test_support",
"//components/minidump_uploader", "//components/minidump_uploader",
"//components/sync", "//components/sync",
"//components/sync/test/fake_server:fake_server_android", "//components/sync/test/fake_server:fake_server_android",
...@@ -1506,7 +1505,6 @@ java_group("chrome_public_base_module_java_for_test") { ...@@ -1506,7 +1505,6 @@ java_group("chrome_public_base_module_java_for_test") {
"//chrome/android/features/autofill_assistant:autofill_assistant_java_test_support", "//chrome/android/features/autofill_assistant:autofill_assistant_java_test_support",
"//chrome/browser/android/metrics:ukm_java_test_support", "//chrome/browser/android/metrics:ukm_java_test_support",
"//chrome/browser/subresource_filter:subresource_filter_java_test_support", "//chrome/browser/subresource_filter:subresource_filter_java_test_support",
"//components/heap_profiling:heap_profiling_java_test_support",
"//components/minidump_uploader:minidump_uploader_java", "//components/minidump_uploader:minidump_uploader_java",
"//content/public/test/android:content_java_test_support", "//content/public/test/android:content_java_test_support",
] ]
...@@ -2031,7 +2029,6 @@ chrome_test_apk_tmpl("chrome_public_test_apk") { ...@@ -2031,7 +2029,6 @@ chrome_test_apk_tmpl("chrome_public_test_apk") {
"//chrome/android/webapk/libs/runtime_library:runtime_library_javatests", "//chrome/android/webapk/libs/runtime_library:runtime_library_javatests",
"//chrome/android/webapk/shell_apk:shell_apk_javatests", "//chrome/android/webapk/shell_apk:shell_apk_javatests",
"//chrome/browser/download/android:download_java_tests", "//chrome/browser/download/android:download_java_tests",
"//chrome/browser/profiling_host:profiling_host_javatests",
"//chrome/browser/subresource_filter:subresource_filter_javatests", "//chrome/browser/subresource_filter:subresource_filter_javatests",
"//chrome/browser/touch_to_fill/android:test_java", "//chrome/browser/touch_to_fill/android:test_java",
"//chrome/browser/ui/android/appmenu/internal:javatests", "//chrome/browser/ui/android/appmenu/internal:javatests",
......
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.profiling_host;
import android.support.test.filters.MediumTest;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.chromium.base.test.util.CommandLineFlags;
import org.chromium.base.test.util.DisableIf;
import org.chromium.base.test.util.DisabledTest;
import org.chromium.chrome.browser.ChromeActivity;
import org.chromium.chrome.browser.ChromeSwitches;
import org.chromium.chrome.test.ChromeActivityTestRule;
import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
import org.chromium.components.heap_profiling.HeapProfilingTestShim;
/**
* Test suite for out of process heap profiling.
*/
@RunWith(ChromeJUnit4ClassRunner.class)
@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE})
public class ProfilingProcessHostAndroidTest {
private static final String TAG = "ProfilingProcessHostAndroidTest";
@Rule
public ChromeActivityTestRule<ChromeActivity> mActivityTestRule =
new ChromeActivityTestRule<>(ChromeActivity.class);
@Before
public void setUp() throws InterruptedException {
mActivityTestRule.startMainActivityOnBlankPage();
}
@Test
@MediumTest
@DisableIf
.Build(sdk_is_greater_than = 20, message = "https://crbug.com/964502")
@CommandLineFlags.Add({"memlog=browser",
"memlog-stack-mode=native-include-thread-names", "memlog-sampling-rate=1"})
public void
testModeBrowser() {
HeapProfilingTestShim shim = new HeapProfilingTestShim();
Assert.assertTrue(
shim.runTestForMode("browser", false, "native-include-thread-names", false, false));
}
@DisabledTest(message = "https://crbug.com/970205")
@Test
@MediumTest
public void testModeBrowserDynamicNonStreaming() {
HeapProfilingTestShim shim = new HeapProfilingTestShim();
Assert.assertTrue(shim.runTestForMode("browser", true, "native", false, false));
}
@DisabledTest(message = "https://crbug.com/970205")
@Test
@MediumTest
public void testModeBrowserDynamicPseudoNonStreaming() {
HeapProfilingTestShim shim = new HeapProfilingTestShim();
Assert.assertTrue(shim.runTestForMode("browser", true, "pseudo", false, false));
}
// Non-browser processes must be profiled with a command line flag, since
// otherwise, profiling will start after the relevant processes have been
// created, thus that process will be not be profiled.
// TODO(erikchen): Figure out what makes this test flaky and re-enable.
// https://crbug.com/833590.
@DisabledTest
@Test
@MediumTest
@CommandLineFlags.
Add({"memlog=all-renderers", "memlog-stack-mode=pseudo", "memlog-sampling-rate=1"})
public void testModeRendererPseudo() {
HeapProfilingTestShim shim = new HeapProfilingTestShim();
Assert.assertTrue(shim.runTestForMode("all-renderers", false, "pseudo", false, false));
}
@DisabledTest(message = "https://crbug.com/970205")
@Test
@MediumTest
@CommandLineFlags.Add({"memlog=gpu", "memlog-stack-mode=pseudo", "memlog-sampling-rate=1"})
public void testModeGpuPseudo() {
HeapProfilingTestShim shim = new HeapProfilingTestShim();
Assert.assertTrue(shim.runTestForMode("gpu", false, "native", false, false));
}
@DisabledTest(message = "https://crbug.com/970205")
@Test
@MediumTest
public void testModeBrowserDynamicPseudoSamplePartial() {
HeapProfilingTestShim shim = new HeapProfilingTestShim();
Assert.assertTrue(shim.runTestForMode("browser", true, "pseudo", true, false));
}
@DisabledTest(message = "https://crbug.com/986667")
@Test
@MediumTest
public void testModeBrowserAndAllUtility() {
HeapProfilingTestShim shim = new HeapProfilingTestShim();
Assert.assertTrue(shim.runTestForMode("utility-and-browser", true, "pseudo", true, false));
}
}
...@@ -47,27 +47,3 @@ source_set("profiling_browsertests") { ...@@ -47,27 +47,3 @@ source_set("profiling_browsertests") {
"//testing/gtest", "//testing/gtest",
] ]
} }
if (is_android) {
import("//build/config/android/rules.gni")
# This library must be included by the instrumentation_test. It must not be
# included by the apk_under_test, since in debug builds, java classes that
# appear in the apk_under_test are stripped from the instrumentation_test.
# This library contains dependencies that must not be stripped from the
# instrumentation_test.
android_library("profiling_host_javatests") {
testonly = true
java_files = [ "../../android/javatests/src/org/chromium/chrome/browser/profiling_host/ProfilingProcessHostAndroidTest.java" ]
deps = [
"//base:base_java",
"//base:base_java_test_support",
"//chrome/android:chrome_java",
"//chrome/test/android:chrome_java_test_support",
"//components/heap_profiling:heap_profiling_java_test_support",
"//third_party/android_support_test_runner:rules_java",
"//third_party/android_support_test_runner:runner_java",
"//third_party/junit",
]
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment