| # Copyright 2016 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/testing/cc_test_executable.gni") |
| |
| group("fxl_cli") { |
| public_deps = [ ":cli" ] |
| } |
| |
| cc_test_executable("fxl_unittests") { |
| testonly = true |
| |
| sources = [ |
| "command_line_unittest.cc", |
| "functional/apply_unittest.cc", |
| "functional/cancelable_callback_unittest.cc", |
| "log_settings_command_line_unittest.cc", |
| "memory/ref_counted_unittest.cc", |
| "memory/weak_ptr_unittest.cc", |
| "observer_list_unittest.cc", |
| "strings/ascii_unittest.cc", |
| "strings/concatenate_unittest.cc", |
| "strings/join_strings_unittest.cc", |
| "strings/split_string_unittest.cc", |
| "strings/string_number_conversions_unittest.cc", |
| "strings/string_printf_unittest.cc", |
| "strings/substitute_unittest.cc", |
| "strings/trim_unittest.cc", |
| "synchronization/thread_annotations_unittest.cc", |
| "test/test_settings_unittest.cc", |
| ] |
| |
| deps = [ |
| ":fxl", |
| "test:gtest_main", |
| "test:test_settings", |
| "//sdk/lib/syslog/cpp", |
| "//src/lib/files", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| ] |
| } |
| |
| if (is_fuchsia) { |
| import("//build/components.gni") |
| |
| fuchsia_unittest_package("fxl_tests") { |
| manifest = "meta/fxl_unittests.cml" |
| deps = [ ":fxl_unittests" ] |
| test_specs = { |
| log_settings = { |
| max_severity = "FATAL" |
| } |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":fxl_tests" ] |
| } |
| } |
| |
| ## BAZEL2GN SENTINEL - DO NOT EDIT BELOW THIS LINE ## |
| # |
| # ________ _________ ________ ________ |
| # |\ ____\|\___ ___\\ __ \|\ __ \ |
| # \ \ \___|\|___ \ \_\ \ \|\ \ \ \|\ \ |
| # \ \_____ \ \ \ \ \ \ \\\ \ \ ____\ |
| # \|____|\ \ \ \ \ \ \ \\\ \ \ \___| |
| # ____\_\ \ \ \__\ \ \_______\ \__\ |
| # |\_________\ \|__| \|_______|\|__| |
| # \|_________| |
| # |
| # |
| # AUTO-GENERATED - DO NOT EDIT |
| # |
| # The targets below are auto-generated based on the targets defined in the |
| # BUILD.bazel file from the same directory. If you made changes to targets in |
| # Bazel, instead of editing this file manually, run: |
| # |
| # > fx bazel2gn |
| # |
| # Please do NOT edit this file directly. Instead, edit the BUILD.bazel file and |
| # rerun bazel2gn. |
| |
| import("//build/tools/bazel2gn/bazel_migration.gni") |
| |
| # A self-verification target for generated content in this file. |
| if (is_host) { |
| verify_bazel2gn("verify_bazel2gn") { |
| } |
| } |
| |
| source_set("common") { |
| public = [ |
| "build_config.h", |
| "fxl_export.h", |
| "macros.h", |
| ] |
| visibility = [ |
| ":*", |
| "//src/lib/files:*", |
| "//src/lib/fsl/handles:*", |
| "//src/lib/fsl/io:*", |
| "//src/lib/fsl/socket:*", |
| "//src/lib/fsl/tasks:*", |
| ] |
| } |
| source_set("memory") { |
| sources = [ "memory/weak_ptr_internal.cc" ] |
| public = [ |
| "memory/ref_counted.h", |
| "memory/ref_counted_internal.h", |
| "memory/ref_ptr.h", |
| "memory/ref_ptr_internal.h", |
| "memory/unique_object.h", |
| "memory/weak_ptr.h", |
| "memory/weak_ptr_internal.h", |
| ] |
| visibility = [ |
| ":*", |
| "//src/lib/files:*", |
| "//src/lib/fsl/io:*", |
| "//src/lib/fsl/vmo:*", |
| ] |
| public_deps = [ |
| ":common", |
| "//sdk/lib/zircon-assert", |
| ] |
| } |
| source_set("functional") { |
| public = [ |
| "functional/apply.h", |
| "functional/cancelable_callback.h", |
| ] |
| visibility = [ ":*" ] |
| public_deps = [ |
| ":common", |
| ":memory", |
| ] |
| } |
| source_set("third_party") { |
| sources = [ "third_party/icu/icu_utf.cc" ] |
| public = [ "third_party/icu/icu_utf.h" ] |
| configs += [ "//build/config:Wno-implicit-fallthrough" ] |
| visibility = [ ":*" ] |
| } |
| source_set("string_printf") { |
| sources = [ "strings/string_printf.cc" ] |
| public = [ "strings/string_printf.h" ] |
| visibility = [ |
| ":*", |
| "//src/lib/files:*", |
| "//src/lib/uuid:*", |
| ] |
| public_deps = [ ":common" ] |
| } |
| source_set("strings") { |
| sources = [ |
| "strings/ascii.cc", |
| "strings/concatenate.cc", |
| "strings/split_string.cc", |
| "strings/string_number_conversions.cc", |
| "strings/substitute.cc", |
| "strings/trim.cc", |
| "strings/utf_codecs.cc", |
| ] |
| public = [ |
| "strings/ascii.h", |
| "strings/concatenate.h", |
| "strings/join_strings.h", |
| "strings/split_string.h", |
| "strings/string_number_conversions.h", |
| "strings/substitute.h", |
| "strings/trim.h", |
| "strings/utf_codecs.h", |
| ] |
| visibility = [ |
| ":*", |
| "//src/lib/files:*", |
| "//src/lib/uuid:*", |
| ] |
| public_deps = [ |
| ":common", |
| ":string_printf", |
| ":third_party", |
| ] |
| } |
| source_set("fxl") { |
| public = [ "observer_list.h" ] |
| public_deps = [ |
| ":common", |
| ":functional", |
| ":memory", |
| ":strings", |
| "//sdk/lib/fit", |
| "//src/lib/files", |
| ] |
| } |
| source_set("cli") { |
| sources = [ "log_settings_command_line.cc" ] |
| public = [ "log_settings_command_line.h" ] |
| public_deps = [ |
| ":cli_no_logging", |
| "//sdk/lib/syslog/cpp", |
| ] |
| } |
| source_set("cli_no_logging") { |
| sources = [ "command_line.cc" ] |
| public = [ |
| "command_line.h", |
| "observer_list.h", |
| ] |
| public_deps = [ ":fxl" ] |
| } |