blob: 7ec00b9b4a5c5468550570c2a0774e2a739f9394 [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/components.gni")
import("//build/rust/rustc_binary.gni")
group("ansi-junk") {
testonly = true
deps = [
":package",
":tests",
]
}
group("tests") {
testonly = true
deps = [ ":ansi-junk-unittests" ]
}
rustc_binary("bin") {
output_name = "ansi_junk"
# Generates a GN target for unit-tests with the label `bin_test`, and
# a binary named `ansi_junk_bin_test`.
with_unit_tests = true
deps = [
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:tracing",
]
sources = [ "src/main.rs" ]
}
fuchsia_component("component") {
component_name = "ansi-junk"
manifest = "meta/ansi-junk.cmx"
deps = [ ":bin" ]
}
fuchsia_package("package") {
package_name = "ansi-junk"
deps = [ ":component" ]
}
# Run with `fx test ansi-junk-unittests`.
fuchsia_unittest_package("ansi-junk-unittests") {
deps = [ ":bin_test" ]
}