Commit 6f08abe0 authored by zhaoyangli's avatar zhaoyangli Committed by Commit Bot

[iOS] Create flaky EG2 test suite.

Some downstream builders are running the EG1 suite. Creating EG2 suite
to use it in the builders.

chrome_ios_eg2_test.gni is changed to create the "_deps_group" targets
from existing target, so that the flaky suite can include the deps of
other test suites as it's deps.

Bug: 1052567
Change-Id: I5d51a4914f420990707351c119bbe7f20579f30f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2220892
Commit-Queue: Zhaoyang Li <zhaoyangli@chromium.org>
Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#773228}
parent 3290671a
......@@ -28,6 +28,7 @@ namespace {
bool gExecutedSetUpForTestCase = false;
NSString* const kFlakyEarlGreyTestTargetSuffix = @"_flaky_egtests";
NSString* const kFlakyEarlGrey2TestTargetSuffix = @"_flaky_eg2tests_module";
// Contains a list of test names that run in multitasking test suite.
NSArray* multitaskingTests = @[
......@@ -176,7 +177,8 @@ GREY_STUB_CLASS_IN_APP_MAIN_QUEUE(ChromeTestCaseAppInterface)
// Return specific list of tests based on the target.
NSString* targetName = [NSBundle mainBundle].infoDictionary[@"CFBundleName"];
if ([targetName hasSuffix:kFlakyEarlGreyTestTargetSuffix]) {
if ([targetName hasSuffix:kFlakyEarlGreyTestTargetSuffix] ||
[targetName hasSuffix:kFlakyEarlGrey2TestTargetSuffix]) {
// Only run FLAKY_ tests for flaky test suites.
return [self flakyTestNames];
} else if ([targetName isEqualToString:@"ios_chrome_multitasking_egtests"]) {
......
......@@ -13,6 +13,7 @@ group("all_tests") {
":ios_chrome_bookmarks_eg2tests_module",
":ios_chrome_device_check_eg2tests_module",
":ios_chrome_eg2tests",
":ios_chrome_flaky_eg2tests_module",
":ios_chrome_integration_eg2tests_module",
":ios_chrome_settings_eg2tests_module",
":ios_chrome_signin_eg2tests_module",
......@@ -46,6 +47,21 @@ chrome_ios_eg2_test("ios_chrome_device_check_eg2tests_module") {
data_deps = [ ":ios_chrome_eg2tests" ]
}
chrome_ios_eg2_test("ios_chrome_flaky_eg2tests_module") {
xcode_test_application_name = "ios_chrome_eg2tests"
deps = [
":ios_chrome_bookmarks_eg2tests_module_deps_group",
":ios_chrome_integration_eg2tests_module_deps_group",
":ios_chrome_settings_eg2tests_module_deps_group",
":ios_chrome_signin_eg2tests_module_deps_group",
":ios_chrome_smoke_eg2tests_module_deps_group",
":ios_chrome_ui_eg2tests_module_deps_group",
":ios_chrome_web_eg2tests_module_deps_group",
]
data_deps = [ ":ios_chrome_eg2tests" ]
}
chrome_ios_eg2_test("ios_chrome_integration_eg2tests_module") {
xcode_test_application_name = "ios_chrome_eg2tests"
......
......@@ -135,6 +135,20 @@ set_defaults("chrome_ios_eg_v2_test_app_host") {
}
template("chrome_ios_eg2_test") {
_deps_group_name = target_name + "_deps_group"
group(_deps_group_name) {
testonly = true
public_deps = []
if (defined(invoker.deps)) {
public_deps += invoker.deps
}
if (defined(invoker.public_deps)) {
public_deps += invoker.public_deps
}
}
assert(defined(invoker.xcode_test_application_name),
"xcode_test_application_name must be defined for $target_name")
assert(
......
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