public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Sample regression hunting scripts
@ 2002-12-30 11:05 Daniel Jacobowitz
  0 siblings, 0 replies; only message in thread
From: Daniel Jacobowitz @ 2002-12-30 11:05 UTC (permalink / raw)
  To: gcc

Since I needed to make these up today anyway, I figured I'd share them.  I
was hunting a simple issue in cc1plus, and I decided to try Janis's script
(which really should g in contrib, IMHO).

Here's what I'm using for UPDATE_SRC:
=====CUT=====
#!/bin/sh
echo "Updating CVS to $1"
cd /big/fsf/local/gcc
set +e
./contrib/gcc_update -D"$1" include gcc Makefile.in contrib/gcc_update > /dev/null 2>/dev/null
echo "CVS update done."
=====CUT=====


The set +e is necessary because contrib/gcc_update will try to touch files
in places like libjava, which I'm not bothering to cvs update, in order to
save time.


Here's BUILD:
=====CUT=====
#!/bin/sh
set -e
cd /big/fsf/local/t/obj/gcc
echo "BUILD: Building for $1"
(exec > build.log
exec 2> build.log
rm -f cc1plus
./config.status --recheck
./config.status
make -j4 -s cc1plus
)
echo "BUILD: Done for $1"
test -f cc1plus || exit 1
=====CUT=====

You need to hand-run the two config.status's, because Makefile may depend on
files no longer present.

And a simple RUN_TEST:
=====CUT=====
#!/bin/sh
echo "RUN: Testing for $1"
set -e
cd /big/fsf/local/t/obj/gcc
./cc1plus -quiet -gdwarf-2 /big/fsf/local/t/test.cc -o test.s
gcc -c test.s
set +e
readelf -wi test.o | grep lexical > /dev/null
res=$?
echo "RUN: Result is $res"
exit $res
=====CUT=====

The result looks like:
drow@nevyn:/big/fsf/local/t% ../hunt.sh test.conf
Updating CVS to 2000-12-30 05:00
CVS update done.
BUILD: Building for 2000-12-30 05:00
BUILD: Done for 2000-12-30 05:00
RUN: Testing for 2000-12-30 05:00
RUN: Result is 1
Updating CVS to 2001-12-20 05:00
CVS update done.
BUILD: Building for 2001-12-20 05:00
BUILD: Done for 2001-12-20 05:00
RUN: Testing for 2001-12-20 05:00
RUN: Result is 0
Updating CVS to 2001-06-25 17:00
CVS update done.
BUILD: Building for 2001-06-25 17:00
BUILD: Done for 2001-06-25 17:00
RUN: Testing for 2001-06-25 17:00
RUN: Result is 1
Updating CVS to 2001-09-22 11:00
CVS update done.
BUILD: Building for 2001-09-22 11:00
BUILD: Done for 2001-09-22 11:00
RUN: Testing for 2001-09-22 11:00
RUN: Result is 1
Updating CVS to 2001-11-05 20:00
CVS update done.
BUILD: Building for 2001-11-05 20:00
BUILD: Done for 2001-11-05 20:00
RUN: Testing for 2001-11-05 20:00
RUN: Result is 1
Updating CVS to 2001-11-28 00:30
CVS update done.
BUILD: Building for 2001-11-28 00:30
BUILD: Done for 2001-11-28 00:30
RUN: Testing for 2001-11-28 00:30
RUN: Result is 1
Updating CVS to 2001-12-09 02:45
CVS update done.
BUILD: Building for 2001-12-09 02:45
BUILD: Done for 2001-12-09 02:45
RUN: Testing for 2001-12-09 02:45
RUN: Result is 1
Updating CVS to 2001-12-14 15:52
CVS update done.
BUILD: Building for 2001-12-14 15:52

and has already isolated the problem to within ten days.  This is a real
timesaver compared to doing it by hand!

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-12-30 17:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-30 11:05 Sample regression hunting scripts Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).