blob: 3b1d3b0c5734086027380884a48f20ab1069bf15 [file] [log] [blame]
# Copyright 2020 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/host.gni")
import("//tools/create/goldens/golden_test.gni")
group("goldens") {
testonly = true
deps = [
":tests",
"my-component-test-cpp:tests",
"my-component-test-rust:tests",
"my-component-v2-cpp",
"my-component-v2-rust",
"my-devicetree-visitor:tests",
"my-driver-cpp",
]
}
group("tests") {
testonly = true
deps = [
":my-component-test-cpp($host_toolchain)",
":my-component-test-rust($host_toolchain)",
":my-component-v2-cpp($host_toolchain)",
":my-component-v2-rust($host_toolchain)",
":my-devicetree-visitor($host_toolchain)",
":my-driver-cpp($host_toolchain)",
]
if (is_fuchsia) {
deps += [
"my-component-test-cpp:tests",
"my-component-test-rust:tests",
"my-component-v2-cpp:tests",
"my-component-v2-rust:tests",
"my-devicetree-visitor:tests",
"my-driver-cpp:tests",
]
}
}
if (is_host) {
# Create a C++ v2 component project named `my-component-v2-cpp` and
# compare its file contents to the golden project of the same name.
golden_test("my-component-v2-cpp") {
project_type = "component"
language = "cpp"
golden_files = [
"my-component-v2-cpp/BUILD.gn",
"my-component-v2-cpp/main.cc",
"my-component-v2-cpp/meta/my_component_v2_cpp.cml",
"my-component-v2-cpp/my_component_v2_cpp.cc",
"my-component-v2-cpp/my_component_v2_cpp.h",
"my-component-v2-cpp/my_component_v2_cpp_unittest.cc",
"my-component-v2-cpp/README.md",
]
}
# Create a Rust v2 component project named `my-component-v2-rust` and
# compare its file contents to the golden project of the same name.
golden_test("my-component-v2-rust") {
project_type = "component"
language = "rust"
golden_files = [
"my-component-v2-rust/BUILD.gn",
"my-component-v2-rust/meta/my_component_v2_rust.cml",
"my-component-v2-rust/README.md",
"my-component-v2-rust/src/main.rs",
]
}
# Create a C++ component test project named `my-component-test-cpp` and
# compare its file contents to the golden project of the same name.
golden_test("my-component-test-cpp") {
project_type = "component"
project_subtype = "test"
language = "cpp"
golden_files = [
"my-component-test-cpp/BUILD.gn",
"my-component-test-cpp/meta/my_component_test_cpp.cml",
"my-component-test-cpp/README.md",
"my-component-test-cpp/my_component_test_cpp.cc",
]
}
# Create a Rust component test project named `my-component-test-rust` and
# compare its file contents to the golden project of the same name.
golden_test("my-component-test-rust") {
project_type = "component"
project_subtype = "test"
language = "rust"
golden_files = [
"my-component-test-rust/BUILD.gn",
"my-component-test-rust/meta/my_component_test_rust.cml",
"my-component-test-rust/README.md",
"my-component-test-rust/src/lib.rs",
]
}
# Create a C++ driver project named `my-driver-cpp` and
# compare its file contents to the golden project of the same name.
golden_test("my-driver-cpp") {
project_type = "driver"
language = "cpp"
golden_files = [
"my-driver-cpp/BUILD.gn",
"my-driver-cpp/README.md",
"my-driver-cpp/my_driver_cpp.h",
"my-driver-cpp/my_driver_cpp.bind",
"my-driver-cpp/my_driver_cpp.cc",
"my-driver-cpp/my_driver_cpp-info.json",
"my-driver-cpp/unit-tests.cc",
]
}
# Create a C++ driver project named `my-devicetree-visitor` and
# compare its file contents to the golden project of the same name.
golden_test("my-devicetree-visitor") {
project_type = "devicetree"
project_subtype = "visitor"
language = "cpp"
golden_files = [
"my-devicetree-visitor/BUILD.gn",
"my-devicetree-visitor/my-devicetree-visitor.cc",
"my-devicetree-visitor/my-devicetree-visitor.h",
"my-devicetree-visitor/my-devicetree-visitor.yaml",
"my-devicetree-visitor/test/my-devicetree-visitor-test.cc",
"my-devicetree-visitor/test/dts/my-devicetree-visitor.dts",
]
}
}