Commit 32a1b0f7 by Jamie Madill Committed by Commit Bot

Update dEQP build config to use GN templates.

Templates make it easier to override parts of test configs. Instead of if statements we can use forwarded variables to override specific settings. This refactor makes it easier to integrate the "KHR" tests. Bug: angleproject:3353 Change-Id: Ia6e9c6d01864e5253db5d28dc087bf954aee226c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1612297Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCourtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent e77f63a2
......@@ -713,49 +713,32 @@ if (build_angle_deqp_tests && !is_fuchsia) {
libs = []
}
api_names = [
"gles2",
"gles3",
"gles31",
"egl",
]
target_defines = [
"ANGLE_DEQP_GLES2_TESTS",
"ANGLE_DEQP_GLES3_TESTS",
"ANGLE_DEQP_GLES31_TESTS",
"ANGLE_DEQP_EGL_TESTS",
]
target_sources = [
deqp_gles2_sources,
deqp_gles3_sources,
deqp_gles31_sources,
deqp_egl_sources,
]
set_defaults("angle_deqp_gtest") {
}
foreach(index,
[
0,
1,
2,
3,
]) {
api_name = api_names[index]
config_name = "angle_deqp_lib${api_name}_config"
template("angle_deqp_gtest") {
config_name = "angle_deqp_${target_name}_config"
config(config_name) {
defines = [ target_defines[index] ]
defines = invoker.defines
}
shared_library_name = "angle_deqp_lib${api_name}"
shared_library_name = "angle_deqp_lib${target_name}"
angle_shared_library(shared_library_name) {
forward_variables_from(invoker,
"*",
[
"mustpass_dir",
"data",
])
deps = [
":angle_deqp_libtester",
"${angle_root}:angle_util",
]
suppressed_configs += deqp_undefine_configs
public_configs += [ ":${config_name}" ]
public_configs += [ ":$config_name" ]
sources = target_sources[index]
sources += [
"deqp_support/angle_deqp_libtester_main.cpp",
"deqp_support/tcuANGLEPlatform.cpp",
......@@ -764,18 +747,17 @@ if (build_angle_deqp_tests && !is_fuchsia) {
}
if (!build_with_chromium) {
angle_executable("angle_deqp_${api_name}_no_gtest") {
angle_executable("angle_deqp_${target_name}_no_gtest") {
sources = [
"deqp_support/angle_deqp_tests_main.cpp",
]
deps = [
":${shared_library_name}",
":$shared_library_name",
]
}
}
test_name = "angle_deqp_${api_name}_tests"
angle_test(test_name) {
angle_test("angle_deqp_${target_name}_tests") {
deps = [
":${shared_library_name}",
":angle_deqp_gtest_support",
......@@ -786,21 +768,48 @@ if (build_angle_deqp_tests && !is_fuchsia) {
"deqp_support/angle_deqp_gtest.cpp",
]
# Use the master lists from the Khronos version for GLES. For EGL the Khronos lists use wildcards.
mustpass_dir = "external/openglcts/data/mustpass/gles/aosp_mustpass"
if (api_name == "egl") {
mustpass_dir = "android/cts"
data = invoker.data
if (is_android) {
use_native_activity = true
}
}
}
set_defaults("angle_deqp_gtest_with_data") {
# Default the master lists to the Khronos version. The EGL tests must override this.
mustpass_dir = "external/openglcts/data/mustpass/gles/aosp_mustpass"
}
template("angle_deqp_gtest_with_data") {
angle_deqp_gtest(target_name) {
forward_variables_from(invoker, "*")
data = [
"$angle_root/third_party/deqp/src/$mustpass_dir/master/${api_name}-master.txt",
"$angle_root/third_party/deqp/src/$mustpass_dir/master/${target_name}-master.txt",
"$angle_root/third_party/deqp/src/data/",
"deqp_support/deqp_${api_name}_test_expectations.txt",
"deqp_support/deqp_${target_name}_test_expectations.txt",
]
if (is_android) {
use_native_activity = true
}
}
}
angle_deqp_gtest_with_data("gles2") {
defines = [ "ANGLE_DEQP_GLES2_TESTS" ]
sources = deqp_gles2_sources
}
angle_deqp_gtest_with_data("gles3") {
defines = [ "ANGLE_DEQP_GLES3_TESTS" ]
sources = deqp_gles3_sources
}
angle_deqp_gtest_with_data("gles31") {
defines = [ "ANGLE_DEQP_GLES31_TESTS" ]
sources = deqp_gles31_sources
}
angle_deqp_gtest_with_data("egl") {
defines = [ "ANGLE_DEQP_EGL_TESTS" ]
sources = deqp_egl_sources
mustpass_dir = "android/cts"
}
}
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