Alexei Frolov | 1a82c14 | 2019-10-31 17:37:12 -0700 | [diff] [blame] | 1 | # Copyright 2019 The Pigweed Authors |
| 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 | |
Wyatt Hepler | edf6f29 | 2019-11-25 18:52:21 -0800 | [diff] [blame] | 15 | import("$dir_pw_unit_test/test.gni") |
| 16 | |
Armando Montanez | 04c56ae | 2019-12-12 14:34:05 -0800 | [diff] [blame] | 17 | # By default, Pigweed will build this target when invoking ninja. |
| 18 | group("default") { |
| 19 | deps = [ |
Armando Montanez | 04c56ae | 2019-12-12 14:34:05 -0800 | [diff] [blame] | 20 | "$dir_pigweed/docs", |
| 21 | ] |
Keir Mierle | e2f5d0f | 2019-12-16 11:36:22 -0800 | [diff] [blame^] | 22 | if (pw_automatic_test_runner == "") { |
| 23 | # Without a test runner defined, build the tests but don't run them. |
| 24 | deps += [ ":pw_module_tests" ] |
| 25 | } else { |
| 26 | # With a test runner, depend on the run targets so they run with the build. |
| 27 | deps += [ ":pw_module_tests_run" ] |
| 28 | } |
Armando Montanez | 04c56ae | 2019-12-12 14:34:05 -0800 | [diff] [blame] | 29 | } |
| 30 | |
| 31 | group("pw_facades") { |
| 32 | deps = [ |
Armando Montanez | 5104cd6 | 2019-12-10 14:36:43 -0800 | [diff] [blame] | 33 | "$dir_pw_cpu_exception", |
Armando Montanez | 04c56ae | 2019-12-12 14:34:05 -0800 | [diff] [blame] | 34 | "$dir_pw_dumb_io", |
| 35 | ] |
| 36 | } |
| 37 | |
| 38 | # All Pigweed modules that can be built using gn. This is not built by default. |
Alexei Frolov | 1a82c14 | 2019-10-31 17:37:12 -0700 | [diff] [blame] | 39 | group("pw_modules") { |
| 40 | deps = [ |
Alexei Frolov | 0efdb11 | 2019-11-14 17:22:08 -0800 | [diff] [blame] | 41 | "$dir_pigweed/docs", |
Alexei Frolov | e201676 | 2019-11-14 13:49:52 -0800 | [diff] [blame] | 42 | "$dir_pw_bloat", |
Alexei Frolov | c10c812 | 2019-11-01 16:31:19 -0700 | [diff] [blame] | 43 | "$dir_pw_preprocessor", |
Wyatt Hepler | 7710565 | 2019-11-06 17:50:03 -0800 | [diff] [blame] | 44 | "$dir_pw_span", |
Alexei Frolov | 1a82c14 | 2019-10-31 17:37:12 -0700 | [diff] [blame] | 45 | "$dir_pw_status", |
Wyatt Hepler | 48db4d6 | 2019-11-11 10:32:45 -0800 | [diff] [blame] | 46 | "$dir_pw_string", |
Alexei Frolov | c10c812 | 2019-11-01 16:31:19 -0700 | [diff] [blame] | 47 | "$dir_pw_unit_test", |
Alexei Frolov | 82d3cb3 | 2019-11-27 14:38:39 -0800 | [diff] [blame] | 48 | "$dir_pw_varint", |
Alexei Frolov | 1a82c14 | 2019-10-31 17:37:12 -0700 | [diff] [blame] | 49 | ] |
| 50 | } |
Alexei Frolov | 925fb8f | 2019-11-05 16:32:30 -0800 | [diff] [blame] | 51 | |
| 52 | # Targets for all module unit test groups. |
Wyatt Hepler | edf6f29 | 2019-11-25 18:52:21 -0800 | [diff] [blame] | 53 | pw_test_group("pw_module_tests") { |
| 54 | group_deps = [ |
Alexei Frolov | a454c68 | 2019-11-19 10:55:07 -0800 | [diff] [blame] | 55 | "$dir_pw_preprocessor:tests", |
| 56 | "$dir_pw_span:tests", |
| 57 | "$dir_pw_status:tests", |
| 58 | "$dir_pw_string:tests", |
Alexei Frolov | 82d3cb3 | 2019-11-27 14:38:39 -0800 | [diff] [blame] | 59 | "$dir_pw_varint:tests", |
Alexei Frolov | 925fb8f | 2019-11-05 16:32:30 -0800 | [diff] [blame] | 60 | ] |
Armando Montanez | 5104cd6 | 2019-12-10 14:36:43 -0800 | [diff] [blame] | 61 | |
| 62 | # TODO(pwbug/17): Re-think when Pigweed config system is added. |
| 63 | if (dir_pw_cpu_exception_backend == dir_pw_cpu_exception_armv7m) { |
| 64 | group_deps += [ "$dir_pw_cpu_exception_armv7m:tests" ] |
| 65 | } |
Alexei Frolov | 925fb8f | 2019-11-05 16:32:30 -0800 | [diff] [blame] | 66 | } |