| # Copyright 2019 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/bazel/bazel_host_tool.gni") |
| import("//build/go/go_binary.gni") |
| import("//build/go/go_library.gni") |
| import("//build/go/go_test.gni") |
| |
| go_test("covargs_lib_tests") { |
| embed = [ ":covargs_lib" ] |
| sources = [ "report_test.go" ] |
| } |
| |
| go_test("covargs_tests") { |
| embed = [ ":main" ] |
| sources = [ "cmd/main_test.go" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":covargs_lib_tests($host_toolchain)", |
| ":covargs_tests($host_toolchain)", |
| ] |
| } |
| |
| if (is_host) { |
| bazel_host_tool("covargs") { |
| bazel_target = ":covargs" |
| bazel_output_path = "{{BAZEL_TARGET_OUT_DIR}}/covargs_/covargs" |
| } |
| } |
| |
| ## BAZEL2GN SENTINEL - DO NOT EDIT BELOW THIS LINE ## |
| # |
| # ________ _________ ________ ________ |
| # |\ ____\|\___ ___\\ __ \|\ __ \ |
| # \ \ \___|\|___ \ \_\ \ \|\ \ \ \|\ \ |
| # \ \_____ \ \ \ \ \ \ \\\ \ \ ____\ |
| # \|____|\ \ \ \ \ \ \ \\\ \ \ \___| |
| # ____\_\ \ \ \__\ \ \_______\ \__\ |
| # |\_________\ \|__| \|_______|\|__| |
| # \|_________| |
| # |
| # |
| # AUTO-GENERATED - DO NOT EDIT |
| # |
| # The targets below are auto-generated based on the targets defined in the |
| # BUILD.bazel file from the same directory. If you made changes to targets in |
| # Bazel, instead of editing this file manually, run: |
| # |
| # > fx bazel2gn |
| # |
| # Please do NOT edit this file directly. Instead, edit the BUILD.bazel file and |
| # rerun bazel2gn. |
| |
| import("//build/tools/bazel2gn/bazel_migration.gni") |
| |
| # A self-verification target for generated content in this file. |
| if (is_host) { |
| verify_bazel2gn("verify_bazel2gn") { |
| } |
| } |
| |
| if (is_host) { |
| go_library("codecoverage_api") { |
| sources = [ "api/third_party/codecoverage/code_coverage.pb.go" ] |
| deps = [ "//third_party/golibs:google.golang.org/protobuf" ] |
| } |
| } |
| if (is_host) { |
| go_library("llvm_api") { |
| sources = [ |
| "api/llvm/doc.go", |
| "api/llvm/llvm.go", |
| ] |
| } |
| } |
| if (is_host) { |
| go_library("covargs_lib") { |
| sources = [ |
| "common.go", |
| "report.go", |
| ] |
| visibility = [ "//*" ] |
| deps = [ |
| ":codecoverage_api", |
| ":llvm_api", |
| "//third_party/golibs:golang.org/x/sync/errgroup", |
| "//third_party/golibs:google.golang.org/protobuf", |
| "//tools/debug/symbolize:symbolize_lib", |
| "//tools/lib/logger", |
| "//tools/testing/runtests", |
| ] |
| } |
| } |
| if (is_host) { |
| go_library("main") { |
| sources = [ "cmd/main.go" ] |
| deps = [ |
| ":covargs_lib", |
| ":llvm_api", |
| "//third_party/golibs:golang.org/x/sync/errgroup", |
| "//tools/debug/symbolize:symbolize_lib", |
| "//tools/lib/cache", |
| "//tools/lib/color", |
| "//tools/lib/flagmisc", |
| "//tools/lib/logger", |
| "//tools/lib/osmisc", |
| "//tools/lib/retry", |
| "//tools/testing/runtests", |
| ] |
| } |
| } |