blob: efeb894e4dde419c9eb3664dd8f522d0aec93c3f [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/components.gni")
import("//build/fuzzing/fuzzer.gni")
import("//build/fuzzing/fuzzer_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 = [
"//sdk/lib/fit",
"//src/lib/cmx/facet_parser:cmx_facet_parser",
"//src/lib/fxl",
"//src/lib/json_parser",
"//src/lib/pkg_url",
"//third_party/rapidjson",
"//third_party/re2",
"//zircon/system/ulib/trace",
]
}
executable("cmx_unittests") {
testonly = true
sources = [
"cmx_unittest.cc",
"program_unittest.cc",
"runtime_unittest.cc",
"sandbox_unittest.cc",
]
deps = [
":cmx",
"//src/lib/fxl/test:gtest_main",
"//src/lib/json_parser",
"//src/lib/pkg_url",
"//src/lib/testing/loop_fixture",
"//third_party/googletest:gmock",
"//third_party/rapidjson",
]
}
fuchsia_unittest_package("cmx_tests") {
deps = [
":cmx_unittests",
"//src/sys/test_runners:tmp_storage",
]
test_specs = {
environments = [ emu_env ]
}
}
fuzzer_package("cmx_fuzzers") {
cpp_fuzzers = [ ":cmx_fuzzer" ]
}
fuzzer("cmx_fuzzer") {
sources = [ "cmx_fuzztest.cc" ]
deps = [
":cmx",
"//src/lib/files",
"//third_party/rapidjson",
]
public_deps = [
"//src/lib/fxl",
"//src/lib/json_parser",
]
}