blob: 889365491eb5cc9101fce22f662806b28ac01c25 [file] [log] [blame]
# Copyright 2020 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/test.gni")
import("//src/sys/build/fuchsia_unittest_package.gni")
group("tests") {
testonly = true
deps = [
":nix-unittest-package",
":nix_hosttests($host_toolchain)",
]
}
fuchsia_unittest_package("nix-unittest-package") {
manifest = "meta/nix_test.cmx"
deps = [ ":nix" ]
}
test("nix") {
output_name = "nix-test"
sources = [
"epoll_unittests.cc",
"inotify_unittests.cc",
"random_unittests.cc",
"sendfile_unittests.cc",
]
deps = [
"//sdk/lib/fdio",
"//src/lib/nix",
"//zircon/public/lib/zx",
"//zircon/public/lib/zxtest",
"//zircon/system/ulib/fbl",
]
}
test("nix_hosttests") {
if (is_linux) {
sources = [
# TODO(fxbug.dev/64200): Add 'random_unittests.cc' to host tests once the
# prebuilt sysroot has been upgraded to a version that includes getrandom(2).
"epoll_unittests.cc",
"inotify_unittests.cc",
"sendfile_unittests.cc",
]
}
deps = [
"//zircon/public/lib/zxtest",
"//zircon/system/ulib/fbl",
]
}