blob: 654e2d28c3ab52b583be433fad027608040f374a [file] [log] [blame]
# Copyright 2023 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
load(
"@fuchsia_infra//infra:infra.bzl",
"FUCHSIA_TEST_TARGET",
"fuchsia_builder_group",
"fuchsia_cipd_releases",
"fuchsia_test_group",
)
load("@rules_license//rules:license.bzl", "license")
license(
name = "license_fuchsia",
package_name = "msd-arm-mali (Fuchsia)",
license_text = "LICENSE",
)
qemu_common_tests = [
"//drivers/msd-arm-mali:unit_tests",
"//drivers/msd-arm-mali:lifecycle_tests",
]
fuchsia_test_group(
name = "tests_qemu",
product_bundle = "@fuchsia_products//:core.x64",
test_target = FUCHSIA_TEST_TARGET.QEMU,
deps = qemu_common_tests,
)
fuchsia_test_group(
name = "tests_qemu_asan",
asan_enabled = True,
product_bundle = "@fuchsia_products//:core.x64",
test_target = FUCHSIA_TEST_TARGET.QEMU,
deps = qemu_common_tests,
)
fuchsia_test_group(
name = "tests_vim3",
# Allows the testing workflow found in //drivers/msd-arm-mali/README.md to
# be replicated in infrastructure.
environment_setup = [
"//drivers/msd-arm-mali:pkg.component",
],
hermetic = False,
product_bundle = "@fuchsia_products//:core.vim3",
test_target = FUCHSIA_TEST_TARGET.VIM3,
deps = [
"//common/examples/vkproto/transaction-elimination-test",
"//common/tests/vk_timer_query:vk_timer_query_test",
"//drivers/arm-mali/tests/vulkan:cmd_buf_benchmark_test",
"//drivers/arm-mali/tests/vulkan:vkcopy_test",
"//drivers/arm-mali/tests/vulkan:vkext_unprotected_test",
"//drivers/arm-mali/tests/vulkan:vkloop_test",
"//drivers/arm-mali/tests/vulkan:vkproto_driver_test",
"//drivers/arm-mali/tests/vulkan:vkreadback_test",
"//drivers/msd-arm-mali:integration_tests",
"//drivers/msd-arm-mali:magma_conformance_tests",
],
)
[
fuchsia_cipd_releases(
name = "msd_cipd_%s" % build_config,
cipd_pkg_name_base = "fuchsia/drivers/msd-arm-mali/%s" % build_config,
extra_content = {
"//drivers/msd-arm-mali:msd-arm-mali_licenses.spdx.json": "licenses.spdx.json",
"//drivers/msd-arm-mali:README.fuchsia": "README.fuchsia",
},
pkg = "//drivers/msd-arm-mali:pkg",
)
for build_config in ("debug", "release")
]
# Selects on `--config={debug, release}` in `.bazelrc`.
config_setting(
name = "debug_build",
values = {"compilation_mode": "dbg"},
)
config_setting(
name = "release_build",
values = {"compilation_mode": "opt"},
)
# buildifier: leave-alone
# Correponds to the `graphics-gpu-{debug, release}` presubmits in this project.
fuchsia_builder_group(
name = "infra",
build_only = [
],
test_groups = [
":tests_qemu",
":tests_qemu_asan",
":tests_vim3",
],
cipd_uploads = select({
":debug_build": [":msd_cipd_debug"],
":release_build": [":msd_cipd_release"],
"//conditions:default": [],
}),
# Default to the fastbuild compilation mode.
# This is overridden by `--config={debug, release}` in infrastructure.
compilation_mode = "fastbuild",
)
fuchsia_test_group(
name = "tests_sherlock_vulkan_cts_1",
environment_setup = [
"//drivers/msd-arm-mali:pkg.component",
],
hermetic = False,
product_bundle = "//products:test_product.sherlock",
test_target = FUCHSIA_TEST_TARGET.SHERLOCK,
# Set a 8 hour timeout for test execution per shard.
timeout_secs = 8 * 3600,
deps = [
"//common/tests/vulkan_cts:arm64_split_1",
],
)
fuchsia_test_group(
name = "tests_sherlock_vulkan_cts_2",
environment_setup = [
"//drivers/msd-arm-mali:pkg.component",
],
hermetic = False,
product_bundle = "//products:test_product.sherlock",
test_target = FUCHSIA_TEST_TARGET.SHERLOCK,
# Set a 8 hour timeout for test execution per shard.
timeout_secs = 8 * 3600,
deps = [
"//common/tests/vulkan_cts:arm64_split_2",
],
)
fuchsia_test_group(
name = "tests_sherlock_vulkan_cts_3",
environment_setup = [
"//drivers/msd-arm-mali:pkg.component",
],
hermetic = False,
product_bundle = "//products:test_product.sherlock",
test_target = FUCHSIA_TEST_TARGET.SHERLOCK,
# Set a 8 hour timeout for test execution per shard.
timeout_secs = 8 * 3600,
deps = [
"//common/tests/vulkan_cts:arm64_split_3",
"//common/tests/vulkan_cts:arm64_zircon",
],
)
fuchsia_test_group(
name = "tests_nelson_vulkan_cts_1",
environment_setup = [
"//drivers/msd-arm-mali:pkg.component",
],
hermetic = False,
product_bundle = "//products:test_product.nelson",
test_target = FUCHSIA_TEST_TARGET.NELSON,
# Set a 8 hour timeout for test execution per shard.
timeout_secs = 8 * 3600,
deps = [
"//common/tests/vulkan_cts:arm64_split_1",
],
)
fuchsia_test_group(
name = "tests_nelson_vulkan_cts_2",
environment_setup = [
"//drivers/msd-arm-mali:pkg.component",
],
hermetic = False,
product_bundle = "//products:test_product.nelson",
test_target = FUCHSIA_TEST_TARGET.NELSON,
# Set a 8 hour timeout for test execution per shard.
timeout_secs = 8 * 3600,
deps = [
"//common/tests/vulkan_cts:arm64_split_2",
],
)
fuchsia_test_group(
name = "tests_nelson_vulkan_cts_3",
environment_setup = [
"//drivers/msd-arm-mali:pkg.component",
],
hermetic = False,
product_bundle = "//products:test_product.nelson",
test_target = FUCHSIA_TEST_TARGET.NELSON,
# Set a 8 hour timeout for test execution per shard.
timeout_secs = 8 * 3600,
deps = [
"//common/tests/vulkan_cts:arm64_split_3",
"//common/tests/vulkan_cts:arm64_zircon",
],
)
# buildifier: leave-alone
# For running the vulkan CTS via optional presubmit.
# CLs can run this in CQ by manually selecting the `graphics-gpu-vulkan-cts`
# tryjob.
fuchsia_builder_group(
name = "infra_vulkan_cts",
build_only = [
# TODO(https://fxbug.dev/332540692): Move to a nuc test group.
"//common/tests/vulkan_cts:x64_split",
"//common/tests/vulkan_cts:x64_zircon",
],
test_groups = [
":tests_sherlock_vulkan_cts_1",
":tests_sherlock_vulkan_cts_2",
":tests_sherlock_vulkan_cts_3",
":tests_nelson_vulkan_cts_1",
":tests_nelson_vulkan_cts_2",
":tests_nelson_vulkan_cts_3",
],
cipd_uploads = [
],
compilation_mode = "opt",
)
# buildifier: leave-alone
# The Vulkan CTS take quite long to run, but building these tests and
# its dependencies (namely the SD test products) finish relatively
# quickly.
# As such, build the Vulkan CTS targets and its test product to minimize
# uncaught regressions.
# We cannot place this target inside `:infra`, since that would require fetching
# internal CIPD artifacts from a public builder.
fuchsia_builder_group(
name = "infra_vulkan_cts_build_only",
build_only = [
":infra_vulkan_cts",
],
test_groups = [
],
cipd_uploads = [
],
compilation_mode = "opt",
)
# buildifier: leave-alone
# For experimental build targets and flaky tests.
# CLs can run this in CQ by manually selecting the `graphics-gpu-canary` tryjob
# or by including the `Cq-Include-Trybots: luci.fuchsia.try:graphics-gpu-canary`
# footer in the commit message.
fuchsia_builder_group(
name = "infra_canary",
build_only = [
],
test_groups = [
],
cipd_uploads = [
],
)