| # Copyright 2018 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") |
| import("//build/package.gni") |
| import("//build/go/toolchain.gni") |
| |
| go_library("system_update_package_lib") { |
| name = "system_update_package" |
| |
| deps = [ |
| "//garnet/public/fidl/fuchsia.amber($go_toolchain)", |
| "//garnet/public/fidl/fuchsia.sys($go_toolchain)", |
| "//garnet/public/lib/component/go/src/app", |
| "//garnet/public/lib/syslog/go/src/syslog", |
| ] |
| } |
| |
| go_binary("sys_updater") { |
| output_name = "system_updater" |
| gopackage = "system_update_package/cmd/updater" |
| |
| deps = [ ":system_update_package_lib" ] |
| } |
| |
| go_test("processor_test") { |
| gopackage = "system_update_package" |
| deps = [ ":system_update_package_lib" ] |
| } |
| |
| package("system_updater") { |
| deps = [ |
| ":sys_updater" |
| ] |
| |
| binary = "system_updater" |
| |
| resources = [ |
| { |
| path = rebase_path("images") |
| dest = "images" |
| }, |
| ] |
| meta = [ |
| { |
| path = rebase_path("cmd/updater/meta/system_updater.cmx") |
| dest = "system_updater.cmx" |
| } |
| ] |
| } |
| |
| package("system_updater_tests") { |
| testonly = true |
| |
| deps = [ |
| ":processor_test" |
| ] |
| resources = [ |
| { |
| path = rebase_path("test_images") |
| dest = "images" |
| }, |
| { |
| path = rebase_path("test_packages") |
| dest = "packages" |
| } |
| ] |
| tests = [ |
| { |
| name = "processor_test" |
| } |
| ] |
| } |