| # 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/components.gni") |
| import("//build/test.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":zxio-unittest-package" ] |
| } |
| |
| test("zxio") { |
| output_name = "zxio-test" |
| sources = [ |
| "c-compilation-test.c", |
| "debuglog-test.cc", |
| "dir_v2-test.cc", |
| "dirent-test.cc", |
| "extensions-test.cc", |
| "file-test.cc", |
| "file_test_suite.cc", |
| "file_test_suite.h", |
| "file_v2-test.cc", |
| "null-test.cc", |
| "posix-mode-test.cc", |
| "remote-test.cc", |
| "remote_v2-test.cc", |
| "rights-const-test.cc", |
| "vmo-test.cc", |
| "vmofile-test.cc", |
| "zxio-test.cc", |
| ] |
| deps = [ |
| "//sdk/fidl/fuchsia.boot:fuchsia.boot_c", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_llcpp", |
| "//sdk/fidl/fuchsia.io2:fuchsia.io2_llcpp", |
| "//sdk/lib/fdio", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxtest", |
| "//zircon/system/ulib/async-default", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/fidl-async", |
| "//zircon/system/ulib/fidl-async:fidl-async-cpp", |
| "//zircon/system/ulib/zxio", |
| ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| |
| # TODO(fxbug.dev/69585): This target uses raw zx::channel with LLCPP which is deprecated. |
| # Please migrate to typed channel APIs (fidl::ClientEnd<T>, fidl::ServerEnd<T>). |
| # See linked bug for details. |
| configs += [ "//build/cpp:fidl-llcpp-deprecated-raw-channels" ] |
| } |
| |
| fuchsia_unittest_package("zxio-unittest-package") { |
| manifest = "meta/zxio_test.cmx" |
| deps = [ ":zxio" ] |
| } |