| # 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_library.gni") |
| import("//build/go/go_test.gni") |
| import("//build/go/toolchain.gni") |
| import("//build/package.gni") |
| import("//build/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| go_library("pmd") { |
| name = "go.fuchsia.dev/fuchsia/src/sys/pkg/bin/pkgfs/..." |
| |
| deps = [ |
| "//garnet/go/src/far", |
| "//garnet/go/src/merkle", |
| "//garnet/go/src/thinfs:thinfs_lib", |
| "//sdk/fidl/fuchsia.sys($go_toolchain)", |
| "//src/lib/component", |
| "//src/sys/pkg/bin/pm:pm_lib", |
| ] |
| } |
| |
| package("disable-executability-restrictions") { |
| deprecated_system_image = true |
| |
| resources = [ |
| { |
| dest = "pkgfs_disable_executability_restrictions" |
| path = "disable_executability_restrictions" |
| }, |
| ] |
| } |
| |
| test_packages = [ |
| "allowlist", |
| "index", |
| "pkgfs", |
| ] |
| foreach(testpkg, test_packages) { |
| go_test("pmd_${testpkg}_test") { |
| gopackages = [ "go.fuchsia.dev/fuchsia/src/sys/pkg/bin/pkgfs/${testpkg}" ] |
| deps = [ ":pmd" ] |
| non_go_deps = [ |
| "//sdk/lib/fdio", |
| "//zircon/system/ulib/ramdevice-client", |
| ] |
| } |
| } |
| |
| test_package("pmd_tests") { |
| deps = [ "//src/storage/bin/blobfs" ] |
| binaries = [ |
| { |
| name = "blobfs" |
| }, |
| ] |
| |
| tests = [] |
| foreach(testpkg, test_packages) { |
| deps += [ ":pmd_${testpkg}_test" ] |
| tests += [ |
| { |
| name = "pmd_${testpkg}_test" |
| environments = basic_envs |
| }, |
| ] |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ ":pmd_tests" ] |
| } |