Commit a16d257c authored by kylechar's avatar kylechar Committed by Commit Bot

Add viz_unittests target.

This CL adds a viz_unittests target for testing parts of viz. Remove the
tests from components_unittests. Add the viz_unittests to trybots for
CrOS, Linux, Windows, Mac and Android.

The tests in //components/viz/common:unit_tests are not included on
Android because they fail with the test GL implementation.

Bug: 722935
Change-Id: Icd1595b745aef1cf87ab6ddbeeb3d16c0c8ec9d0
Reviewed-on: https://chromium-review.googlesource.com/538293
Commit-Queue: kylechar <kylechar@chromium.org>
Reviewed-by: default avatarJohn Budorick <jbudorick@chromium.org>
Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Reviewed-by: default avatardanakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485308}
parent 37ef79a0
...@@ -162,6 +162,7 @@ group("gn_all") { ...@@ -162,6 +162,7 @@ group("gn_all") {
"//chrome/test:unit_tests", "//chrome/test:unit_tests",
"//components:components_browsertests", "//components:components_browsertests",
"//components/policy:policy_templates", "//components/policy:policy_templates",
"//components/viz:viz_unittests",
"//components/viz/common:viz_benchmark", "//components/viz/common:viz_benchmark",
"//content/shell:content_shell", "//content/shell:content_shell",
"//content/test:content_browsertests", "//content/test:content_browsertests",
......
...@@ -224,8 +224,6 @@ test("components_unittests") { ...@@ -224,8 +224,6 @@ test("components_unittests") {
"//components/tracing:unit_tests", "//components/tracing:unit_tests",
"//components/translate/content/renderer:unit_tests", "//components/translate/content/renderer:unit_tests",
"//components/visitedlink/test:unit_tests", "//components/visitedlink/test:unit_tests",
"//components/viz/host:unit_tests",
"//components/viz/service:unit_tests",
"//components/wallpaper:unit_tests", "//components/wallpaper:unit_tests",
"//components/web_cache/browser:unit_tests", "//components/web_cache/browser:unit_tests",
"//components/webcrypto:unit_tests", "//components/webcrypto:unit_tests",
......
# 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.
import("//testing/test.gni")
test("viz_unittests") {
sources = [
"run_all_unittests.cc",
]
deps = [
"//base",
"//base/test:test_support",
"//components/viz/host:unit_tests",
"//components/viz/service:unit_tests",
"//mojo/edk/system",
"//ui/gl:test_support",
]
if (!is_android) {
deps += [ "//components/viz/common:unit_tests" ]
}
}
include_rules = [
"+mojo/edk/embedder",
"+ui/gl",
]
...@@ -31,20 +31,15 @@ source_set("common") { ...@@ -31,20 +31,15 @@ source_set("common") {
] ]
} }
# These tests don't pass on Android so this target isn't in viz_unittests. If
# you add a test here that should run on Android you need to change that.
source_set("unit_tests") { source_set("unit_tests") {
testonly = true testonly = true
sources = [ sources = [
"resources/platform_color_unittest.cc", "gl_helper_unittest.cc",
"yuv_readback_unittest.cc", "yuv_readback_unittest.cc",
] ]
if (!is_android) {
sources += [
# Many of these fail on Android with the test GL implementation.
"gl_helper_unittest.cc",
]
}
deps = [ deps = [
":common", ":common",
"//base/test:test_support", "//base/test:test_support",
......
// 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.
#include "base/bind.h"
#include "base/test/launcher/unit_test_launcher.h"
#include "base/test/test_suite.h"
#include "mojo/edk/embedder/embedder.h"
#include "ui/gl/test/gl_surface_test_support.h"
namespace {
class VizTestSuite : public base::TestSuite {
public:
VizTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
~VizTestSuite() override = default;
// base::TestSuite:
void Initialize() override {
base::TestSuite::Initialize();
gl::GLSurfaceTestSupport::InitializeOneOff();
}
private:
DISALLOW_COPY_AND_ASSIGN(VizTestSuite);
};
} // namespace
int main(int argc, char** argv) {
VizTestSuite test_suite(argc, argv);
mojo::edk::Init();
return base::LaunchUnitTests(
argc, argv,
base::Bind(&VizTestSuite::Run, base::Unretained(&test_suite)));
}
...@@ -1497,6 +1497,36 @@ ...@@ -1497,6 +1497,36 @@
}, },
"test": "unit_tests" "test": "unit_tests"
}, },
{
"swarming": {
"can_use_on_swarming_builders": true,
"cipd_packages": [
{
"cipd_package": "infra/tools/luci/logdog/butler/${platform}",
"location": "bin",
"revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c"
}
],
"dimension_sets": [
{
"android_devices": "4",
"device_os": "MMB29Q",
"device_type": "bullhead"
}
],
"output_links": [
{
"link": [
"https://luci-logdog.appspot.com/v/?s",
"=android%2Fswarming%2Flogcats%2F",
"${TASK_ID}%2F%2B%2Funified_logcats"
],
"name": "shard #${SHARD_INDEX} logcats"
}
]
},
"test": "viz_unittests"
},
{ {
"merge": { "merge": {
"args": [ "args": [
...@@ -2802,6 +2832,38 @@ ...@@ -2802,6 +2832,38 @@
}, },
"test": "unit_tests" "test": "unit_tests"
}, },
{
"swarming": {
"can_use_on_swarming_builders": true,
"cipd_packages": [
{
"cipd_package": "infra/tools/luci/logdog/butler/${platform}",
"location": "bin",
"revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c"
}
],
"dimension_sets": [
{
"android_devices": "1",
"device_os": "KTU84Z",
"device_type": "flo"
}
],
"expiration": 10800,
"hard_timeout": 300,
"output_links": [
{
"link": [
"https://luci-logdog.appspot.com/v/?s",
"=android%2Fswarming%2Flogcats%2F",
"${TASK_ID}%2F%2B%2Funified_logcats"
],
"name": "shard #${SHARD_INDEX} logcats"
}
]
},
"test": "viz_unittests"
},
{ {
"merge": { "merge": {
"args": [ "args": [
...@@ -3995,6 +4057,38 @@ ...@@ -3995,6 +4057,38 @@
}, },
"test": "unit_tests" "test": "unit_tests"
}, },
{
"swarming": {
"can_use_on_swarming_builders": true,
"cipd_packages": [
{
"cipd_package": "infra/tools/luci/logdog/butler/${platform}",
"location": "bin",
"revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c"
}
],
"dimension_sets": [
{
"android_devices": "1",
"device_os": "LMY48I",
"device_type": "hammerhead"
}
],
"expiration": 10800,
"hard_timeout": 960,
"output_links": [
{
"link": [
"https://luci-logdog.appspot.com/v/?s",
"=android%2Fswarming%2Flogcats%2F",
"${TASK_ID}%2F%2B%2Funified_logcats"
],
"name": "shard #${SHARD_INDEX} logcats"
}
]
},
"test": "viz_unittests"
},
{ {
"merge": { "merge": {
"args": [ "args": [
...@@ -5380,6 +5474,38 @@ ...@@ -5380,6 +5474,38 @@
}, },
"test": "unit_tests" "test": "unit_tests"
}, },
{
"swarming": {
"can_use_on_swarming_builders": true,
"cipd_packages": [
{
"cipd_package": "infra/tools/luci/logdog/butler/${platform}",
"location": "bin",
"revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c"
}
],
"dimension_sets": [
{
"android_devices": "1",
"device_os": "LMY49B",
"device_type": "flo"
}
],
"expiration": 10800,
"hard_timeout": 300,
"output_links": [
{
"link": [
"https://luci-logdog.appspot.com/v/?s",
"=android%2Fswarming%2Flogcats%2F",
"${TASK_ID}%2F%2B%2Funified_logcats"
],
"name": "shard #${SHARD_INDEX} logcats"
}
]
},
"test": "viz_unittests"
},
{ {
"merge": { "merge": {
"args": [ "args": [
...@@ -7100,6 +7226,37 @@ ...@@ -7100,6 +7226,37 @@
}, },
"test": "unit_tests" "test": "unit_tests"
}, },
{
"swarming": {
"can_use_on_swarming_builders": true,
"cipd_packages": [
{
"cipd_package": "infra/tools/luci/logdog/butler/${platform}",
"location": "bin",
"revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c"
}
],
"dimension_sets": [
{
"android_devices": "4",
"device_os": "MMB29Q",
"device_type": "bullhead"
}
],
"hard_timeout": 960,
"output_links": [
{
"link": [
"https://luci-logdog.appspot.com/v/?s",
"=android%2Fswarming%2Flogcats%2F",
"${TASK_ID}%2F%2B%2Funified_logcats"
],
"name": "shard #${SHARD_INDEX} logcats"
}
]
},
"test": "viz_unittests"
},
{ {
"merge": { "merge": {
"args": [ "args": [
...@@ -8382,6 +8539,38 @@ ...@@ -8382,6 +8539,38 @@
}, },
"test": "unit_tests" "test": "unit_tests"
}, },
{
"swarming": {
"can_use_on_swarming_builders": true,
"cipd_packages": [
{
"cipd_package": "infra/tools/luci/logdog/butler/${platform}",
"location": "bin",
"revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c"
}
],
"dimension_sets": [
{
"android_devices": "1",
"device_os": "MRA58Z",
"device_type": "flo"
}
],
"expiration": 10800,
"hard_timeout": 300,
"output_links": [
{
"link": [
"https://luci-logdog.appspot.com/v/?s",
"=android%2Fswarming%2Flogcats%2F",
"${TASK_ID}%2F%2B%2Funified_logcats"
],
"name": "shard #${SHARD_INDEX} logcats"
}
]
},
"test": "viz_unittests"
},
{ {
"merge": { "merge": {
"args": [ "args": [
......
...@@ -477,6 +477,12 @@ ...@@ -477,6 +477,12 @@
}, },
"test": "views_unittests" "test": "views_unittests"
}, },
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "viz_unittests"
},
{ {
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
...@@ -845,6 +851,12 @@ ...@@ -845,6 +851,12 @@
}, },
"test": "views_unittests" "test": "views_unittests"
}, },
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "viz_unittests"
},
{ {
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
...@@ -1203,6 +1215,12 @@ ...@@ -1203,6 +1215,12 @@
}, },
"test": "views_unittests" "test": "views_unittests"
}, },
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "viz_unittests"
},
{ {
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
......
...@@ -1528,6 +1528,36 @@ ...@@ -1528,6 +1528,36 @@
}, },
"test": "unit_tests" "test": "unit_tests"
}, },
{
"swarming": {
"can_use_on_swarming_builders": true,
"cipd_packages": [
{
"cipd_package": "infra/tools/luci/logdog/butler/${platform}",
"location": "bin",
"revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c"
}
],
"dimension_sets": [
{
"android_devices": "1",
"device_os": "KTU84P",
"device_type": "hammerhead"
}
],
"output_links": [
{
"link": [
"https://luci-logdog.appspot.com/v/?s",
"=android%2Fswarming%2Flogcats%2F",
"${TASK_ID}%2F%2B%2Funified_logcats"
],
"name": "shard #${SHARD_INDEX} logcats"
}
]
},
"test": "viz_unittests"
},
{ {
"args": [ "args": [
"--gs-results-bucket=chromium-result-details" "--gs-results-bucket=chromium-result-details"
...@@ -3132,6 +3162,36 @@ ...@@ -3132,6 +3162,36 @@
}, },
"test": "unit_tests" "test": "unit_tests"
}, },
{
"swarming": {
"can_use_on_swarming_builders": true,
"cipd_packages": [
{
"cipd_package": "infra/tools/luci/logdog/butler/${platform}",
"location": "bin",
"revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c"
}
],
"dimension_sets": [
{
"android_devices": "1",
"device_os": "KTU84P",
"device_type": "hammerhead"
}
],
"output_links": [
{
"link": [
"https://luci-logdog.appspot.com/v/?s",
"=android%2Fswarming%2Flogcats%2F",
"${TASK_ID}%2F%2B%2Funified_logcats"
],
"name": "shard #${SHARD_INDEX} logcats"
}
]
},
"test": "viz_unittests"
},
{ {
"args": [ "args": [
"--gs-results-bucket=chromium-result-details" "--gs-results-bucket=chromium-result-details"
...@@ -4194,6 +4254,12 @@ ...@@ -4194,6 +4254,12 @@
}, },
"test": "views_unittests" "test": "views_unittests"
}, },
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "viz_unittests"
},
{ {
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
...@@ -4878,6 +4944,12 @@ ...@@ -4878,6 +4944,12 @@
}, },
"test": "views_unittests" "test": "views_unittests"
}, },
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "viz_unittests"
},
{ {
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
...@@ -5261,6 +5333,12 @@ ...@@ -5261,6 +5333,12 @@
}, },
"test": "url_unittests" "test": "url_unittests"
}, },
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "viz_unittests"
},
{ {
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
......
...@@ -386,6 +386,12 @@ ...@@ -386,6 +386,12 @@
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
}, },
"test": "views_unittests" "test": "views_unittests"
},
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "viz_unittests"
} }
], ],
"isolated_scripts": [ "isolated_scripts": [
...@@ -824,6 +830,12 @@ ...@@ -824,6 +830,12 @@
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
}, },
"test": "views_unittests" "test": "views_unittests"
},
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "viz_unittests"
} }
], ],
"isolated_scripts": [ "isolated_scripts": [
...@@ -1272,6 +1284,12 @@ ...@@ -1272,6 +1284,12 @@
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
}, },
"test": "views_unittests" "test": "views_unittests"
},
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "viz_unittests"
} }
], ],
"isolated_scripts": [ "isolated_scripts": [
...@@ -1675,6 +1693,12 @@ ...@@ -1675,6 +1693,12 @@
}, },
"test": "views_unittests" "test": "views_unittests"
}, },
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "viz_unittests"
},
{ {
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
...@@ -2067,6 +2091,12 @@ ...@@ -2067,6 +2091,12 @@
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
}, },
"test": "views_unittests" "test": "views_unittests"
},
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "viz_unittests"
} }
], ],
"isolated_scripts": [ "isolated_scripts": [
......
...@@ -600,6 +600,12 @@ ...@@ -600,6 +600,12 @@
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
}, },
"test": "views_unittests" "test": "views_unittests"
},
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "viz_unittests"
} }
] ]
}, },
...@@ -907,6 +913,12 @@ ...@@ -907,6 +913,12 @@
}, },
"test": "views_unittests" "test": "views_unittests"
}, },
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "viz_unittests"
},
{ {
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
...@@ -1230,6 +1242,12 @@ ...@@ -1230,6 +1242,12 @@
}, },
"test": "views_unittests" "test": "views_unittests"
}, },
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "viz_unittests"
},
{ {
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
...@@ -1505,6 +1523,12 @@ ...@@ -1505,6 +1523,12 @@
}, },
"test": "views_unittests" "test": "views_unittests"
}, },
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "viz_unittests"
},
{ {
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
...@@ -1728,6 +1752,12 @@ ...@@ -1728,6 +1752,12 @@
}, },
"test": "views_unittests" "test": "views_unittests"
}, },
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "viz_unittests"
},
{ {
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
......
...@@ -451,6 +451,12 @@ ...@@ -451,6 +451,12 @@
}, },
"test": "views_unittests" "test": "views_unittests"
}, },
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "viz_unittests"
},
{ {
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
...@@ -1011,6 +1017,12 @@ ...@@ -1011,6 +1017,12 @@
}, },
"test": "views_unittests" "test": "views_unittests"
}, },
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "viz_unittests"
},
{ {
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
...@@ -1536,6 +1548,12 @@ ...@@ -1536,6 +1548,12 @@
}, },
"test": "views_unittests" "test": "views_unittests"
}, },
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "viz_unittests"
},
{ {
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
...@@ -2001,6 +2019,12 @@ ...@@ -2001,6 +2019,12 @@
}, },
"test": "views_unittests" "test": "views_unittests"
}, },
{
"swarming": {
"can_use_on_swarming_builders": true
},
"test": "viz_unittests"
},
{ {
"swarming": { "swarming": {
"can_use_on_swarming_builders": true "can_use_on_swarming_builders": true
......
...@@ -1069,6 +1069,10 @@ ...@@ -1069,6 +1069,10 @@
"label": "//ui/views:views_unittests", "label": "//ui/views:views_unittests",
"type": "windowed_test_launcher", "type": "windowed_test_launcher",
}, },
"viz_unittests": {
"label": "//components/viz:viz_unittests",
"type": "windowed_test_launcher",
},
"vr_common_unittests": { "vr_common_unittests": {
"label": "//chrome/browser/android/vr_shell:vr_common_unittests", "label": "//chrome/browser/android/vr_shell:vr_common_unittests",
"type": "console_test_launcher", "type": "console_test_launcher",
......
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