blob: 8d4d1ec12413ebc8a7aa4ed5d32f4f0de0e46f0e [file] [log] [blame]
# Copyright 2017 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/go/go_binary.gni")
import("//build/host.gni")
test_packages = [
"build",
"pkg",
"pmhttp",
"repo",
]
test_labels = []
foreach(pkg, test_packages) {
pkg_ = string_replace(pkg, "/", "_")
name = "pm_${pkg_}_test"
test_labels += [ "$pkg:$name" ]
}
group("host_tests") {
testonly = true
public_deps = [ "cmd/pm:host_tests" ]
foreach(label, test_labels) {
public_deps += [ label + "($host_toolchain)" ]
}
}
go_binary("pm_bin") {
output_name = "pm"
library = "cmd/pm:main"
sdk_category = "partner"
}
fuchsia_package_with_single_component("pm") {
manifest = "meta/pm.cml"
deps = [ ":pm_bin" ]
}
install_host_tools("host") {
deps = [ ":pm_bin" ]
outputs = [ "pm" ]
}
group("tests") {
testonly = true
public_deps = [ ":host_tests" ]
}