blob: d2acd720d9f0b64f21dc6fcca9425a10fd6126c3 [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/go/go_binary.gni")
import("//build/go/go_library.gni")
import("//build/go/go_test.gni")
go_binary("bundle_fetcher") {
library = ":main"
}
install_host_tools("host") {
deps = [ ":bundle_fetcher" ]
outputs = [ "bundle_fetcher" ]
}
go_library("main") {
source_dir = "cmd"
sources = [
"main.go",
"product_list.go",
"product_list_test.go",
]
deps = [
":bundler",
"//third_party/golibs:cloud.google.com/go/storage",
"//third_party/golibs:github.com/google/subcommands",
"//third_party/golibs:google.golang.org/api/iterator",
"//tools/artifactory:lib",
"//tools/build",
"//tools/lib/color",
"//tools/lib/logger",
]
}
go_library("bundler") {
source_dir = "bundler"
sources = [
"cloud_sink.go",
"cloud_sink_mock.go",
"cloud_sink_test.go",
]
deps = [
"//src/sys/pkg/bin/pm/build",
"//third_party/golibs:cloud.google.com/go/storage",
"//third_party/golibs:google.golang.org/api/iterator",
"//tools/build",
"//tools/lib/logger",
"//tools/lib/osmisc",
]
}
go_test("bundler_lib_tests") {
library = ":bundler"
deps = [ "//third_party/golibs:github.com/google/go-cmp" ]
}
go_test("bundle_fetcher_main_tests") {
library = ":main"
deps = [ "//third_party/golibs:github.com/google/go-cmp" ]
}
group("tests") {
testonly = true
deps = [
":bundle_fetcher_main_tests($host_toolchain)",
":bundler_lib_tests($host_toolchain)",
]
}