From: "Pierre Muller" <muller@ics.u-strasbg.fr>
To: "'Joel Brobecker'" <brobecker@adacore.com>
Cc: <gdb-patches@sourceware.org>
Subject: RE: [RFC] Send new ARI warnings to gdb_testers mailing list
Date: Fri, 01 May 2009 09:24:00 -0000 [thread overview]
Message-ID: <013401c9ca3e$852e58c0$8f8b0a40$@u-strasbg.fr> (raw)
In-Reply-To: <20090423184213.GE7552@adacore.com>
Thanks for the remarks, Joel,
> However, the way it is implemented right now means that we'll also get
> an email when we fix things. I think that would be too much. What do
> others think?
What about the following patch:
it does copy the old ari.source.bug to ari.source.old
then it removes the line number field from each of the two files
(in order to avoid seeing only line number changes due to code insertion or
deletion),
and compares the two resulting files.
If the generated diff contains a '>' sign, it means that
a new warning has been generated.
The only drawback is that the line number also does not appear
on the generated email...
If someone with good awk knowledge can tell me out to
substitute each line of the diff (without the line number)
by the corresponding line of the files with line numbers,
it would make the email better.
Pierre Muller
Pascal language support maintainer for GDB
... still only fluent in pascal language, getting used to C,
but still ignorant in awk :(
$ cvs diff -u update-web-ari
Index: update-web-ari
===================================================================
RCS file: /cvs/gdbadmin/ss/update-web-ari,v
retrieving revision 1.141
diff -u -r1.141 update-web-ari
--- update-web-ari 6 Apr 2009 21:27:02 -0000 1.141
+++ update-web-ari 1 May 2009 09:19:47 -0000
@@ -157,10 +157,21 @@
if ${check_source_p} && test -d "${srcdir}"
then
+ cp -f ${wwwdir}/ari.source.bug ${wwwdir}/ari.source.old
echo "`date`: Checking source code" 1>&2
( cd "${srcdir}" && /bin/sh $HOME/ss/gdb_find.sh "${project}" | \
xargs /bin/sh $HOME/ss/gdb_ari.sh -Werror -Wall --print-idx
) > ${wwwdir}/ari.source.bug
+ difffile=${wwwdir}/ari.source.diff
+ sed -e "s/\([^:]*\):\([^:]*\):\(.*\)/\1:0:\3/" ${wwwdir}/ari.source.old
> ${wwwdir}/ari.source.old-pruned
+ sed -e "s/\([^:]*\):\([^:]*\):\(.*\)/\1:0:\3/" ${wwwdir}/ari.source.bug
> ${wwwdir}/ari.source.bug-pruned
+ diff ${wwwdir}/ari.source.old-pruned ${wwwdir}/ari.source.bug-pruned >
${difffile}-in
+ sed -n -e "/^>.*/p" ${difffile}-in > ${difffile}
+ if [ -s ${difffile} ]; then
+ # Send an email to gdb-testers@sourceware.org
+ mutt -s "ARI warning list change `date`" -i ${difffile}-in \
+ gdb-testers@sourceware.org
+ fi
fi
next prev parent reply other threads:[~2009-05-01 9:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-22 22:10 Pierre Muller
2009-04-23 18:42 ` Joel Brobecker
2009-05-01 9:24 ` Pierre Muller [this message]
2009-05-06 16:31 ` Joel Brobecker
2009-05-06 16:46 ` Pierre Muller
2009-05-19 8:35 ` Pierre Muller
2009-05-20 5:23 ` Joel Brobecker
2009-10-08 11:15 ` Pierre Muller
2009-10-08 15:52 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='013401c9ca3e$852e58c0$8f8b0a40$@u-strasbg.fr' \
--to=muller@ics.u-strasbg.fr \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox