| # 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/dart/dart_tool.gni") | 
 | import("//build/dart/test.gni") | 
 | import("//build/host.gni") | 
 | import("//build/testing/host_test_data.gni") | 
 |  | 
 | group("tests") { | 
 |   testonly = true | 
 |  | 
 |   deps = [ ":codesize_tests($host_toolchain)" ] | 
 | } | 
 |  | 
 | if (is_host) { | 
 |   host_test_data("bloaty_reports") { | 
 |     sources = | 
 |         [ "//scripts/codesize/testdata/libasync-default.so.bloaty_report_pb" ] | 
 |     outputs = [ | 
 |       "$root_out_dir/test_data/codesize/libasync-default.so.bloaty_report_pb", | 
 |     ] | 
 |   } | 
 | } | 
 |  | 
 | dart_test("codesize_tests") { | 
 |   source_dir = "lib" | 
 |  | 
 |   # Library sources | 
 |   sources = [ | 
 |     "bloaty.dart", | 
 |     "build.dart", | 
 |     "cli.dart", | 
 |     "codesize.dart", | 
 |     "common_util.dart", | 
 |     "crash_handling.dart", | 
 |     "io.dart", | 
 |     "queries/categories/categories.dart", | 
 |     "queries/categories/fidl_cpp.dart", | 
 |     "queries/categories/fidl_go.dart", | 
 |     "queries/categories/fidl_rust.dart", | 
 |     "queries/categories/untraceable.dart", | 
 |     "queries/code_category.dart", | 
 |     "queries/crates.dart", | 
 |     "queries/dump_names.dart", | 
 |     "queries/index.dart", | 
 |     "queries/mock_query.dart", | 
 |     "queries/source_lang.dart", | 
 |     "queries/unique_symbol.dart", | 
 |     "reflect.dart", | 
 |     "render/ast.dart", | 
 |     "render/html.dart", | 
 |     "render/terminal.dart", | 
 |     "render/tsv.dart", | 
 |     "run_queries.dart", | 
 |     "symbols/cache.dart", | 
 |     "symbols/repo.dart", | 
 |     "types.dart", | 
 |   ] | 
 |  | 
 |   # Tests | 
 |   sources += [ | 
 |     "cli_test.dart", | 
 |     "crash_handling_test.dart", | 
 |     "queries/categories/fidl_cpp_test.dart", | 
 |     "queries/categories/fidl_rust_test.dart", | 
 |     "queries/crates_test.dart", | 
 |     "queries/unique_symbol_test.dart", | 
 |     "reflect_test.dart", | 
 |     "render/terminal_test.dart", | 
 |     "render/tsv_test.dart", | 
 |     "run_queries_test.dart", | 
 |     "symbols/cache_test.dart", | 
 |     "testing_util.dart", | 
 |   ] | 
 |  | 
 |   # Note: keep in sync with `codesize.packages`. | 
 |   deps = [ | 
 |     "//scripts/fxutils", | 
 |     "//third_party/dart-pkg/pub/_discoveryapis_commons", | 
 |     "//third_party/dart-pkg/pub/args", | 
 |     "//third_party/dart-pkg/pub/async", | 
 |     "//third_party/dart-pkg/pub/charcode", | 
 |     "//third_party/dart-pkg/pub/collection", | 
 |     "//third_party/dart-pkg/pub/convert", | 
 |     "//third_party/dart-pkg/pub/crypto", | 
 |     "//third_party/dart-pkg/pub/file", | 
 |     "//third_party/dart-pkg/pub/fixnum", | 
 |     "//third_party/dart-pkg/pub/gcloud", | 
 |     "//third_party/dart-pkg/pub/googleapis", | 
 |     "//third_party/dart-pkg/pub/googleapis_auth", | 
 |     "//third_party/dart-pkg/pub/html", | 
 |     "//third_party/dart-pkg/pub/http", | 
 |     "//third_party/dart-pkg/pub/http_parser", | 
 |     "//third_party/dart-pkg/pub/io", | 
 |     "//third_party/dart-pkg/pub/meta", | 
 |     "//third_party/dart-pkg/pub/path", | 
 |     "//third_party/dart-pkg/pub/pedantic", | 
 |     "//third_party/dart-pkg/pub/platform", | 
 |     "//third_party/dart-pkg/pub/pool", | 
 |     "//third_party/dart-pkg/pub/process", | 
 |     "//third_party/dart-pkg/pub/protobuf", | 
 |     "//third_party/dart-pkg/pub/source_span", | 
 |     "//third_party/dart-pkg/pub/stack_trace", | 
 |     "//third_party/dart-pkg/pub/string_scanner", | 
 |     "//third_party/dart-pkg/pub/term_glyph", | 
 |     "//third_party/dart-pkg/pub/typed_data", | 
 |     "//third_party/dart-pkg/pub/vm_service", | 
 |     "//third_party/dart-pkg/pub/watcher", | 
 |   ] | 
 |  | 
 |   deps += [ "//third_party/dart-pkg/pub/test" ] | 
 |  | 
 |   non_dart_deps = [ ":bloaty_reports($host_toolchain)" ] | 
 | } |