| # 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/go/go_test.gni") |
| import("//src/sys/build/components.gni") |
| |
| go_test("go_tuf_repo_test") { |
| gopackages = [ "github.com/flynn/go-tuf" ] |
| |
| deps = [ |
| "//third_party/golibs:github.com/flynn/go-tuf", |
| "//third_party/golibs:gopkg.in/check.v1", |
| ] |
| } |
| |
| go_test("go_tuf_data_test") { |
| gopackages = [ "github.com/flynn/go-tuf/data" ] |
| |
| deps = [ |
| "//third_party/golibs:github.com/flynn/go-tuf", |
| "//third_party/golibs:gopkg.in/check.v1", |
| ] |
| } |
| |
| go_test("go_tuf_leveldbstore_test") { |
| gopackages = [ "github.com/flynn/go-tuf/client/leveldbstore" ] |
| |
| deps = [ |
| "//third_party/golibs:github.com/flynn/go-tuf", |
| "//third_party/golibs:gopkg.in/check.v1", |
| ] |
| } |
| |
| go_test("go_tuf_encrypted_test") { |
| gopackages = [ "github.com/flynn/go-tuf/encrypted" ] |
| |
| deps = [ |
| "//third_party/golibs:github.com/flynn/go-tuf", |
| "//third_party/golibs:gopkg.in/check.v1", |
| ] |
| } |
| |
| go_test("go_tuf_util_test") { |
| gopackages = [ "github.com/flynn/go-tuf/util" ] |
| |
| deps = [ |
| "//third_party/golibs:github.com/flynn/go-tuf", |
| "//third_party/golibs:gopkg.in/check.v1", |
| ] |
| } |
| |
| go_test("go_tuf_verify_test") { |
| gopackages = [ "github.com/flynn/go-tuf/verify" ] |
| |
| deps = [ |
| "//third_party/golibs:github.com/flynn/go-tuf", |
| "//third_party/golibs:gopkg.in/check.v1", |
| ] |
| } |
| |
| tests = [ |
| "go_tuf_data_test", |
| "go_tuf_encrypted_test", |
| "go_tuf_leveldbstore_test", |
| "go_tuf_repo_test", |
| "go_tuf_util_test", |
| "go_tuf_verify_test", |
| ] |
| |
| component_targets = [] |
| foreach(test, tests) { |
| component_name = "${test}-component" |
| component_targets += [ ":${component_name}" ] |
| fuchsia_unittest_component(component_name) { |
| deps = [ ":${test}" ] |
| component_name = test |
| manifest = "meta/${test}.cmx" |
| } |
| } |
| |
| fuchsia_test_package("go_tuf_tests") { |
| test_components = component_targets |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":go_tuf_tests" ] |
| foreach(test, tests) { |
| deps += [ ":${test}($host_toolchain)" ] |
| } |
| } |