| # Copyright 2026 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("//build/bazel/rules/cc:fx_cc_test_binary.bzl", "fx_cc_test_binary") | |
| load("//build/bazel/rules/testing:fx_unittest_package.bzl", "fx_unittest_package") | |
| package(default_applicable_licenses = ["//:license"]) | |
| test_suite( | |
| name = "tests", | |
| tests = [":dma-buffer-test"], | |
| visibility = ["//src/devices:__pkg__"], | |
| ) | |
| fx_cc_test_binary( | |
| name = "dma-buffer-test-bin", | |
| srcs = ["dma-buffer-test.cc"], | |
| # TODO(https://fxbug.dev/495789303): Suppress -Wunused-but-set-global on | |
| # `last_cache_flush_len` in dma-buffer-test.cc (suppressed globally in GN | |
| # via //build/config:Wno-unused-but-set-variable). | |
| copts = ["-Wno-unused-but-set-global"], # @bazel2gn:skip | |
| gn_output_name = "dma-buffer-test", | |
| deps = [ | |
| "//sdk/lib/fdio", | |
| "//src/devices/lib/dma-buffer", | |
| "//src/devices/testing/fake-object", | |
| "//src/lib/fxl/test:gtest_main", | |
| "//zircon/system/ulib/fbl", | |
| "//zircon/system/ulib/zx", | |
| "@com_google_googletest//:gtest", | |
| ], | |
| ) | |
| fx_unittest_package( | |
| name = "dma-buffer-test", | |
| unit_tests = [":dma-buffer-test-bin"], | |
| ) |