blob: 351ab58e7e9a27e36a731c3ab93c9d5c3071ba50 [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-v1-cpp",
"my-component-v1-rust",
"my-component-v2-cpp",
"my-component-v2-rust",
]
}
group("tests") {
testonly = true
deps = [
":my-component-v1-cpp($host_toolchain)",
":my-component-v1-rust($host_toolchain)",
":my-component-v2-cpp($host_toolchain)",
":my-component-v2-rust($host_toolchain)",
"my-component-v1-cpp:tests",
"my-component-v1-rust:tests",
"my-component-v2-cpp:tests",
"my-component-v2-rust:tests",
]
}
if (is_host) {
# Create a Rust v1 component project named `my-component-v1-rust` and
# compare its file contents to the golden project of the same name.
golden_test("my-component-v1-rust") {
project_type = "component-v1"
language = "rust"
golden_files = [
"my-component-v1-rust/BUILD.gn",
"my-component-v1-rust/meta/my-component-v1-rust.cmx",
"my-component-v1-rust/meta/my-component-v1-rust_test.cmx",
"my-component-v1-rust/README.md",
"my-component-v1-rust/src/main.rs",
]
}
# Create a C++ v1 component project named `my-component-v1-cpp` and
# compare its file contents to the golden project of the same name.
golden_test("my-component-v1-cpp") {
project_type = "component-v1"
language = "cpp"
golden_files = [
"my-component-v1-cpp/BUILD.gn",
"my-component-v1-cpp/main.cc",
"my-component-v1-cpp/meta/my-component-v1-cpp.cmx",
"my-component-v1-cpp/meta/my-component-v1-cpp_test.cmx",
"my-component-v1-cpp/my_component_v1_cpp_unittest.cc",
"my-component-v1-cpp/my_component_v1_cpp.cc",
"my-component-v1-cpp/my_component_v1_cpp.h",
"my-component-v1-cpp/README.md",
]
}
# 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-v2"
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/meta/my-component-v2-cpp_unittests.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_test.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-v2"
language = "rust"
golden_files = [
"my-component-v2-rust/BUILD.gn",
"my-component-v2-rust/meta/my-component-v2-rust.cml",
"my-component-v2-rust/meta/my-component-v2-rust_test.cml",
"my-component-v2-rust/README.md",
"my-component-v2-rust/src/main.rs",
]
}
}