blob: 82f76e692e653efe072336490cffb89a68a8a77d [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: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",
)
# 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/332540869): Move to sherlock and nelson test
# groups.
"//common/tests/vulkan_cts:arm64_split",
"//common/tests/vulkan_cts:arm64_zircon",
# 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 = [
],
cipd_uploads = [
],
)
# 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 = [
],
)