| # 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_library.gni") |
| import("//build/go/go_test.gni") |
| import("//build/testing/host_test_data.gni") |
| |
| if (is_host) { |
| zbi_tool_target = "//zircon/tools/zbi($host_toolchain)" |
| |
| host_test_data("test_tools") { |
| sources = [ |
| get_label_info(zbi_tool_target, "root_out_dir") + "/zbi", |
| "//third_party/android/platform/external/avb/avbtool.py", |
| ] |
| outputs = [ "$root_out_dir/test_data/system-tests/{{source_file_part}}" ] |
| deps = [ zbi_tool_target ] |
| } |
| } |
| |
| go_library("host-target-testing") { |
| testonly = true |
| name = "go.fuchsia.dev/fuchsia/src/testing/host-target-testing/..." |
| deps = [ |
| "//src/lib/versioning/version-history/go:version-history", |
| "//src/sys/pkg/bin/pm:pm_lib", |
| "//src/sys/pkg/lib/far/go:far", |
| "//src/sys/pkg/lib/repo", |
| "//third_party/golibs:github.com/theupdateframework/go-tuf", |
| "//third_party/golibs:golang.org/x/crypto", |
| "//tools/lib/retry", |
| "//tools/net/sshutil", |
| ] |
| non_go_deps = [ ":test_tools($host_toolchain)" ] |
| sources = [ |
| "artifacts/archive.go", |
| "artifacts/archive_test.go", |
| "artifacts/build.go", |
| "artifacts/builder.go", |
| "avb/avb.go", |
| "avb/avb_test.go", |
| "cli/archive.go", |
| "cli/build.go", |
| "cli/device.go", |
| "cli/installer.go", |
| "device/device.go", |
| "device/finder.go", |
| "device/monotonic.go", |
| "device/node_names.go", |
| "device/node_names_test.go", |
| "device/resolver.go", |
| "errutil/errutil.go", |
| "flasher/flasher.go", |
| "flasher/flasher_test.go", |
| "omaha/omaha.go", |
| "omaha/omaha_test.go", |
| "packages/package.go", |
| "packages/package_builder.go", |
| "packages/package_builder_test.go", |
| "packages/package_test.go", |
| "packages/repo.go", |
| "packages/server.go", |
| "paver/paver.go", |
| "paver/paver_test.go", |
| "sl4f/client.go", |
| "sl4f/file.go", |
| "sl4f/paver.go", |
| "updater/updater.go", |
| "util/util.go", |
| "util/util_test.go", |
| "zbi/zbi.go", |
| "zbi/zbi_test.go", |
| ] |
| } |
| |
| test_packages = [ |
| "artifacts", |
| "avb", |
| "device", |
| "packages", |
| "paver", |
| "flasher", |
| "omaha", |
| "util", |
| "zbi", |
| ] |
| foreach(testpkg, test_packages) { |
| go_test("host-target-testing-${testpkg}-test") { |
| gopackages = |
| [ "go.fuchsia.dev/fuchsia/src/testing/host-target-testing/${testpkg}" ] |
| deps = [ ":host-target-testing" ] |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| |
| public_deps = [] |
| foreach(testpkg, test_packages) { |
| public_deps += [ ":host-target-testing-${testpkg}-test($host_toolchain)" ] |
| } |
| } |