Wyatt Hepler | 0412a7d | 2020-01-28 16:27:32 -0800 | [diff] [blame] | 1 | # Copyright 2020 The Pigweed Authors |
Alexei Frolov | 1a82c14 | 2019-10-31 17:37:12 -0700 | [diff] [blame] | 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| 4 | # use this file except in compliance with the License. You may obtain a copy of |
| 5 | # the License at |
| 6 | # |
| 7 | # https://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 | # License for the specific language governing permissions and limitations under |
| 13 | # the License. |
| 14 | |
Armando Montanez | fb3d3fb | 2020-06-09 18:12:12 -0700 | [diff] [blame] | 15 | import("//build_overrides/pigweed.gni") |
Wyatt Hepler | edf6f29 | 2019-11-25 18:52:21 -0800 | [diff] [blame] | 16 | |
Anthony DiGirolamo | eea0d77 | 2020-08-06 12:00:36 -0700 | [diff] [blame] | 17 | import("$dir_pw_arduino_build/arduino.gni") |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 18 | import("$dir_pw_build/host_tool.gni") |
Wyatt Hepler | b16dfd3 | 2020-10-12 08:46:38 -0700 | [diff] [blame] | 19 | import("$dir_pw_build/python.gni") |
Alexei Frolov | 258fc1b | 2020-06-10 16:24:50 -0700 | [diff] [blame] | 20 | import("$dir_pw_docgen/docs.gni") |
Armando Montanez | 8600320 | 2020-06-16 18:00:06 -0700 | [diff] [blame] | 21 | import("$dir_pw_toolchain/generate_toolchain.gni") |
Armando Montanez | fb3d3fb | 2020-06-09 18:12:12 -0700 | [diff] [blame] | 22 | import("$dir_pw_unit_test/test.gni") |
Alexei Frolov | 258fc1b | 2020-06-10 16:24:50 -0700 | [diff] [blame] | 23 | |
| 24 | # Main build file for upstream Pigweed. |
| 25 | |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 26 | declare_args() { |
Wyatt Hepler | 38c398d | 2020-07-14 11:15:30 -0700 | [diff] [blame] | 27 | # The default optimization level for building upstream Pigweed targets. |
Armando Montanez | ebe27c6 | 2020-06-11 15:23:15 -0700 | [diff] [blame] | 28 | # |
| 29 | # Choices: |
| 30 | # debug |
| 31 | # size_optimized |
| 32 | # speed_optimized |
Wyatt Hepler | 38c398d | 2020-07-14 11:15:30 -0700 | [diff] [blame] | 33 | pw_default_optimization_level = "debug" |
Alexei Frolov | f675390 | 2020-07-08 11:01:45 -0700 | [diff] [blame] | 34 | |
| 35 | # List of application image GN targets specific to the Pigweed target. |
| 36 | pw_TARGET_APPLICATIONS = [] |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 37 | } |
| 38 | |
Armando Montanez | ebe27c6 | 2020-06-11 15:23:15 -0700 | [diff] [blame] | 39 | # Enumerate all of the different targets that upstream Pigweed will build by |
| 40 | # default. Downstream projects should not depend on this target; this target is |
| 41 | # exclusively to facilitate easy upstream development and testing. |
Armando Montanez | 04c56ae | 2019-12-12 14:34:05 -0800 | [diff] [blame] | 42 | group("default") { |
Armando Montanez | ebe27c6 | 2020-06-11 15:23:15 -0700 | [diff] [blame] | 43 | deps = [ |
| 44 | ":docs", |
Ali Zhang | 5876558 | 2021-01-29 12:04:06 -0800 | [diff] [blame] | 45 | ":fuzzers", |
Armando Montanez | ebe27c6 | 2020-06-11 15:23:15 -0700 | [diff] [blame] | 46 | ":host", |
Armando Montanez | 6f07fa7 | 2020-09-17 17:19:14 -0700 | [diff] [blame] | 47 | ":stm32f429i", |
Rob Mohr | 0d644f6 | 2021-02-24 16:15:51 -0800 | [diff] [blame] | 48 | "$dir_pw_env_setup:python.install", |
| 49 | "$dir_pw_env_setup:python.lint", |
| 50 | "$dir_pw_env_setup:python.tests", |
| 51 | "$dir_pw_env_setup:target_support_packages.lint", |
| 52 | "$dir_pw_env_setup:target_support_packages.tests", |
Armando Montanez | ebe27c6 | 2020-06-11 15:23:15 -0700 | [diff] [blame] | 53 | ] |
| 54 | } |
| 55 | |
Wyatt Hepler | 38c398d | 2020-07-14 11:15:30 -0700 | [diff] [blame] | 56 | # This template generates a group that builds pigweed_default with a particular |
| 57 | # toolchain. |
| 58 | template("_build_pigweed_default_at_all_optimization_levels") { |
| 59 | _toolchain_prefix = invoker.toolchain_prefix |
| 60 | |
| 61 | group(target_name) { |
| 62 | deps = [ |
| 63 | ":pigweed_default(${_toolchain_prefix}$pw_default_optimization_level)", |
| 64 | ] |
| 65 | } |
| 66 | |
| 67 | foreach(optimization, |
| 68 | [ |
| 69 | "debug", |
| 70 | "size_optimized", |
| 71 | "speed_optimized", |
| 72 | ]) { |
| 73 | group(target_name + "_$optimization") { |
| 74 | deps = [ ":pigweed_default($_toolchain_prefix$optimization)" ] |
| 75 | } |
| 76 | } |
| 77 | } |
| 78 | |
Wyatt Hepler | b16dfd3 | 2020-10-12 08:46:38 -0700 | [diff] [blame] | 79 | # Select a default toolchain based on host OS. |
| 80 | if (host_os == "linux") { |
| 81 | _default_toolchain_prefix = "$dir_pigweed/targets/host:host_clang_" |
| 82 | } else if (host_os == "mac") { |
| 83 | _default_toolchain_prefix = "$dir_pigweed/targets/host:host_clang_" |
| 84 | } else if (host_os == "win") { |
| 85 | _default_toolchain_prefix = "$dir_pigweed/targets/host:host_gcc_" |
| 86 | } else { |
| 87 | assert(false, "Please define a host config for your system: $host_os") |
| 88 | } |
| 89 | |
Armando Montanez | ebe27c6 | 2020-06-11 15:23:15 -0700 | [diff] [blame] | 90 | # Below are a list of GN targets you can build to force Pigweed to build for a |
| 91 | # specific Pigweed target. |
Wyatt Hepler | 38c398d | 2020-07-14 11:15:30 -0700 | [diff] [blame] | 92 | _build_pigweed_default_at_all_optimization_levels("host") { |
Wyatt Hepler | b16dfd3 | 2020-10-12 08:46:38 -0700 | [diff] [blame] | 93 | toolchain_prefix = _default_toolchain_prefix |
Armando Montanez | ebe27c6 | 2020-06-11 15:23:15 -0700 | [diff] [blame] | 94 | } |
| 95 | |
Wyatt Hepler | 38c398d | 2020-07-14 11:15:30 -0700 | [diff] [blame] | 96 | _build_pigweed_default_at_all_optimization_levels("host_clang") { |
| 97 | toolchain_prefix = "$dir_pigweed/targets/host:host_clang_" |
Armando Montanez | ebe27c6 | 2020-06-11 15:23:15 -0700 | [diff] [blame] | 98 | } |
| 99 | |
Wyatt Hepler | 38c398d | 2020-07-14 11:15:30 -0700 | [diff] [blame] | 100 | _build_pigweed_default_at_all_optimization_levels("host_gcc") { |
| 101 | toolchain_prefix = "$dir_pigweed/targets/host:host_gcc_" |
Armando Montanez | ebe27c6 | 2020-06-11 15:23:15 -0700 | [diff] [blame] | 102 | } |
| 103 | |
Wyatt Hepler | 38c398d | 2020-07-14 11:15:30 -0700 | [diff] [blame] | 104 | _build_pigweed_default_at_all_optimization_levels("stm32f429i") { |
Rob Mohr | 3d61b32 | 2021-05-17 10:52:24 -0700 | [diff] [blame] | 105 | toolchain_prefix = "$dir_pigweed/targets/stm32f429i_disc1:stm32f429i_disc1_" |
Armando Montanez | ebe27c6 | 2020-06-11 15:23:15 -0700 | [diff] [blame] | 106 | } |
| 107 | |
Anthony DiGirolamo | 383be05 | 2020-11-26 12:06:41 -0800 | [diff] [blame] | 108 | if (pw_arduino_build_CORE_PATH != "") { |
Wyatt Hepler | 38c398d | 2020-07-14 11:15:30 -0700 | [diff] [blame] | 109 | _build_pigweed_default_at_all_optimization_levels("arduino") { |
| 110 | toolchain_prefix = "$dir_pigweed/targets/arduino:arduino_" |
Anthony DiGirolamo | eea0d77 | 2020-08-06 12:00:36 -0700 | [diff] [blame] | 111 | } |
| 112 | } |
| 113 | |
Armando Montanez | 1ee925c | 2020-06-29 13:15:28 -0700 | [diff] [blame] | 114 | _build_pigweed_default_at_all_optimization_levels("qemu_gcc") { |
| 115 | toolchain_prefix = |
Rob Mohr | 3d61b32 | 2021-05-17 10:52:24 -0700 | [diff] [blame] | 116 | "$dir_pigweed/targets/lm3s6965evb_qemu:lm3s6965evb_qemu_gcc_" |
Armando Montanez | 1ee925c | 2020-06-29 13:15:28 -0700 | [diff] [blame] | 117 | } |
| 118 | |
| 119 | _build_pigweed_default_at_all_optimization_levels("qemu_clang") { |
| 120 | toolchain_prefix = |
Rob Mohr | 3d61b32 | 2021-05-17 10:52:24 -0700 | [diff] [blame] | 121 | "$dir_pigweed/targets/lm3s6965evb_qemu:lm3s6965evb_qemu_clang_" |
Armando Montanez | ebe27c6 | 2020-06-11 15:23:15 -0700 | [diff] [blame] | 122 | } |
| 123 | |
| 124 | group("docs") { |
Wyatt Hepler | 09d84aa | 2021-02-03 14:25:45 -0800 | [diff] [blame] | 125 | deps = [ "$dir_pigweed/docs($dir_pigweed/targets/docs)" ] |
Alexei Frolov | 844ff0f | 2020-05-06 12:15:29 -0700 | [diff] [blame] | 126 | } |
| 127 | |
Ali Zhang | 5876558 | 2021-01-29 12:04:06 -0800 | [diff] [blame] | 128 | # OSS-Fuzz uses this target to build fuzzers alone. |
| 129 | group("fuzzers") { |
| 130 | # Fuzzing is only supported on Linux and MacOS using clang. |
| 131 | if (host_os != "win") { |
| 132 | deps = [ ":pw_module_tests($dir_pigweed/targets/host:host_clang_fuzz)" ] |
| 133 | } |
| 134 | } |
| 135 | |
Rob Mohr | 0d644f6 | 2021-02-24 16:15:51 -0800 | [diff] [blame] | 136 | # TODO(pwbug/325) Delete this target. |
Wyatt Hepler | b16dfd3 | 2020-10-12 08:46:38 -0700 | [diff] [blame] | 137 | pw_python_group("python") { |
Rob Mohr | 0d644f6 | 2021-02-24 16:15:51 -0800 | [diff] [blame] | 138 | python_deps = [ "$dir_pw_env_setup:python" ] |
Wyatt Hepler | b16dfd3 | 2020-10-12 08:46:38 -0700 | [diff] [blame] | 139 | } |
| 140 | |
Rob Mohr | 0d644f6 | 2021-02-24 16:15:51 -0800 | [diff] [blame] | 141 | # TODO(pwbug/325) Delete this target. |
Wyatt Hepler | 96992c7 | 2020-10-23 08:05:33 -0700 | [diff] [blame] | 142 | pw_python_group("target_support_packages") { |
Rob Mohr | 0d644f6 | 2021-02-24 16:15:51 -0800 | [diff] [blame] | 143 | python_deps = [ "$dir_pw_env_setup:target_support_packages" ] |
Wyatt Hepler | 96992c7 | 2020-10-23 08:05:33 -0700 | [diff] [blame] | 144 | } |
| 145 | |
Alexei Frolov | 844ff0f | 2020-05-06 12:15:29 -0700 | [diff] [blame] | 146 | # By default, Pigweed will build this target when invoking ninja. |
| 147 | group("pigweed_default") { |
Alexei Frolov | 799be5d | 2020-01-09 15:54:39 -0800 | [diff] [blame] | 148 | deps = [] |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 149 | |
| 150 | # Prevent the default toolchain from parsing any other BUILD.gn files. |
| 151 | if (current_toolchain != default_toolchain) { |
Wyatt Hepler | 09d84aa | 2021-02-03 14:25:45 -0800 | [diff] [blame] | 152 | deps = [ ":apps" ] |
| 153 | if (pw_unit_test_AUTOMATIC_RUNNER == "") { |
| 154 | # Without a test runner defined, build the tests but don't run them. |
| 155 | deps += [ ":pw_module_tests" ] |
Alexei Frolov | 799be5d | 2020-01-09 15:54:39 -0800 | [diff] [blame] | 156 | } else { |
Wyatt Hepler | 09d84aa | 2021-02-03 14:25:45 -0800 | [diff] [blame] | 157 | # With a test runner, depend on the run targets so they run with the |
| 158 | # build. |
| 159 | deps += [ ":pw_module_tests.run" ] |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 160 | } |
Wyatt Hepler | 09d84aa | 2021-02-03 14:25:45 -0800 | [diff] [blame] | 161 | } |
| 162 | if (defined(pw_toolchain_SCOPE.is_host_toolchain) && |
| 163 | pw_toolchain_SCOPE.is_host_toolchain && pw_build_HOST_TOOLS) { |
| 164 | deps += [ ":host_tools" ] |
| 165 | } |
Robert Oliver | 70b9264 | 2020-07-13 15:04:10 -0400 | [diff] [blame] | 166 | |
Wyatt Hepler | 09d84aa | 2021-02-03 14:25:45 -0800 | [diff] [blame] | 167 | # Trace examples currently only support running on non-windows host |
| 168 | if (defined(pw_toolchain_SCOPE.is_host_toolchain) && |
| 169 | pw_toolchain_SCOPE.is_host_toolchain && host_os != "win") { |
| 170 | deps += [ |
| 171 | "$dir_pw_trace:trace_example_basic", |
| 172 | "$dir_pw_trace_tokenized:trace_tokenized_example_basic", |
| 173 | "$dir_pw_trace_tokenized:trace_tokenized_example_filter", |
Rob Oliver | 9d66337 | 2021-02-05 11:02:05 -0500 | [diff] [blame] | 174 | "$dir_pw_trace_tokenized:trace_tokenized_example_rpc", |
Wyatt Hepler | 09d84aa | 2021-02-03 14:25:45 -0800 | [diff] [blame] | 175 | "$dir_pw_trace_tokenized:trace_tokenized_example_trigger", |
| 176 | ] |
Keir Mierle | e2f5d0f | 2019-12-16 11:36:22 -0800 | [diff] [blame] | 177 | } |
Alexei Frolov | ca9cf60 | 2019-12-26 13:00:03 -0800 | [diff] [blame] | 178 | } |
| 179 | |
Wyatt Hepler | 09d84aa | 2021-02-03 14:25:45 -0800 | [diff] [blame] | 180 | # The default toolchain is not used for compiling C/C++ code. |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 181 | if (current_toolchain != default_toolchain) { |
Alexei Frolov | f675390 | 2020-07-08 11:01:45 -0700 | [diff] [blame] | 182 | group("apps") { |
| 183 | # Application images built for all targets. |
Alexei Frolov | d3e5cb7 | 2021-01-08 13:08:45 -0800 | [diff] [blame] | 184 | deps = [ "$dir_pw_hdlc/rpc_example" ] |
Alexei Frolov | f675390 | 2020-07-08 11:01:45 -0700 | [diff] [blame] | 185 | |
| 186 | # Add target-specific images. |
| 187 | deps += pw_TARGET_APPLICATIONS |
Jason Graffius | 4d13de9 | 2021-01-16 20:26:21 -0800 | [diff] [blame] | 188 | |
| 189 | # Add the pw_tool target to be built on host. |
| 190 | if (defined(pw_toolchain_SCOPE.is_host_toolchain) && |
| 191 | pw_toolchain_SCOPE.is_host_toolchain) { |
| 192 | deps += [ "$dir_pw_tool" ] |
| 193 | } |
Alexei Frolov | f675390 | 2020-07-08 11:01:45 -0700 | [diff] [blame] | 194 | } |
| 195 | |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 196 | group("host_tools") { |
| 197 | deps = [ |
| 198 | "$dir_pw_target_runner/go:simple_client", |
| 199 | "$dir_pw_target_runner/go:simple_server", |
Rob Mohr | 2156c0a | 2020-02-07 10:06:53 -0800 | [diff] [blame] | 200 | ] |
Alexei Frolov | 8c4b752 | 2020-01-31 11:15:57 -0800 | [diff] [blame] | 201 | } |
Alexei Frolov | 925fb8f | 2019-11-05 16:32:30 -0800 | [diff] [blame] | 202 | |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 203 | # All Pigweed modules that can be built using gn. This is not built by default. |
| 204 | group("pw_modules") { |
| 205 | deps = [ |
| 206 | "$dir_pigweed/docs", |
| 207 | "$dir_pw_allocator", |
Kevin Zeng | 62683b6 | 2021-03-18 12:22:08 -0700 | [diff] [blame] | 208 | "$dir_pw_analog", |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 209 | "$dir_pw_base64", |
David Rogers | 2d19502 | 2020-07-16 14:07:47 -0700 | [diff] [blame] | 210 | "$dir_pw_blob_store", |
shaneajg | 9c19db4 | 2020-06-11 15:49:51 -0400 | [diff] [blame] | 211 | "$dir_pw_bytes", |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 212 | "$dir_pw_checksum", |
Ewout van Bekkum | 3c61ae9 | 2020-10-30 15:52:25 -0700 | [diff] [blame] | 213 | "$dir_pw_chrono", |
Anthony DiGirolamo | 26ed98a | 2021-06-11 14:50:29 -0700 | [diff] [blame] | 214 | "$dir_pw_console", |
Alexei Frolov | f675390 | 2020-07-08 11:01:45 -0700 | [diff] [blame] | 215 | "$dir_pw_cpu_exception", |
Alexei Frolov | d3e5cb7 | 2021-01-08 13:08:45 -0800 | [diff] [blame] | 216 | "$dir_pw_hdlc", |
Ewout van Bekkum | d1669a8 | 2020-12-04 16:00:47 -0800 | [diff] [blame] | 217 | "$dir_pw_i2c", |
Keir Mierle | 45fa785 | 2020-08-10 21:09:54 -0700 | [diff] [blame] | 218 | "$dir_pw_metric", |
Ewout van Bekkum | 32dc5c5 | 2021-03-16 11:35:37 -0700 | [diff] [blame] | 219 | "$dir_pw_persistent_ram", |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 220 | "$dir_pw_polyfill", |
| 221 | "$dir_pw_preprocessor", |
| 222 | "$dir_pw_protobuf", |
| 223 | "$dir_pw_result", |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 224 | "$dir_pw_status", |
| 225 | "$dir_pw_stream", |
| 226 | "$dir_pw_string", |
Ewout van Bekkum | 5890193 | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 227 | "$dir_pw_sync", |
Alexei Frolov | f675390 | 2020-07-08 11:01:45 -0700 | [diff] [blame] | 228 | "$dir_pw_sys_io", |
Ewout van Bekkum | e3b5603 | 2020-12-22 12:00:18 -0800 | [diff] [blame] | 229 | "$dir_pw_thread", |
Jason Graffius | 4d13de9 | 2021-01-16 20:26:21 -0800 | [diff] [blame] | 230 | "$dir_pw_tool", |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 231 | "$dir_pw_trace", |
| 232 | "$dir_pw_unit_test", |
| 233 | "$dir_pw_varint", |
| 234 | ] |
| 235 | |
| 236 | if (host_os != "win") { |
| 237 | deps += [ |
| 238 | # TODO(frolv): Remove these two when new KVS is ready. |
| 239 | "$dir_pw_kvs", |
| 240 | "$dir_pw_minimal_cpp_stdlib", |
| 241 | |
| 242 | # TODO(pwbug/111): Remove this when building successfully on Windows. |
| 243 | "$dir_pw_tokenizer", |
| 244 | ] |
| 245 | } |
Armando Montanez | 870a86b | 2020-05-26 10:54:38 -0700 | [diff] [blame] | 246 | } |
| 247 | |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 248 | # Targets for all module unit test groups. |
| 249 | pw_test_group("pw_module_tests") { |
| 250 | group_deps = [ |
Armando Montanez | 28f8218 | 2021-02-05 17:10:43 -0800 | [diff] [blame] | 251 | "$dir_pw_allocator:tests", |
Kevin Zeng | 62683b6 | 2021-03-18 12:22:08 -0700 | [diff] [blame] | 252 | "$dir_pw_analog:tests", |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 253 | "$dir_pw_assert:tests", |
| 254 | "$dir_pw_base64:tests", |
David Rogers | 2d19502 | 2020-07-16 14:07:47 -0700 | [diff] [blame] | 255 | "$dir_pw_blob_store:tests", |
shaneajg | 9c19db4 | 2020-06-11 15:49:51 -0400 | [diff] [blame] | 256 | "$dir_pw_bytes:tests", |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 257 | "$dir_pw_checksum:tests", |
Ewout van Bekkum | 3c61ae9 | 2020-10-30 15:52:25 -0700 | [diff] [blame] | 258 | "$dir_pw_chrono:tests", |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 259 | "$dir_pw_containers:tests", |
Armando Montanez | a9ca999 | 2021-01-26 17:06:10 -0800 | [diff] [blame] | 260 | "$dir_pw_cpu_exception_cortex_m:tests", |
Ali Zhang | ef68dc6 | 2021-06-25 16:25:44 -0700 | [diff] [blame] | 261 | "$dir_pw_crypto:tests", |
Alexei Frolov | 99de52d | 2021-05-11 19:58:01 -0700 | [diff] [blame] | 262 | "$dir_pw_function:tests", |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 263 | "$dir_pw_fuzzer:tests", |
Alexei Frolov | d3e5cb7 | 2021-01-08 13:08:45 -0800 | [diff] [blame] | 264 | "$dir_pw_hdlc:tests", |
Armando Montanez | 593d0d5 | 2020-07-08 19:55:01 -0700 | [diff] [blame] | 265 | "$dir_pw_hex_dump:tests", |
Max Koopman | 84d599d | 2021-02-11 09:38:57 -0800 | [diff] [blame] | 266 | "$dir_pw_i2c:tests", |
Keir Mierle | 32829d3 | 2020-11-25 15:38:40 -0800 | [diff] [blame] | 267 | "$dir_pw_libc:tests", |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 268 | "$dir_pw_log:tests", |
Prashanth Swaminathan | 5ef2aa2 | 2020-11-10 09:57:46 -0800 | [diff] [blame] | 269 | "$dir_pw_log_multisink:tests", |
Wyatt Hepler | 24a6e27 | 2020-09-01 10:25:28 -0700 | [diff] [blame] | 270 | "$dir_pw_log_null:tests", |
Prashanth Swaminathan | fce26ba | 2020-09-25 13:36:07 -0700 | [diff] [blame] | 271 | "$dir_pw_log_rpc:tests", |
Prashanth Swaminathan | 49a4a82 | 2021-01-12 18:41:52 -0800 | [diff] [blame] | 272 | "$dir_pw_log_sink:tests", |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 273 | "$dir_pw_log_tokenized:tests", |
Chenghan Zhou | d4f44d2 | 2020-06-18 15:42:06 -0400 | [diff] [blame] | 274 | "$dir_pw_malloc_freelist:tests", |
Keir Mierle | 45fa785 | 2020-08-10 21:09:54 -0700 | [diff] [blame] | 275 | "$dir_pw_metric:tests", |
Prashanth Swaminathan | f36832a | 2021-01-27 16:20:32 -0800 | [diff] [blame] | 276 | "$dir_pw_multisink:tests", |
Ewout van Bekkum | 32dc5c5 | 2021-03-16 11:35:37 -0700 | [diff] [blame] | 277 | "$dir_pw_persistent_ram:tests", |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 278 | "$dir_pw_polyfill:tests", |
| 279 | "$dir_pw_preprocessor:tests", |
| 280 | "$dir_pw_protobuf:tests", |
| 281 | "$dir_pw_protobuf_compiler:tests", |
Armando Montanez | 47008e8 | 2020-08-04 11:04:45 -0700 | [diff] [blame] | 282 | "$dir_pw_random:tests", |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 283 | "$dir_pw_result:tests", |
| 284 | "$dir_pw_ring_buffer:tests", |
Alexei Frolov | 5af57d1 | 2021-01-12 11:38:06 -0800 | [diff] [blame] | 285 | "$dir_pw_router:tests", |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 286 | "$dir_pw_rpc:tests", |
Armando Montanez | 179aa8e | 2021-03-10 11:46:35 -0800 | [diff] [blame] | 287 | "$dir_pw_snapshot:tests", |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 288 | "$dir_pw_span:tests", |
| 289 | "$dir_pw_status:tests", |
| 290 | "$dir_pw_stream:tests", |
| 291 | "$dir_pw_string:tests", |
Ewout van Bekkum | 5890193 | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 292 | "$dir_pw_sync:tests", |
Yecheng Zhao | efb68cc | 2021-07-03 20:39:52 -0700 | [diff] [blame] | 293 | "$dir_pw_third_party/boringssl:tests", |
Ewout van Bekkum | e3b5603 | 2020-12-22 12:00:18 -0800 | [diff] [blame] | 294 | "$dir_pw_thread:tests", |
Ewout van Bekkum | 0f3901e | 2020-12-22 12:00:18 -0800 | [diff] [blame] | 295 | "$dir_pw_thread_stl:tests", |
Yecheng Zhao | ba9e06d | 2021-06-29 17:12:57 -0700 | [diff] [blame] | 296 | "$dir_pw_tls_client_boringssl:tests", |
Yecheng Zhao | 60465a7 | 2021-06-23 21:14:02 -0700 | [diff] [blame] | 297 | "$dir_pw_tls_client_mbedtls:tests", |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 298 | "$dir_pw_tokenizer:tests", |
| 299 | "$dir_pw_trace:tests", |
Robert Oliver | 21dcf27 | 2020-05-12 15:41:52 -0400 | [diff] [blame] | 300 | "$dir_pw_trace_tokenized:tests", |
Wyatt Hepler | 1e63673 | 2021-06-14 18:30:13 -0700 | [diff] [blame] | 301 | "$dir_pw_transfer:tests", |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 302 | "$dir_pw_unit_test:tests", |
| 303 | "$dir_pw_varint:tests", |
| 304 | ] |
| 305 | |
Armando Montanez | 8600320 | 2020-06-16 18:00:06 -0700 | [diff] [blame] | 306 | if (defined(pw_toolchain_SCOPE.is_host_toolchain) && |
| 307 | pw_toolchain_SCOPE.is_host_toolchain) { |
Alexei Frolov | 4c0428a | 2020-06-10 10:46:04 -0700 | [diff] [blame] | 308 | # TODO(pwbug/196): KVS tests are not compatible with device builds as they |
| 309 | # use features such as std::map and are computationally expensive. Solving |
| 310 | # this requires a more complex capabilities-based build and configuration |
| 311 | # system which allowing enabling specific tests for targets that support |
| 312 | # them and modifying test parameters for different targets. |
| 313 | # |
| 314 | # Checking for pw_build_host_tools (which is only set by the host) is a |
| 315 | # temporary fix until the problem can be properly solved. |
| 316 | group_deps += [ "$dir_pw_kvs:tests" ] |
| 317 | } |
| 318 | |
| 319 | if (host_os != "win") { |
| 320 | # TODO(amontanez): pw_minimal_cpp_stdlib tests do not build on windows. |
| 321 | group_deps += [ "$dir_pw_minimal_cpp_stdlib:tests" ] |
| 322 | } |
Alexei Frolov | 8c4b752 | 2020-01-31 11:15:57 -0800 | [diff] [blame] | 323 | } |
Alexei Frolov | 925fb8f | 2019-11-05 16:32:30 -0800 | [diff] [blame] | 324 | } |