| # Copyright 2018 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. | 
 |  | 
 | # Do not use - depend directly on //src/lib/json_parser instead. | 
 | # This is a transitional target and will be removed soon. | 
 | # Bug: 36759 | 
 | group("json") { | 
 |   public_deps = [ ":json_parser" ] | 
 | } | 
 |  | 
 | source_set("json_parser") { | 
 |   sources = [ | 
 |     "json_parser.cc", | 
 |     "json_parser.h", | 
 |     "pretty_print.h", | 
 |     "rapidjson_validation.cc", | 
 |     "rapidjson_validation.h", | 
 |   ] | 
 |  | 
 |   public_deps = [ | 
 |     "//src/lib/fxl", | 
 |     "//third_party/rapidjson", | 
 |     "//zircon/public/lib/fbl", | 
 |     "//zircon/public/lib/fit", | 
 |     "//zircon/public/lib/zxc", | 
 |   ] | 
 | } | 
 |  | 
 | executable("json_parser_unittests_bin") { | 
 |   testonly = true | 
 |  | 
 |   output_name = "json_parser_unittests" | 
 |  | 
 |   sources = [ | 
 |     "json_parser_unittest.cc", | 
 |     "rapidjson_validation_unittest.cc", | 
 |   ] | 
 |  | 
 |   deps = [ | 
 |     ":json_parser", | 
 |     "//src/lib/files", | 
 |     "//src/lib/fxl", | 
 |     "//src/lib/fxl/test:gtest_main", | 
 |     "//third_party/rapidjson", | 
 |   ] | 
 |  | 
 |   # TODO(46748): Fix the leaks and remove this. | 
 |   deps += [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ] | 
 | } | 
 |  | 
 | if (is_fuchsia) { | 
 |   import("//build/test/test_package.gni") | 
 |   import("//build/testing/environments.gni") | 
 |  | 
 |   test_package("json_parser_unittests") { | 
 |     deps = [ ":json_parser_unittests_bin" ] | 
 |     tests = [ | 
 |       { | 
 |         name = "json_parser_unittests" | 
 |         environments = [ emu_env ] | 
 |       }, | 
 |     ] | 
 |   } | 
 | } | 
 |  | 
 | group("tests") { | 
 |   testonly = true | 
 |  | 
 |   deps = [ ":json_parser_unittests_bin($host_toolchain)" ] | 
 |   if (is_fuchsia) { | 
 |     deps += [ ":json_parser_unittests" ] | 
 |   } | 
 | } |