| # 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_assembly_configuration_cipd_release", |
| "fuchsia_builder_group", |
| "fuchsia_cipd_releases", |
| "fuchsia_test_group", |
| ) |
| load( |
| "@rules_fuchsia//fuchsia:assembly.bzl", |
| "fuchsia_board_input_bundle", |
| ) |
| load("@rules_license//rules:license.bzl", "license") |
| |
| package(default_visibility = ["//visibility:public"]) |
| |
| exports_files( |
| glob( |
| ["**/*"], |
| exclude_directories = 0, |
| ), |
| ) |
| |
| license( |
| name = "license_fuchsia", |
| package_name = "pcf8563 (Fuchsia)", |
| license_text = "LICENSE", |
| ) |
| |
| qemu_tests = [ |
| "//src/drivers/pcf8563:test_x64", |
| ] |
| |
| fuchsia_test_group( |
| name = "tests_qemu", |
| product_bundle = "@fuchsia_products//:core.x64", |
| test_target = FUCHSIA_TEST_TARGET.QEMU, |
| deps = qemu_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_tests, |
| ) |
| |
| fuchsia_test_group( |
| name = "tests_vim3", |
| product_bundle = "//products:test_product.vim3", |
| test_target = FUCHSIA_TEST_TARGET.VIM3, |
| deps = [ |
| #TODO(b/401963738) the BUILD rule for this test no longer aliases the default |
| #condition to the unversioned package so we just point to it directly. |
| "@fuchsia_sdk//python/rtc_conformance_test/unversioned:rtc_conformance_test", |
| ], |
| ) |
| |
| fuchsia_cipd_releases( |
| name = "rtc_cipd_release", |
| cipd_pkg_name_base = "fuchsia/drivers/rtc/pcf8563", |
| extra_content = { |
| "//src/drivers/pcf8563:pcf8563_licenses.spdx.json": "licenses.spdx.json", |
| "//src/drivers/pcf8563:README.fuchsia": "README.fuchsia", |
| }, |
| pkg = "//src/drivers/pcf8563:pkg", |
| ) |
| |
| fuchsia_assembly_configuration_cipd_release( |
| name = "rtc_bib_set_release", |
| dir = "//boards:rtc_set", |
| pkg_name = "fuchsia/drivers/rtc/board_input_bundle_set", |
| ) |
| |
| # buildifier: leave-alone |
| fuchsia_builder_group( |
| name = "infra", |
| build_only = [ |
| "//boards:rtc", |
| ], |
| test_groups = [ |
| ":tests_qemu", |
| ":tests_qemu_asan", |
| ":tests_vim3", |
| ], |
| cipd_uploads = [ |
| ":rtc_cipd_release", |
| ":rtc_bib_set_release", |
| ], |
| ) |
| |
| genrule( |
| name = "stable_status_txt", |
| outs = ["stable_status.txt"], |
| |
| # If bazel is executed with the --workspace_status_script=<script> arg, |
| # then a file named "stable-status.txt" should exist in the out |
| # directory containing several details about the current build. |
| # |
| # One line should have the format: |
| # ... |
| # STABLE_UNIQUE_VERSION a.b.c.1.2.3 |
| # ... |
| # |
| # (See //scripts/build_status.sh for how that file is generated.) |
| # |
| # Grep for that line and cut out the prefix using a simple prefix cut |
| # (to avoid the possibility of other tools (awk / sed) from not being |
| # available on the machine) |
| # |
| # Save the final version string to a new file. |
| cmd = "grep STABLE_UNIQUE_VERSION bazel-out/stable-status.txt | cut -c 23- > $@", |
| stamp = 1, |
| ) |