Joey Armstrong | 64b8249 | 2023-06-01 17:34:39 -0400 | [diff] [blame] | 1 | # -*- makefile -*- |
| 2 | # ----------------------------------------------------------------------- |
| 3 | # Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | # |
| 17 | # SPDX-FileCopyrightText: 2022 Open Networking Foundation (ONF) and the ONF Contributors |
| 18 | # SPDX-License-Identifier: Apache-2.0 |
| 19 | # ----------------------------------------------------------------------- |
| 20 | |
| 21 | $(if $(DEBUG),$(warning ENTER)) |
| 22 | |
| 23 | ## ----------------------------------------------------------------------- |
| 24 | ## Intent: Summary 'make test' to hilight errors |
| 25 | ## ----------------------------------------------------------------------- |
| 26 | test-errors-lint := test-errors.lint.log |
| 27 | test-errors-link := test-errors.linkcheck.log |
| 28 | test-errors: |
| 29 | @echo "** Running $(MAKE) sterile" |
| 30 | $(HIDE)( $(MAKE) sterile 3>&1 2>&1 ) >/dev/null |
| 31 | |
| 32 | @echo |
| 33 | @echo "** Running $(MAKE) lint" |
| 34 | -$(HIDE) ( $(MAKE) lint 3>&1 2>&1 ) > $(test-errors-lint) |
| 35 | |
Joey Armstrong | 7d32cbe | 2023-06-02 14:30:19 -0400 | [diff] [blame] | 36 | @echo '** Examining log for errors: $(test-errors-lint)' |
Joey Armstrong | 64b8249 | 2023-06-01 17:34:39 -0400 | [diff] [blame] | 37 | $(HIDE)! grep \ |
| 38 | -e 'make: ***' \ |
| 39 | $(test-errors-lint) |
| 40 | |
| 41 | @echo |
| 42 | @echo "** Running $(MAKE) linkcheck" |
| 43 | -$(HIDE) ( $(MAKE) linkcheck 3>&1 2>&1 ) > $(test-errors-link) |
| 44 | |
Joey Armstrong | 7d32cbe | 2023-06-02 14:30:19 -0400 | [diff] [blame] | 45 | @echo '** Examining log for errors: $(test-errors-link)' |
Joey Armstrong | 64b8249 | 2023-06-01 17:34:39 -0400 | [diff] [blame] | 46 | $(HIDE)! grep \ |
| 47 | -e 'make: ***' \ |
Joey Armstrong | 7d32cbe | 2023-06-02 14:30:19 -0400 | [diff] [blame] | 48 | -e ') broken' \ |
Joey Armstrong | 64b8249 | 2023-06-01 17:34:39 -0400 | [diff] [blame] | 49 | $(test-errors-link) |
| 50 | |
| 51 | ## ----------------------------------------------------------------------- |
| 52 | ## Intent: Remove generated logfiles |
| 53 | ## ----------------------------------------------------------------------- |
| 54 | clean :: |
| 55 | $(RM) $(test-errors-lint) $(test-errors-link) |
| 56 | |
| 57 | ## ----------------------------------------------------------------------- |
| 58 | ## Intent: Display target help |
| 59 | ## ----------------------------------------------------------------------- |
| 60 | help :: |
| 61 | @echo ' test-errors Run make test and display an error summary' |
| 62 | |
| 63 | $(if $(DEBUG),$(warning LEAVE)) |
| 64 | |
| 65 | # [EOF] |