Commit 24c2f0e7 by Dirk Pranke Committed by Commit Bot

Set use_xvfb where needed in test wrappers.

The GN test() template now generates bin/run_ wrappers for targets; this CL ensures that they'll properly declare when the wrappers need to use Xvfb on Linux. Bug: chromium:816629 Change-Id: I4f227eab3306f737f77bbe3341039d710184db96 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2370337Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent acda9dde
...@@ -308,6 +308,7 @@ template("angle_test") { ...@@ -308,6 +308,7 @@ template("angle_test") {
[ [
"deps", "deps",
"manifest", "manifest",
"use_xvfb",
]) ])
if (is_android) { if (is_android) {
...@@ -331,8 +332,9 @@ template("angle_test") { ...@@ -331,8 +332,9 @@ template("angle_test") {
] ]
} }
# To use the Chromium test infrastructure we must currently use the //base test launcher. # To use the Chromium test infrastructure we must currently use the
# Eventually we could switch to using standalone testing. See http://crbug.com/837741 # //base test launcher. Eventually we could switch to using standalone
# testing. See http://crbug.com/837741.
# TODO(jmadill): Clean up duplication as part of http://anglebug.com/3152 # TODO(jmadill): Clean up duplication as part of http://anglebug.com/3152
_standalone_harness_test_name = target_name _standalone_harness_test_name = target_name
...@@ -340,6 +342,11 @@ template("angle_test") { ...@@ -340,6 +342,11 @@ template("angle_test") {
if (build_with_chromium) { if (build_with_chromium) {
_standalone_harness_test_name = "standalone_" + target_name _standalone_harness_test_name = "standalone_" + target_name
test(target_name) { test(target_name) {
if ((is_linux && !is_chromeos) ||
(build_with_chromium && chromeos_is_browser_only)) {
use_xvfb = true
}
public_deps = [ ":${_lib}" ] public_deps = [ ":${_lib}" ]
if (invoker.main != "") { if (invoker.main != "") {
sources = [ "//gpu/${invoker.main}.cc" ] sources = [ "//gpu/${invoker.main}.cc" ]
...@@ -365,6 +372,11 @@ template("angle_test") { ...@@ -365,6 +372,11 @@ template("angle_test") {
} }
test(_standalone_harness_test_name) { test(_standalone_harness_test_name) {
if ((is_linux && !is_chromeos) ||
(build_with_chromium && chromeos_is_browser_only)) {
use_xvfb = true
}
public_deps = [ ":${_lib}" ] public_deps = [ ":${_lib}" ]
if (invoker.main != "") { if (invoker.main != "") {
sources = [ "${invoker.main}.cpp" ] sources = [ "${invoker.main}.cpp" ]
......
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