blob: 5c83a9da0e47b30836face30e3cb04affb82a570 [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/go/go_binary.gni")
import("//build/go/go_library.gni")
import("//build/go/go_test.gni")
import("//build/host.gni")
import("//build/testing/host_test_data.gni")
go_library("lib") {
sources = [
"actions.go",
"check_build.go",
"cmd_convert.go",
"cmd_record.go",
"main.go",
"target_connection.go",
"util.go",
]
deps = [
":zedmon",
"//third_party/golibs:github.com/golang/glog",
"//third_party/golibs:github.com/google/subcommands",
"//third_party/golibs:github.com/pkg/sftp",
"//third_party/golibs:golang.org/x/crypto",
]
}
go_binary("bin") {
library = ":lib"
output_name = "traceutil"
}
install_host_tools("traceutil") {
deps = [ ":bin" ]
outputs = [ "traceutil" ]
}
go_library("zedmon") {
source_dir = "zedmon"
sources = [
"zedmon.go",
"zedmon_test.go",
]
}
if (is_host) {
_fake_zedmon_path = "$target_gen_dir/zedmon_test/runtime_deps/fake_zedmon"
go_test("zedmon_test") {
library = ":zedmon"
args = [
"-fake_zedmon_relpath",
rebase_path(_fake_zedmon_path, root_out_dir),
]
deps = [ ":lib" ]
non_go_deps = [ ":zedmon_test_runtime_deps" ]
}
host_test_data("zedmon_test_runtime_deps") {
sources = [ "$root_out_dir/fake_zedmon" ]
outputs = [ _fake_zedmon_path ]
deps = [ "//tools/zedmon/fake_zedmon:bin" ]
}
}