blob: a033d05efd2706a7ade0a4d622e30e330ffa4845 [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/components.gni")
import("//build/test.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",
"random_unittests.cc",
"sendfile_unittests.cc",
"statx_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",
"sendfile_unittests.cc",
# TODO(fxbug.dev/69302): Add 'statx_unittests.cc' to host tests once the
# prebuilt sysroot supports sys/statx.h.
#"statx_unittests.cc",
]
}
deps = [
"//zircon/public/lib/zxtest",
"//zircon/system/ulib/fbl",
]
}