blob: 8b8a6142090e5cdcc16b9b32de84078089ddf26a [file] [log] [blame]
Joey Armstrong64b82492023-06-01 17:34:39 -04001# -*- 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## -----------------------------------------------------------------------
26test-errors-lint := test-errors.lint.log
27test-errors-link := test-errors.linkcheck.log
28test-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 Armstrong7d32cbe2023-06-02 14:30:19 -040036 @echo '** Examining log for errors: $(test-errors-lint)'
Joey Armstrong64b82492023-06-01 17:34:39 -040037 $(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 Armstrong7d32cbe2023-06-02 14:30:19 -040045 @echo '** Examining log for errors: $(test-errors-link)'
Joey Armstrong64b82492023-06-01 17:34:39 -040046 $(HIDE)! grep \
47 -e 'make: ***' \
Joey Armstrong7d32cbe2023-06-02 14:30:19 -040048 -e ') broken' \
Joey Armstrong64b82492023-06-01 17:34:39 -040049 $(test-errors-link)
50
51## -----------------------------------------------------------------------
52## Intent: Remove generated logfiles
53## -----------------------------------------------------------------------
54clean ::
55 $(RM) $(test-errors-lint) $(test-errors-link)
56
57## -----------------------------------------------------------------------
58## Intent: Display target help
59## -----------------------------------------------------------------------
60help ::
61 @echo ' test-errors Run make test and display an error summary'
62
63$(if $(DEBUG),$(warning LEAVE))
64
65# [EOF]