Commit a5b0694f authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Makefile/check-local: List all errors before failing



Use the “error” variable in multiple places and fail only once all tests
have been completed.
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 98a83f17
...@@ -1491,23 +1491,23 @@ check-local: check-dirs $(GENERATED_FILES) ...@@ -1491,23 +1491,23 @@ check-local: check-dirs $(GENERATED_FILES)
$(CHECK_NEWS) < $(top_srcdir)/NEWS $(CHECK_NEWS) < $(top_srcdir)/NEWS
PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(CHECK_IMPORTS) . $(standalone_python_modules) PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(CHECK_IMPORTS) . $(standalone_python_modules)
@expver=$(VERSION_MAJOR).$(VERSION_MINOR); \ @expver=$(VERSION_MAJOR).$(VERSION_MINOR); \
error= ; \
if test "`head -n 1 $(top_srcdir)/README`" != "Ganeti $$expver"; then \ if test "`head -n 1 $(top_srcdir)/README`" != "Ganeti $$expver"; then \
echo "Incorrect version in README, expected $$expver"; \ echo "Incorrect version in README, expected $$expver" >&2; \
exit 1; \ error=1; \
fi; \ fi; \
for file in doc/iallocator.rst doc/hooks.rst doc/virtual-cluster.rst \ for file in doc/iallocator.rst doc/hooks.rst doc/virtual-cluster.rst \
doc/security.rst; do \ doc/security.rst; do \
if test "`sed -ne '4 p' $(top_srcdir)/$$file`" != \ if test "`sed -ne '4 p' $(top_srcdir)/$$file`" != \
"Documents Ganeti version $$expver"; then \ "Documents Ganeti version $$expver"; then \
echo "Incorrect version in $$file, expected $$expver"; \ echo "Incorrect version in $$file, expected $$expver" >&2; \
exit 1; \ error=1; \
fi; \ fi; \
done; \ done; \
if ! test -f $(top_srcdir)/doc/design-$$expver.rst; then \ if ! test -f $(top_srcdir)/doc/design-$$expver.rst; then \
echo "File $(top_srcdir)/doc/design-$$expver.rst not found"; \ echo "File $(top_srcdir)/doc/design-$$expver.rst not found" >&2; \
exit 1; \ error=1; \
fi; \ fi; \
error= ; \
for file in configure.ac $(HS_LIBTEST_SRCS) $(HS_PROG_SRCS); do \ for file in configure.ac $(HS_LIBTEST_SRCS) $(HS_PROG_SRCS); do \
if test $$(wc --max-line-length < $(top_srcdir)/$$file) -gt 80; then \ if test $$(wc --max-line-length < $(top_srcdir)/$$file) -gt 80; then \
echo "Longest line in $$file is longer than 80 characters" >&2; \ echo "Longest line in $$file is longer than 80 characters" >&2; \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment