From 177c1e29c1abeb267b3ab1283a4c7c03a398ec6f Mon Sep 17 00:00:00 2001 From: dpranke Date: Wed, 22 Jul 2015 16:07:43 -0700 Subject: [PATCH] Add GN isolate support for a bunch of unittests. This enables the following tests to be run under swarming on a GN bot: - angle_unittests - accessibility_unittests - compositor_unittests - cc_unittests - ipc_tests - gl_unittests - sandbox_linux_unittests - gn_unittests - skia_unittests - sql_unittests - url_unittests R=brettw@chromium.org, maruel@chromium.org BUG=504079 CQ_EXTRA_TRYBOTS=tryserver.chromium.mac:mac_chromium_gn_rel Review URL: https://codereview.chromium.org/1248673005 Cr-Commit-Position: refs/heads/master@{#339973} --- cc/BUILD.gn | 15 +++++++++++++++ gpu/BUILD.gn | 9 +++++++++ ipc/BUILD.gn | 7 +++++++ sandbox/linux/BUILD.gn | 9 +++++++++ skia/BUILD.gn | 9 +++++++++ sql/BUILD.gn | 13 +++++++++++++ testing/buildbot/gn_isolate_map.pyl | 27 ++++++++++++++++----------- tools/gn/BUILD.gn | 14 ++++++++++++++ ui/accessibility/BUILD.gn | 9 +++++++++ ui/compositor/BUILD.gn | 13 +++++++++++++ ui/gl/BUILD.gn | 9 +++++++++ url/BUILD.gn | 9 +++++++++ 12 files changed, 132 insertions(+), 11 deletions(-) diff --git a/cc/BUILD.gn b/cc/BUILD.gn index 52f114745ef4..1a241061a9da 100644 --- a/cc/BUILD.gn +++ b/cc/BUILD.gn @@ -696,6 +696,15 @@ source_set("test_support") { } } +# TODO(GYP): Delete this after we've converted everything to GN. +# The _run targets exist only for compatibility w/ GYP. +group("cc_unittests_run") { + testonly = true + deps = [ + ":cc_unittests", + ] +} + test("cc_unittests") { sources = [ "animation/animation_host_unittest.cc", @@ -835,6 +844,10 @@ test("cc_unittests") { "test/run_all_unittests.cc", ] + data = [ + "test/data/", + ] + deps = [ ":cc", ":test_support", @@ -855,6 +868,8 @@ test("cc_unittests") { "//ui/gl", "//ui/gl:test_support", ] + + data_deps = [ "//third_party/mesa:osmesa" ] } test("cc_perftests") { diff --git a/gpu/BUILD.gn b/gpu/BUILD.gn index 6e8d96b13864..214dadefe4e9 100644 --- a/gpu/BUILD.gn +++ b/gpu/BUILD.gn @@ -273,6 +273,15 @@ test("gpu_perftests") { ] } +# TODO(GYP): Delete this after we've converted everything to GN. +# The _run targets exist only for compatibility w/ GYP. +group("angle_unittests_run") { + testonly = true + deps = [ + ":angle_unittests", + ] +} + test("angle_unittests") { sources = [ "angle_unittest_main.cc", diff --git a/ipc/BUILD.gn b/ipc/BUILD.gn index 4074fe91916b..c27522aa22f3 100644 --- a/ipc/BUILD.gn +++ b/ipc/BUILD.gn @@ -107,6 +107,13 @@ component("ipc") { # TODO(GYP): crbug.com/360936. Get this to build and run on Android. if (!is_android) { + group("ipc_tests_run") { + testonly = true + deps = [ + ":ipc_tests", + ] + } + test("ipc_tests") { sources = [ "attachment_broker_win_unittest.cc", diff --git a/sandbox/linux/BUILD.gn b/sandbox/linux/BUILD.gn index a1a77204f5f3..15dedd3cb727 100644 --- a/sandbox/linux/BUILD.gn +++ b/sandbox/linux/BUILD.gn @@ -146,6 +146,15 @@ source_set("sandbox_linux_unittests_sources") { } } +# TODO(GYP): Delete this after we've converted everything to GN. +# The _run targets exist only for compatibility w/ GYP. +group("sandbox_linux_unittests_run") { + testonly = true + deps = [ + ":sandbox_linux_unittests", + ] +} + # The main sandboxing test target. test("sandbox_linux_unittests") { deps = [ diff --git a/skia/BUILD.gn b/skia/BUILD.gn index 29e9e392632c..9eb998c12013 100644 --- a/skia/BUILD.gn +++ b/skia/BUILD.gn @@ -581,6 +581,15 @@ source_set("skia_opts") { visibility = [ ":skia" ] } +# TODO(GYP): Delete this after we've converted everything to GN. +# The _run targets exist only for compatibility w/ GYP. +group("skia_unittests_run") { + testonly = true + deps = [ + ":skia_unittests", + ] +} + test("skia_unittests") { sources = [ "ext/analysis_canvas_unittest.cc", diff --git a/sql/BUILD.gn b/sql/BUILD.gn index fdf8c7be96ed..38f85b4f26f7 100644 --- a/sql/BUILD.gn +++ b/sql/BUILD.gn @@ -65,6 +65,15 @@ source_set("redirection_header") { ] } +# TODO(GYP): Delete this after we've converted everything to GN. +# The _run targets exist only for compatibility w/ GYP. +group("sql_unittests_run") { + testonly = true + deps = [ + ":sql_unittests", + ] +} + test("sql_unittests") { sources = [ "connection_unittest.cc", @@ -82,6 +91,10 @@ test("sql_unittests") { "transaction_unittest.cc", ] + data = [ + "test/data/", + ] + # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] diff --git a/testing/buildbot/gn_isolate_map.pyl b/testing/buildbot/gn_isolate_map.pyl index 748865951c9b..7d475122f329 100644 --- a/testing/buildbot/gn_isolate_map.pyl +++ b/testing/buildbot/gn_isolate_map.pyl @@ -32,11 +32,13 @@ { "accessibility_unittests": { "label": "//ui/accessibility:accessibility_unittests", - "type": "unknown", + "type": "raw", + "args": [], }, "angle_unittests": { "label": "//gpu:angle_unittests", - "type": "unknown", + "type": "raw", + "args": [], }, "app_list_unittests": { "label": "//ui/app_list:app_list_unittests", @@ -95,7 +97,7 @@ }, "cc_unittests": { "label": "//cc:cc_unittests", - "type": "unknown", + "type": "windowed_test_launcher", }, "chrome_elf_unittests": { "label": "//chrome_elf:chrome_elf_unittests", @@ -119,7 +121,7 @@ }, "compositor_unittests": { "label": "//ui/compositor:compositor_unittests", - "type": "unknown", + "type": "windowed_test_launcher", }, "content_browsertests": { "label": "//content/test:content_browsertests", @@ -171,11 +173,13 @@ }, "gl_unittests": { "label": "//ui/gl:gl_unittests", - "type": "unknown", + "type": "raw", + "args": [], }, "gn_unittests": { "label": "//tools/gn:gn_unittests", - "type": "unknown", + "type": "raw", + "args": [], }, "google_apis_unittests": { "label": "//google_apis:google_apis_unittests", @@ -203,7 +207,7 @@ }, "ipc_tests": { "label": "//ipc:ipc_tests", - "type": "unknown", + "type": "console_test_launcher", }, "jingle_unittests": { "label": "//jingle:jingle_unittests", @@ -299,7 +303,8 @@ }, "sandbox_linux_unittests": { "label": "//sandbox/linux:sandbox_linux_unittests", - "type": "unknown", + "type": "raw", + "args": [], }, "sandbox_mac_unittests": { "label": "//sandbox/mac:sandbox_mac_unittests", @@ -323,11 +328,11 @@ }, "skia_unittests": { "label": "//skia:skia_unittests", - "type": "unknown", + "type": "console_test_launcher", }, "sql_unittests": { "label": "//sql:sql_unittests", - "type": "unknown", + "type": "console_test_launcher", }, "sync_integration_tests": { "label": "//sync:sync_integration_tests", @@ -355,7 +360,7 @@ }, "url_unittests": { "label": "//url:url_unittests", - "type": "unknown", + "type": "console_test_launcher", }, "view_manager_unittests": { "label": "//components/view_manager:view_manager_unittests", diff --git a/tools/gn/BUILD.gn b/tools/gn/BUILD.gn index 3109f758bd9c..39fee93ab401 100644 --- a/tools/gn/BUILD.gn +++ b/tools/gn/BUILD.gn @@ -226,6 +226,15 @@ executable("gn") { ] } +# TODO(GYP): Delete this after we've converted everything to GN. +# The _run targets exist only for compatibility w/ GYP. +group("gn_unittests_run") { + testonly = true + deps = [ + ":gn_unittests", + ] +} + test("gn_unittests") { sources = [ "action_target_generator_unittest.cc", @@ -281,6 +290,11 @@ test("gn_unittests") { "value_unittest.cc", "visibility_unittest.cc", ] + + data = [ + "format_test_data/", + ] + deps = [ ":gn_lib", "//base/test:run_all_unittests", diff --git a/ui/accessibility/BUILD.gn b/ui/accessibility/BUILD.gn index 4d616991bacd..3a195f331678 100644 --- a/ui/accessibility/BUILD.gn +++ b/ui/accessibility/BUILD.gn @@ -127,6 +127,15 @@ source_set("test_support") { ] } +# TODO(GYP): Delete this after we've converted everything to GN. +# The _run targets exist only for compatibility w/ GYP. +group("accessibility_unittests_run") { + testonly = true + deps = [ + ":accessibility_unittests", + ] +} + test("accessibility_unittests") { sources = [ "ax_generated_tree_unittest.cc", diff --git a/ui/compositor/BUILD.gn b/ui/compositor/BUILD.gn index 283d1ab8a6c2..48b007bc4f74 100644 --- a/ui/compositor/BUILD.gn +++ b/ui/compositor/BUILD.gn @@ -154,6 +154,15 @@ source_set("test_support") { } if (!is_android) { + # TODO(GYP): Delete this after we've converted everything to GN. + # The _run targets exist only for compatibility w/ GYP. + group("compositor_unittests_run") { + testonly = true + deps = [ + ":compositor_unittests", + ] + } + test("compositor_unittests") { sources = [ "compositor_unittest.cc", @@ -166,6 +175,10 @@ if (!is_android) { "transform_animation_curve_adapter_unittest.cc", ] + data = [ + "//ui/gfx/test/data/compositor/", + ] + deps = [ ":compositor", ":test_support", diff --git a/ui/gl/BUILD.gn b/ui/gl/BUILD.gn index 3a5a58c7e892..22ee98854608 100644 --- a/ui/gl/BUILD.gn +++ b/ui/gl/BUILD.gn @@ -301,6 +301,15 @@ source_set("test_support") { } } +# TODO(GYP): Delete this after we've converted everything to GN. +# The _run targets exist only for compatibility w/ GYP. +group("gl_unittests_run") { + testonly = true + deps = [ + ":gl_unittests", + ] +} + test("gl_unittests") { sources = [ "gl_api_unittest.cc", diff --git a/url/BUILD.gn b/url/BUILD.gn index 2beed041ab3d..d5ea067bc3d1 100644 --- a/url/BUILD.gn +++ b/url/BUILD.gn @@ -95,6 +95,15 @@ component("url") { # TODO(dpranke): crbug.com/360936. Get this to build and run on Android. if (!is_android) { + # TODO(GYP): Delete this after we've converted everything to GN. + # The _run targets exist only for compatibility w/ GYP. + group("url_unittests_run") { + testonly = true + deps = [ + ":url_unittests", + ] + } + test("url_unittests") { sources = [ "deprecated_serialized_origin_unittest.cc", -- 2.11.4.GIT