Temporarily duplicate standalone tests.
This switches 'angle_*_tests' to be identical to
'standalone_angle_*_tests'. Once rolled into Chromium we can
then switch back to using 'angle_*_tests' and finally remove
'standalone_angle_*_tests' entirely.
Must land after https://crrev.com/c/2490987
Bug: angleproject:5124
Change-Id: I1f4794d429733a43113dcba6aaaba0c047607e50
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2491932
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/gni/angle.gni b/gni/angle.gni
index d8395ce..1d541f7 100644
--- a/gni/angle.gni
+++ b/gni/angle.gni
@@ -209,13 +209,6 @@
data_deps = []
main = ""
suppressed_configs = angle_remove_configs
-
- # By default use the Chromium harness in Chromium. Can be overriden in a target.
- standalone_harness = !build_with_chromium
-
- if (!standalone_harness) {
- suppressed_configs -= [ "//build/config/compiler:default_include_dirs" ]
- }
}
template("angle_executable") {
@@ -330,16 +323,9 @@
]
}
- # To use the Chromium test infrastructure we must currently use the
- # //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
-
- _standalone_harness_test_name = target_name
-
+ # TODO(jmadill): Remove duplication. http://anglebug.com/5124
if (build_with_chromium) {
- _standalone_harness_test_name = "standalone_" + target_name
- test(target_name) {
+ test("standalone_" + target_name) {
if ((is_linux && !is_chromeos) ||
(build_with_chromium && chromeos_is_browser_only)) {
use_xvfb = true
@@ -347,12 +333,13 @@
public_deps = [ ":${_lib}" ]
if (invoker.main != "") {
- sources = [ "//gpu/${invoker.main}.cc" ]
+ sources = [ "${invoker.main}.cpp" ]
}
- deps = [ "//base/test:test_support" ]
- if (is_android) {
- configs -= [ "//build/config/android:hide_all_but_jni" ]
- }
+ data = invoker.data + [
+ "$angle_root/scripts/run_gtest_angle_test.py",
+ "//testing/scripts/common.py",
+ "//testing/xvfb.py",
+ ]
if ((is_linux || is_chromeos) && !is_component_build) {
# Set rpath to find shared libs in a non-component build.
@@ -364,12 +351,17 @@
}
if (is_android) {
- use_native_activity = true
+ if (build_with_chromium) {
+ use_native_activity = true
+ configs -= [ "//build/config/android:hide_all_but_jni" ]
+ } else {
+ use_raw_android_executable = true
+ }
}
}
}
- test(_standalone_harness_test_name) {
+ test(target_name) {
if ((is_linux && !is_chromeos) ||
(build_with_chromium && chromeos_is_browser_only)) {
use_xvfb = true
diff --git a/src/tests/BUILD.gn b/src/tests/BUILD.gn
index 819cd3c..07e7883 100644
--- a/src/tests/BUILD.gn
+++ b/src/tests/BUILD.gn
@@ -17,8 +17,6 @@
}
angle_test("test_utils_unittest_helper") {
- standalone_harness = true
-
sources = [
"../../util/test_utils_unittest_helper.cpp",
"../../util/test_utils_unittest_helper.h",
@@ -112,7 +110,6 @@
# We use this in the restricted trace tests to load driver info.
angle_test("angle_system_info_test") {
- standalone_harness = true
sources = [ "angle_system_info_tests_main.cpp" ]
deps = [
"$angle_root:angle_gpu_info_util",