blob: a4428a8fc581a2121899c83e86a0c0294b636753 [file] [log] [blame]
# 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.
import("//build/fuzzing/fuzzer.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.gni")
group("tests") {
testonly = true
deps = [
":cmx_tests",
"facet_parser:tests",
]
}
source_set("cmx") {
sources = [
"cmx.cc",
"cmx.h",
"program.cc",
"program.h",
"runtime.cc",
"runtime.h",
"sandbox.cc",
"sandbox.h",
]
deps = [
"//garnet/public/lib/json",
"//src/lib/cmx/facet_parser:cmx_facet_parser",
"//src/lib/fxl",
"//src/lib/pkg_url",
"//zircon/public/lib/fit",
"//zircon/system/ulib/trace",
# TODO(fxbug.dev/57392): Move it back to //third_party once unification completes.
"//zircon/third_party/rapidjson",
]
}
executable("cmx_unittests") {
testonly = true
sources = [
"cmx_unittest.cc",
"program_unittest.cc",
"runtime_unittest.cc",
"sandbox_unittest.cc",
]
deps = [
":cmx",
"//garnet/public/lib/gtest",
"//garnet/public/lib/json",
"//src/lib/fxl/test:gtest_main",
"//src/lib/pkg_url",
"//third_party/googletest:gmock",
# TODO(fxbug.dev/57392): Move it back to //third_party once unification completes.
"//zircon/third_party/rapidjson",
]
# TODO(fxbug.dev/46552): Fix the leaks and remove this.
deps += [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ]
}
test_package("cmx_tests") {
deps = [ ":cmx_unittests" ]
tests = [
{
name = "cmx_unittests"
environments = [ emu_env ]
},
]
}
fuzzers_package("cmx_fuzzers") {
fuzzers = [ ":cmx_fuzzer" ]
}
fuzzer("cmx_fuzzer") {
sources = [ "cmx_fuzztest.cc" ]
deps = [
":cmx",
"//src/lib/files",
# TODO(fxbug.dev/57392): Move it back to //third_party once unification completes.
"//zircon/third_party/rapidjson",
]
public_deps = [
"//garnet/public/lib/json",
"//src/lib/fxl",
]
}