mirror of
https://fuchsia.googlesource.com/third_party/pigweed.googlesource.com/pigweed/pigweed
synced 2024-09-21 14:16:26 +00:00
a68755a1f3
Bug: 111 Change-Id: If09433e8dd552c527859c3d8120f23a3000ca790
110 lines
2.9 KiB
Plaintext
110 lines
2.9 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_dumb_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") {
|
|
# TODO(frolv): Remove this when new KVS is ready.
|
|
deps += [
|
|
"$dir_pw_kvs",
|
|
"$dir_pw_minimal_cpp_stdlib",
|
|
]
|
|
|
|
# TODO(pwbug/111): Remove this when building successfully on Windows.
|
|
deps += [ "$dir_pw_tokenizer" ]
|
|
}
|
|
}
|
|
|
|
# Targets for all module unit test groups.
|
|
pw_test_group("pw_module_tests") {
|
|
group_deps = [
|
|
"$dir_pw_base64:tests",
|
|
"$dir_pw_checksum: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") {
|
|
# TODO(frolv): Remove this when new KVS is ready.
|
|
group_deps += [
|
|
"$dir_pw_kvs:tests",
|
|
"$dir_pw_minimal_cpp_stdlib:tests",
|
|
]
|
|
|
|
# TODO(pwbug/111): Remove this when building successfully on Windows.
|
|
group_deps += [ "$dir_pw_tokenizer:tests" ]
|
|
}
|
|
}
|