blob: bd1735a8efa2cb2a52feae2d62e2ddf152d581bf [file] [log] [blame]
# 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/components.gni")
source_set("lib") {
sources = [
"reverser.cc",
"reverser.h",
]
# CODELAB: Include inspect dependency.
public_deps =
[ "//examples/diagnostics/inspect/codelab/fidl:fuchsia.examples.inspect" ]
}
executable("bin") {
output_name = "inspect_cpp_codelab_part_1"
sources = [ "main.cc" ]
deps = [
":lib",
"//sdk/lib/sys/cpp",
"//sdk/lib/syslog/cpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
}
fuchsia_component("part_1") {
manifest = "meta/part_1.cml"
deps = [ ":bin" ]
}
executable("unittests") {
testonly = true
output_name = "inspect_cpp_codelab_part_1_unittests"
sources = [ "reverser_unittests.cc" ]
deps = [
":lib",
"//sdk/lib/sys/cpp",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/loop_fixture",
]
}
fuchsia_unittest_component("inspect_cpp_codelab_part_1_unittests") {
deps = [ ":unittests" ]
}
fuchsia_test("test_spec") {
package =
"//examples/diagnostics/inspect/codelab/cpp:inspect_cpp_codelab_unittests"
component = ":inspect_cpp_codelab_part_1_unittests"
}
executable("integration_test") {
testonly = true
output_name = "inspect_cpp_codelab_part_1_integration_test"
sources = [ "tests/integration_test.cc" ]
public_deps = [
"//examples/diagnostics/inspect/codelab/cpp/testing:inspect-cpp-codelab-testing",
"//sdk/fidl/fuchsia.diagnostics",
"//sdk/lib/sys/cpp",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/loop_fixture",
]
}
fuchsia_component("inspect_cpp_codelab_part_1_integration_test") {
testonly = true
manifest = "meta/integration_test.cml"
deps = [ ":integration_test" ]
}
fuchsia_test("integration_test_spec") {
package = "//examples/diagnostics/inspect/codelab/cpp:inspect_cpp_codelab_integration_tests"
component = ":inspect_cpp_codelab_part_1_integration_test"
}