| # Copyright 2025 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. |
| |
| import("//build/assembly/product_bundle_test_group.gni") |
| import("//build/assembly/test_product_bundle.gni") |
| import("//build/bazel/assembly/bazel_test_product_bundle.gni") |
| import("//build/testing/environments.gni") |
| |
| # Declare a set of tests that should run on the new product bundle. |
| product_bundle_test_group("test_product_bundle") { |
| product_bundle = ":test_product.arm64" |
| environments = [ qemu_env ] |
| target_tests = [ "//examples/testing/unittests/rust:reverser_rust_unittest" ] |
| } |
| |
| ## Option 1: Build it in GN |
| |
| test_product_bundle("test_product.arm64") { |
| board_config = "//boards/arm64" |
| platform = { |
| build_type = "eng" |
| } |
| virtual_devices = [ "${root_build_dir}/arm64-emu-recommended.json" ] |
| deps = [ "//build/virtual-devices:arm64-emu-recommended" ] |
| } |
| |
| ## Option 2: Build it in Bazel |
| # |
| # NOTE: We do not currently recommend this approach because it will make the |
| # build slower. |
| |
| # Declare a new product bundle that is built in Bazel, but copied back to GN. |
| bazel_test_product_bundle("test_product.arm64_bazel") { |
| bazel_target = ":test_product.arm64" |
| bazel_inputs_from_gn = [ "//boards/arm64:arm64.bazel_input" ] |
| } |