blob: 89af7ccdfc60c15eeeaa729b171c15bfc4aeccba [file] [log] [blame]
# Copyright 2021 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/components.gni")
import("//build/rust/rustc_macro.gni")
import("//build/rust/rustc_test.gni")
rustc_macro("fixture") {
edition = "2021"
source_root = "src/lib.rs"
deps = [
"//third_party/rust_crates:quote",
# FIXME(https://fxbug.dev/332277415): Please update to syn 2.x.
# "//third_party/rust_crates:syn",
"//third_party/rust_crates:syn-v1_0_98",
]
sources = [ "src/lib.rs" ]
configs -= [ "//build/config/rust/lints:allow_unused_results" ]
}
rustc_test("fixture-tests") {
edition = "2021"
source_root = "src/tests.rs"
deps = [ ":fixture" ]
test_deps = [
"//src/lib/fuchsia-async",
"//third_party/rust_crates:futures",
]
sources = [ "src/tests.rs" ]
configs -= [ "//build/config/rust/lints:allow_unused_results" ]
}
fuchsia_unittest_package("fixture-tests-pkg") {
package_name = "fixture-tests"
component_name = "fixture-tests"
deps = [ ":fixture-tests" ]
}
group("tests") {
testonly = true
deps = [ ":fixture-tests-pkg" ]
}