blob: fbfe041d2405bea752bd40f6fb3c048a3bdd6b75 [file] [log] [blame]
# Copyright 2022 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_artifact_cipd_release",
"fuchsia_builder_group",
"fuchsia_debug_symbol_cipd_release",
"fuchsia_host_test_group",
"fuchsia_test_group",
)
fuchsia_artifact_cipd_release(
name = "cipd_release",
pkg_name = "fuchsia/driver/test_cipd_package",
deps = [
"//tests/examples/hello_world_cpp:pkg",
],
)
fuchsia_debug_symbol_cipd_release(
name = "debug_symbol_cipd_release",
pkg_name = "fuchsia/driver/test_cipd_package_debug_symbols",
deps = [
"//tests/examples/hello_world_cpp:pkg",
],
)
# Sets the tests that will run in all host-side the test groups.
host_tests = [
"//tests/examples/hello_world_cpp:hello_test_host",
]
# Sets the tests that will run in all target-side the test groups.
x86_64_target_tests = [
"//tests/examples/hello_world_cpp:test_pkg.x86_64",
]
# Sets the tests that will run in all target-side the test groups.
arm64_target_tests = [
"//tests/examples/hello_world_cpp:test_pkg.arm64",
]
fuchsia_host_test_group(
name = "tests_host",
deps = host_tests,
)
# Tests `orchestrate` against false-negatives: Validate that a test failure is
# correctly propagated up from the subrunner, through orchestrate and reported
# correctly to the builder (currently via exit code, but will be summary.json
# in the future).
fuchsia_host_test_group(
name = "tests_failing_host",
experiments_INTERNAL_USE_ONLY = ["expect-test-failures"],
deps = ["//tests/examples/hello_world_cpp:hello_failing_test"],
)
fuchsia_test_group(
name = "tests_qemu",
product_bundle = "@fuchsia_products//:core.x64",
test_target = FUCHSIA_TEST_TARGET.QEMU,
deps = x86_64_target_tests,
)
fuchsia_test_group(
name = "tests_qemu_asan",
asan_enabled = True,
product_bundle = "@fuchsia_products//:core.x64",
test_target = FUCHSIA_TEST_TARGET.QEMU,
# Run the common tests as well as our additional asan test
deps = x86_64_target_tests + [
"//tests/examples/hello_world_cpp:death_test_pkg",
],
)
fuchsia_test_group(
name = "tests_vim3",
product_bundle = "@fuchsia_products//:core.vim3",
test_target = FUCHSIA_TEST_TARGET.VIM3,
deps = arm64_target_tests,
)
fuchsia_builder_group(
name = "buildbot",
build_only = [
"//tests/examples/hello_world_cpp:pkg",
],
cipd_uploads = [
":cipd_release",
":debug_symbol_cipd_release",
],
test_groups = [
":tests_host",
":tests_failing_host",
":tests_qemu",
":tests_qemu_asan",
":tests_vim3",
],
)