From af1ac94a49e1131c2c3a4e1e008b4245ece61b3a Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Mon, 13 Aug 2012 18:00:57 +0200 Subject: maintcheck: fix spurious warnings * t/distcheck-override-infodir.sh: Be sure that valid occurences of the "aclocal" and "automake" strings, which can confuse the 'sc_tests_plain_automake' check, are protected by leading "#" characters. * t/ax/test-lib.sh: Always use '$(...)' for command subtitution, to avoid triggering the 'sc_tests_command_subst' check; there was still once place where `...` was used. While at it, fix a related comment. * t/ax/test-defs.in ($sleep): Use creative quoting to avoid spuriously triggering the 'sc_tests_plain_sleep' check. Signed-off-by: Stefano Lattarini --- t/ax/test-defs.in | 4 +++- t/ax/test-lib.sh | 8 ++++--- t/distcheck-override-infodir.sh | 47 +++++++++++++++++++++-------------------- 3 files changed, 32 insertions(+), 27 deletions(-) (limited to 't') diff --git a/t/ax/test-defs.in b/t/ax/test-defs.in index 56b45e1ca..dbfe827c3 100644 --- a/t/ax/test-defs.in +++ b/t/ax/test-defs.in @@ -165,7 +165,9 @@ TEX=${AM_TESTSUITE_TEX-'@TEX@'} # The amount we should wait after modifying files depends on the platform. # For instance, Windows '95, '98 and ME have 2-second granularity # and can be up to 3 seconds in the future w.r.t. the system clock. -sleep='sleep @MODIFICATION_DELAY@' +# The creative quoting is to avoid spuriously triggering a failure in +# the maintainer checks, +sleep='sleep ''@MODIFICATION_DELAY@' # An old timestamp that can be given to a file, in "touch -t" format. # The time stamp should be portable to all file systems of interest. diff --git a/t/ax/test-lib.sh b/t/ax/test-lib.sh index 6048f8112..71c2e49ad 100644 --- a/t/ax/test-lib.sh +++ b/t/ax/test-lib.sh @@ -51,9 +51,11 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then } else argv0=$0 - # Avoid command substitution failure, for it might cause problems with - # "set -e" on some shells. - case `(set -o) 2>/dev/null || :` in *posix*) set -o posix;; esac + # Ignore command substitution failure, for it might cause problems + # with "set -e" on some shells. + am_shell_opts=$(set -o) || : + case $am_shell_opts in *posix*) set -o posix;; esac + unset am_shell_opts fi # A single whitespace character. diff --git a/t/distcheck-override-infodir.sh b/t/distcheck-override-infodir.sh index ff792f736..74f6c676d 100755 --- a/t/distcheck-override-infodir.sh +++ b/t/distcheck-override-infodir.sh @@ -38,29 +38,30 @@ installcheck-local: fi END -cat > main.texi << 'END' -\input texinfo -@setfilename main.info -@settitle main - -@c Explicit calls to @dircategory and @direntry required to ensure that -@c a 'dir' file will be created also by older versions of 'install-info' -@c (e.g., the one coming with Texinfo 4.8). - -@dircategory Software development -@direntry -* Automake: (automake). Making GNU standards-compliant Makefiles -@end direntry - -@dircategory Individual utilities -@direntry -* aclocal-invocation: (automake)aclocal Invocation. Generating aclocal.m4 -* automake-invocation: (automake)automake Invocation. Generating Makefile.in -@end direntry - -@node Top -Hello walls. -@bye +# Protect with leading " # " to avoid spurious maintainer-check failures. +sed 's/^ #//' > main.texi << 'END' + # \input texinfo + # @setfilename main.info + # @settitle main + # + # @c Explicit calls to @dircategory and @direntry required to ensure that + # @c a 'dir' file will be created also by older versions of 'install-info' + # @c (e.g., the one coming with Texinfo 4.8). + # + # @dircategory Software development + # @direntry + # * Automake: (automake). Making GNU standards-compliant Makefiles + # @end direntry + # + # @dircategory Individual utilities + # @direntry + # * aclocal-invocation: (automake)aclocal Invocation. Generating aclocal.m4 + # * automake-invocation: (automake)automake Invocation. Generating Makefile.in + # @end direntry + # + # @node Top + # Hello walls. + # @bye END $ACLOCAL -- cgit v1.2.1