From 2a3599a35af99609eaf7d627f2fcd5852aa20ec8 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Thu, 16 Sep 2010 13:11:46 +0200 Subject: [PATCH 2/2] Fix some spurious maintainer-check failures (exit vs. Exit). * Makefile.am (sc_tests_Exit_not_exit): Fixed spurious failures, and other minor improvements. --- ChangeLog | 4 ++++ Makefile.am | 17 +++++++++++++---- Makefile.in | 14 +++++++++++--- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 950eafc..1b7e738 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2010-09-16 Stefano Lattarini + Fix some spurious maintainer-check failures (exit vs. Exit). + * Makefile.am (sc_tests_Exit_not_exit): Fixed spurious failures, + and other minor improvements. + New maintainer check, for typos in $required definition. * Makefile.am (sc_tests_required_typos): New maintaner check. (syntax_check_rules): Updated. diff --git a/Makefile.am b/Makefile.am index 7921181..6d8715a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -323,13 +323,22 @@ sc_tests_here_document_format: ## Tests should never call exit directly, but use Exit. ## This is so that the exit status is transported correctly across the 0 trap. -## Ignore comments, and ignore one perl line in ext2.test. +## Ignore comments, one perl line in ext2.test, and some legit uses in +## generated tests. sc_tests_Exit_not_exit: @found=false; for file in $(srcdir)/tests/*.test; do \ - res=`sed -n -e '/^#/d; /^\$$PERL/d' -e '/<<.*END/,/^END/b' \ - -e '/<<.*EOF/,/^EOF/b' -e '/exit [$$0-9]/p' $$file`; \ + res=`sed -n -e '/^#/d' -e '/<<.*END/,/^END/b' -e '/<<.*EOF/,/^EOF/b' \ + -e '/exit [$$0-9]/p' $$file`; \ + case $$file in\ + */ext2.test) \ + res=`printf '%s\n' "$$res" | grep -v '^ *\$$PERL '`;; \ + *-p.test) \ + res=`printf '%s\n' "$$res" \ + | grep -v '^\. \./defs || exit 99 *$$' \ + | grep -v '^test -n "\$$srcdir" || exit 99'`;; \ + esac; \ if test -n "$$res"; then \ - echo "$$file:$$res"; \ + printf '%s\n' "$$res" | sed "s|^|$$file:|"; \ found=true; \ fi; \ done; \ diff --git a/Makefile.in b/Makefile.in index 48fa893..aa3087a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1019,10 +1019,18 @@ sc_tests_here_document_format: sc_tests_Exit_not_exit: @found=false; for file in $(srcdir)/tests/*.test; do \ - res=`sed -n -e '/^#/d; /^\$$PERL/d' -e '/<<.*END/,/^END/b' \ - -e '/<<.*EOF/,/^EOF/b' -e '/exit [$$0-9]/p' $$file`; \ + res=`sed -n -e '/^#/d' -e '/<<.*END/,/^END/b' -e '/<<.*EOF/,/^EOF/b' \ + -e '/exit [$$0-9]/p' $$file`; \ + case $$file in\ + */ext2.test) \ + res=`printf '%s\n' "$$res" | grep -v '^ *\$$PERL '`;; \ + *-p.test) \ + res=`printf '%s\n' "$$res" \ + | grep -v '^\. \./defs || exit 99 *$$' \ + | grep -v '^test -n "\$$srcdir" || exit 99'`;; \ + esac; \ if test -n "$$res"; then \ - echo "$$file:$$res"; \ + printf '%s\n' "$$res" | sed "s|^|$$file:|"; \ found=true; \ fi; \ done; \ -- 1.7.1