2019-11-01 00:37:12 +00:00
|
|
|
# Copyright 2019 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.
|
|
|
|
|
2019-11-26 02:52:21 +00:00
|
|
|
import("$dir_pw_unit_test/test.gni")
|
|
|
|
|
2019-12-12 22:34:05 +00:00
|
|
|
# By default, Pigweed will build this target when invoking ninja.
|
|
|
|
group("default") {
|
|
|
|
deps = [
|
|
|
|
"$dir_pigweed/docs",
|
|
|
|
]
|
2019-12-16 19:36:22 +00:00
|
|
|
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" ]
|
|
|
|
}
|
2019-12-12 22:34:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
group("pw_facades") {
|
|
|
|
deps = [
|
2019-12-10 22:36:43 +00:00
|
|
|
"$dir_pw_cpu_exception",
|
2019-12-12 22:34:05 +00:00
|
|
|
"$dir_pw_dumb_io",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
# All Pigweed modules that can be built using gn. This is not built by default.
|
2019-11-01 00:37:12 +00:00
|
|
|
group("pw_modules") {
|
|
|
|
deps = [
|
2019-11-15 01:22:08 +00:00
|
|
|
"$dir_pigweed/docs",
|
2019-11-01 23:31:19 +00:00
|
|
|
"$dir_pw_preprocessor",
|
2019-12-16 20:51:59 +00:00
|
|
|
"$dir_pw_protobuf",
|
2019-11-07 01:50:03 +00:00
|
|
|
"$dir_pw_span",
|
2019-11-01 00:37:12 +00:00
|
|
|
"$dir_pw_status",
|
2019-11-11 18:32:45 +00:00
|
|
|
"$dir_pw_string",
|
2019-11-01 23:31:19 +00:00
|
|
|
"$dir_pw_unit_test",
|
2019-11-27 22:38:39 +00:00
|
|
|
"$dir_pw_varint",
|
2019-11-01 00:37:12 +00:00
|
|
|
]
|
|
|
|
}
|
2019-11-06 00:32:30 +00:00
|
|
|
|
|
|
|
# Targets for all module unit test groups.
|
2019-11-26 02:52:21 +00:00
|
|
|
pw_test_group("pw_module_tests") {
|
|
|
|
group_deps = [
|
2019-11-19 18:55:07 +00:00
|
|
|
"$dir_pw_preprocessor:tests",
|
2019-12-16 20:51:59 +00:00
|
|
|
"$dir_pw_protobuf:tests",
|
2019-11-19 18:55:07 +00:00
|
|
|
"$dir_pw_span:tests",
|
|
|
|
"$dir_pw_status:tests",
|
|
|
|
"$dir_pw_string:tests",
|
2019-11-27 22:38:39 +00:00
|
|
|
"$dir_pw_varint:tests",
|
2019-11-06 00:32:30 +00:00
|
|
|
]
|
2019-12-10 22:36:43 +00:00
|
|
|
|
|
|
|
# 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" ]
|
|
|
|
}
|
2019-11-06 00:32:30 +00:00
|
|
|
}
|