blob: 7573c555fcc07d980fc4d606fbb7179f70087fc2 [file]
# 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",
]
sources = [
"allowlist/allowlist.go",
"allowlist/allowlist_test.go",
"blobfs/blobfs.go",
"index/dynamic_index.go",
"index/dynamic_index_test.go",
"index/static_index.go",
"index/static_index_test.go",
"iou/iou.go",
"pkgfs/ctl_directory.go",
"pkgfs/dents.go",
"pkgfs/metafar.go",
"pkgfs/needs_directory.go",
"pkgfs/package_directory.go",
"pkgfs/package_install_directory.go",
"pkgfs/package_list_directories.go",
"pkgfs/pkgfs.go",
"pkgfs/pkgfs_test.go",
"pkgfs/root_directory.go",
"pkgfs/unsupported_vnodes.go",
"pkgfs/validation_directory.go",
"pkgfs/validation_directory_test.go",
"pkgfs/versions_directory.go",
"pkgsvr/pkgsvr.go",
"ramdisk/ramdisk.go",
]
}
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" ]
}