Commit 5a85bee2 by Jamie Madill

Add angle_perftests to GN.

Also clean up the formatting a bit with gn format. BUG=537008 Change-Id: I23337e634f20f611aaae7d17ef47b5784738bbe8 Reviewed-on: https://chromium-review.googlesource.com/303793Reviewed-by: 's avatarKenneth Russell <kbr@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 6d892669
...@@ -2,12 +2,15 @@ ...@@ -2,12 +2,15 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import("//testing/test.gni") import("//testing/test.gni")
import("//third_party/angle/build/angle_common.gni") import("//third_party/angle/build/angle_common.gni")
unittests_gypi = exec_script( unittests_gypi = exec_script("//build/gypi_to_gn.py",
"//build/gypi_to_gn.py", [
[ rebase_path("angle_unittests.gypi"), "--replace=<(angle_path)=." ], rebase_path("angle_unittests.gypi"),
"--replace=<(angle_path)=.",
],
"scope", "scope",
[ "angle_unittests.gypi" ]) [ "angle_unittests.gypi" ])
...@@ -20,12 +23,11 @@ test("angle_unittests") { ...@@ -20,12 +23,11 @@ test("angle_unittests") {
sources = rebase_path(unittests_gypi.angle_unittests_sources, ".", "../..") sources = rebase_path(unittests_gypi.angle_unittests_sources, ".", "../..")
if (angle_enable_hlsl) { if (angle_enable_hlsl) {
sources += rebase_path(unittests_gypi.angle_unittests_hlsl_sources, ".", "../..") sources +=
rebase_path(unittests_gypi.angle_unittests_hlsl_sources, ".", "../..")
} }
sources += [ sources += [ "//gpu/angle_unittest_main.cc" ]
"//gpu/angle_unittest_main.cc",
]
deps = [ deps = [
"//base", "//base",
...@@ -38,11 +40,13 @@ test("angle_unittests") { ...@@ -38,11 +40,13 @@ test("angle_unittests") {
] ]
} }
end2end_gypi = exec_script( end2end_gypi = exec_script("//build/gypi_to_gn.py",
"//build/gypi_to_gn.py", [
[ rebase_path("angle_end2end_tests.gypi"), "--replace=<(angle_path)=." ], rebase_path("angle_end2end_tests.gypi"),
"--replace=<(angle_path)=.",
],
"scope", "scope",
[ "angle_unittests.gypi" ]) [ "angle_end2end_tests.gypi" ])
test("angle_end2end_tests") { test("angle_end2end_tests") {
include_dirs = [ include_dirs = [
...@@ -54,12 +58,11 @@ test("angle_end2end_tests") { ...@@ -54,12 +58,11 @@ test("angle_end2end_tests") {
sources = rebase_path(end2end_gypi.angle_end2end_tests_sources, ".", "../..") sources = rebase_path(end2end_gypi.angle_end2end_tests_sources, ".", "../..")
if (is_win) { if (is_win) {
sources += rebase_path(end2end_gypi.angle_end2end_tests_win_sources, ".", "../..") sources +=
rebase_path(end2end_gypi.angle_end2end_tests_win_sources, ".", "../..")
} }
sources += [ sources += [ "//gpu/angle_end2end_tests_main.cc" ]
"//gpu/angle_end2end_tests_main.cc",
]
configs += [ configs += [
"//third_party/angle:internal_config", "//third_party/angle:internal_config",
...@@ -79,3 +82,44 @@ test("angle_end2end_tests") { ...@@ -79,3 +82,44 @@ test("angle_end2end_tests") {
"//third_party/angle:translator_static", "//third_party/angle:translator_static",
] ]
} }
perftests_gypi = exec_script("//build/gypi_to_gn.py",
[
rebase_path("angle_perftests.gypi"),
"--replace=<(angle_path)=.",
],
"scope",
[ "angle_perftests.gypi" ])
test("angle_perftests") {
include_dirs = [
"testing/gtest/include",
"../../src/tests",
"../../util",
]
sources = rebase_path(perftests_gypi.angle_perf_tests_sources, ".", "../..")
if (is_win) {
sources +=
rebase_path(perftests_gypi.angle_perf_tests_win_sources, ".", "../..")
}
sources += [ "//gpu/angle_perftests_main.cc" ]
configs += [
"//third_party/angle:internal_config",
"//third_party/angle:libANGLE_config",
]
deps = [
"//base",
"//base/test:test_support",
"//testing/gmock",
"//testing/gtest",
"//third_party/angle:angle_util",
"//third_party/angle:libANGLE",
"//third_party/angle:libEGL",
"//third_party/angle:libGLESv2",
]
}
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
'<(angle_path)/src/tests/perf_tests/IndexDataManagerTest.cpp', '<(angle_path)/src/tests/perf_tests/IndexDataManagerTest.cpp',
] ]
}, },
# Everything below (except WinRT-related config) must be also maintained for GN.
# If you change anything below, also update angle/src/tests/BUILD.gn.
'dependencies': 'dependencies':
[ [
'<(angle_path)/src/angle.gyp:angle_common', '<(angle_path)/src/angle.gyp:angle_common',
......
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