mirror of
https://fuchsia.googlesource.com/third_party/pigweed.googlesource.com/pigweed/pigweed
synced 2024-09-21 06:12:09 +00:00
f7a5a742ab
Rename pw_dumb_io facade and backends to use the more deliberate name pw_sys_io moving forward. Change-Id: I968480715967ab8de491856afa1b7692b973ed7e
127 lines
3.7 KiB
Plaintext
127 lines
3.7 KiB
Plaintext
# Copyright 2020 The Pigweed Authors
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
|
# use this file except in compliance with the License. You may obtain a copy of
|
|
# the License at
|
|
#
|
|
# https://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations under
|
|
# the License.
|
|
|
|
import("$dir_pw_unit_test/test.gni")
|
|
|
|
# By default, Pigweed will build this target when invoking ninja.
|
|
group("default") {
|
|
deps = []
|
|
if (defined(pw_is_docs_target) && pw_is_docs_target) {
|
|
deps += [ "$dir_pigweed/docs" ]
|
|
} else {
|
|
if (pw_automatic_test_runner == "") {
|
|
# Without a test runner defined, build the tests but don't run them.
|
|
deps += [ ":pw_module_tests" ]
|
|
} else {
|
|
# With a test runner, depend on the run targets so they run with the build.
|
|
deps += [ ":pw_module_tests_run" ]
|
|
}
|
|
}
|
|
if (pw_build_host_tools) {
|
|
deps += [ ":host_tools" ]
|
|
}
|
|
}
|
|
|
|
group("host_tools") {
|
|
deps = [
|
|
"$dir_pw_target_runner/go:simple_client",
|
|
"$dir_pw_target_runner/go:simple_server",
|
|
]
|
|
}
|
|
|
|
group("pw_facades") {
|
|
deps = [
|
|
"$dir_pw_cpu_exception",
|
|
"$dir_pw_sys_io",
|
|
]
|
|
}
|
|
|
|
# All Pigweed modules that can be built using gn. This is not built by default.
|
|
group("pw_modules") {
|
|
deps = [
|
|
"$dir_pigweed/docs",
|
|
"$dir_pw_base64",
|
|
"$dir_pw_checksum",
|
|
"$dir_pw_polyfill",
|
|
"$dir_pw_preprocessor",
|
|
"$dir_pw_protobuf",
|
|
"$dir_pw_span",
|
|
"$dir_pw_status",
|
|
"$dir_pw_string",
|
|
"$dir_pw_unit_test",
|
|
"$dir_pw_varint",
|
|
]
|
|
|
|
if (host_os != "win") {
|
|
deps += [
|
|
# TODO(frolv): Remove these two when new KVS is ready.
|
|
"$dir_pw_kvs",
|
|
"$dir_pw_minimal_cpp_stdlib",
|
|
|
|
# TODO(pwbug/111): Remove this when building successfully on Windows.
|
|
"$dir_pw_tokenizer",
|
|
]
|
|
}
|
|
}
|
|
|
|
# Targets for all module unit test groups.
|
|
pw_test_group("pw_module_tests") {
|
|
group_deps = [
|
|
"$dir_pw_assert:tests",
|
|
"$dir_pw_base64:tests",
|
|
"$dir_pw_checksum:tests",
|
|
"$dir_pw_containers:tests",
|
|
"$dir_pw_log:tests",
|
|
"$dir_pw_polyfill:tests",
|
|
"$dir_pw_preprocessor:tests",
|
|
"$dir_pw_protobuf:tests",
|
|
"$dir_pw_span:tests",
|
|
"$dir_pw_status:tests",
|
|
"$dir_pw_string:tests",
|
|
"$dir_pw_unit_test:tests",
|
|
"$dir_pw_varint:tests",
|
|
]
|
|
|
|
# TODO(pwbug/17): Re-think when Pigweed config system is added.
|
|
if (dir_pw_cpu_exception_backend == dir_pw_cpu_exception_armv7m) {
|
|
group_deps += [ "$dir_pw_cpu_exception_armv7m:tests" ]
|
|
}
|
|
|
|
if (host_os != "win") {
|
|
group_deps += [
|
|
"$dir_pw_minimal_cpp_stdlib:tests",
|
|
|
|
# TODO(pwbug/111): Remove this when building successfully on Windows.
|
|
"$dir_pw_tokenizer:tests",
|
|
]
|
|
|
|
if (pw_build_host_tools) {
|
|
# TODO(frolv): There are two things happening here.
|
|
#
|
|
# 1. KVS does not currently compile on Windows. Should be simple enough
|
|
# to fix.
|
|
# 2. KVS tests are not compatible with device builds as they use
|
|
# features such as std::map and are computationally expensive.
|
|
# Solving this requires a more complex capabilities-based build and
|
|
# configuration system which allowing enabling specific tests for
|
|
# targets that support them and modifying test parameters for
|
|
# different targets.
|
|
#
|
|
# Checking for pw_build_host_tools (which is only set by the host) is a
|
|
# temporary fix until the problem can be properly solved.
|
|
group_deps += [ "$dir_pw_kvs:tests" ]
|
|
}
|
|
}
|
|
}
|