| # 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-standalone-package", |
| ":zxio-unittest-package", |
| ] |
| } |
| |
| test("zxio") { |
| output_name = "zxio-test" |
| sources = [ |
| "c-compilation-test.c", |
| "create-test.cc", |
| "debuglog-test.cc", |
| "dir_v2-test.cc", |
| "directory-test.cc", |
| "dirent-test.cc", |
| "extensions-test.cc", |
| "file-test.cc", |
| "file_test_suite.cc", |
| "file_test_suite.h", |
| "file_v2-test.cc", |
| "inception-test.cc", |
| "null-test.cc", |
| "pipe-test.cc", |
| "posix-mode-test.cc", |
| "remote-test.cc", |
| "remote_v2-test.cc", |
| "rights-const-test.cc", |
| "socket-test.cc", |
| "test_directory_server_base.h", |
| "test_file_server_base.h", |
| "test_node_server.h", |
| "tty-test.cc", |
| "vmo-test.cc", |
| "vmofile-test.cc", |
| "watcher-test.cc", |
| "zxio-test.cc", |
| ] |
| deps = [ |
| "//sdk/fidl/fuchsia.boot:fuchsia.boot_llcpp", |
| "//sdk/fidl/fuchsia.hardware.pty:fuchsia.hardware.pty_llcpp", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_llcpp_testing", |
| "//sdk/fidl/fuchsia.posix.socket:fuchsia.posix.socket_llcpp_testing", |
| "//sdk/lib/fdio", |
| "//sdk/lib/fit", |
| "//sdk/lib/zxio", |
| "//sdk/lib/zxio:create_with_type", |
| "//sdk/lib/zxio:inception", |
| "//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/service:service-llcpp", |
| "//zircon/system/ulib/sync", |
| "//zircon/system/ulib/zx", |
| "//zircon/system/ulib/zxtest", |
| ] |
| |
| # TODO(fxbug.dev/94768): This target uses mutable tables which are deprecated, |
| # rather than builders. |
| configs += [ "//build/cpp:fidl-wire-deprecated-mutable-tables" ] |
| } |
| |
| test("standalone") { |
| sources = [ "standalone_main.c" ] |
| |
| disable_syslog_backend = true |
| |
| deps = [ "//sdk/lib/zxio:standalone" ] |
| configs -= [ "//build/config/fuchsia:fdio_config" ] |
| configs += [ "//build/config/fuchsia:no_cpp_standard_library" ] |
| } |
| |
| fuchsia_unittest_package("zxio-unittest-package") { |
| manifest = "meta/zxio_test.cml" |
| deps = [ ":zxio" ] |
| } |
| |
| fuchsia_unittest_component("zxio-standalone") { |
| deps = [ |
| ":standalone", |
| "//src/sys/testing/elftest", |
| ] |
| } |
| |
| fuchsia_test_package("zxio-standalone-package") { |
| test_components = [ ":zxio-standalone" ] |
| } |