[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: banners in scripts
From: |
Eric Blake |
Subject: |
Re: banners in scripts |
Date: |
Tue, 21 Oct 2008 14:30:11 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Eric Blake <ebb9 <at> byu.net> writes:
>
> This is a cosmetic patch, but it is helping me to review Paolo's series by
> adding well-defined search strings into the output files.
And this followup makes autotest consistent, too (it was a bit awkward seeing
the 'main body of script' banner as the last lines in the testsuite, long after
the script already invokes exit 0).
From: Eric Blake <address@hidden>
Date: Tue, 21 Oct 2008 08:27:07 -0600
Subject: [PATCH] Add banners to generated files.
* lib/autotest/general.m4 (AT_INIT): Make banners consistent.
Signed-off-by: Eric Blake <address@hidden>
---
ChangeLog | 1 +
lib/autotest/general.m4 | 15 ++++++---------
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b8472ae..e57150e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
(AS_INIT): Add new banners at strategic points.
* lib/autoconf/general.m4 (AC_INIT): Alter banner location, and
make consistent with other banners.
+ * lib/autotest/general.m4 (AT_INIT): Make banners consistent.
2008-10-20 Paolo Bonzini <address@hidden>
diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4
index 9e7df68..8df9395 100644
--- a/lib/autotest/general.m4
+++ b/lib/autotest/general.m4
@@ -216,6 +216,9 @@ m4_define([AT_help_all], [])
m4_foreach([AT_name], [_AT_DEFINE_INIT_LIST], [m4_popdef(m4_defn([AT_name]))])
m4_wrap([_AT_FINISH])
AS_INIT[]dnl
+dnl We don't use m4sh's BODY diversion, but AS_INIT sticks a banner there.
+dnl This trick removes that banner, since it adds nothing to autotest.
+m4_divert_text([KILL], [m4_undivert([BODY])])dnl
AS_ME_PREPARE[]dnl
m4_divert_push([DEFAULTS])dnl
AT_COPYRIGHT(
@@ -243,9 +246,7 @@ esac
m4_divert_pop([BANNERS])dnl back to DEFAULTS
m4_divert_push([PREPARE_TESTS])dnl
-## --------------- ##
-## Shell functions ##
-## --------------- ##
+m4_text_box([Autotest shell functions.])
AS_FUNCTION_DESCRIBE([at_func_banner], [NUMBER],
[Output banner NUMBER, provided the testsuite is running multiple groups
@@ -372,9 +373,7 @@ else
}
fi
-## ---------------------- ##
-## End of shell functions ##
-## ---------------------- ##
+m4_text_box([End of autotest shell functions.])
m4_divert_pop([PREPARE_TESTS])dnl back to DEFAULTS
# Not all shells have the 'times' builtin; the subshell is needed to make
@@ -783,9 +782,7 @@ if test -n "$at_top_srcdir"; then
done
fi
-## ------------------- ##
-## Directory structure ##
-## ------------------- ##
+m4_text_box([Directory structure.])
# This is the set of directories and files used by this script
# (non-literals are capitalized):
--
1.6.0.2