| # Copyright 2022 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_library.gni") |
| import("//build/go/go_test.gni") |
| |
| go_library("result") { |
| sources = [ |
| "checks.go", |
| "config.go", |
| "init.go", |
| "metrics.go", |
| "result.go", |
| "spdx.go", |
| "spdx_test.go", |
| "template.go", |
| "world.go", |
| ] |
| deps = [ |
| "//third_party/golibs:github.com/google/licenseclassifier", |
| "//third_party/golibs:github.com/spdx/tools-golang", |
| "//tools/check-licenses/directory", |
| "//tools/check-licenses/project", |
| "//tools/lib/logger", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":check-licenses_result_tests($host_toolchain)" ] |
| } |
| |
| if (is_host) { |
| go_test("check-licenses_result_tests") { |
| library = ":result" |
| args = [ |
| "--test_data_dir", |
| rebase_path("$target_gen_dir/testdata", root_build_dir), |
| ] |
| non_go_deps = [ "testdata" ] |
| } |
| } |