Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Thiago Jung Bauermann <bauerman@br.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: regression test on the compile farm
Date: Tue, 29 Jul 2008 21:39:00 -0000	[thread overview]
Message-ID: <m3zlo05q28.fsf@fleche.redhat.com> (raw)
In-Reply-To: <1217364528.5842.40.camel@localhost.localdomain> (Thiago Jung Bauermann's message of "Tue\, 29 Jul 2008 17\:48\:48 -0300")

[-- Attachment #1: Type: text/plain, Size: 1850 bytes --]

>>>>> "Thiago" == Thiago Jung Bauermann <bauerman@br.ibm.com> writes:

Tom> Built and regression tested on the compile farm (x86-64).

Thiago> Pray tell, is that wondrous compile farm available to other gdb
Thiago> developers as well? :-)

Sure.  It is the GCC Compile Farm.  You can get an account, see:

    http://gcc.gnu.org/wiki/CompileFarm

I am running a modified copy of Sebastian Pop's GCC patch-testing
script.  This variant is specific to gdb, and in particular uses Jim
Meyering's git clone of gdb CVS -- this is necessary to set a known
baseline for a patch.  Note that this means you have to make your
patch against the git repository.

I can send out my scripts and whatnot... I have gdb_tester.sh (run on
the server), plus a "mkdiff" (a wrapper for git diff that stuffs in
some metadata that the tester uses -- and lets you tweak the
configure/make/etc options) and "submit-patch" (send mkdiff output to
the tester).

So, a typical scenario is: hack hack hack; "mkdiff > Patches/whatever.diff";
"submit-patch Patches/whatever.diff".  Then after a short time I get
email saying how it went :)

Instead of having everybody set up a separate tester, though, I am
thinking I will just make my 'patches' directory writable.  Then we
can all share an instance... this should be ok since I am not using it
all that heavily.  (If enough of us share it we could look into more
infrastructure, say a status-reporting irc bot or buildbot setup or
something.)

If someone wants to volunteer to be the first to try it out, let me
know offline and I will set up permissions.

I've attached the scripts; please report problems, send patches to
them, etc, to me.  Thanks.

I've also been thinking about setting up a compile farm job to run the
gdb test suite against gcc svn trunk.  But, maybe somebody else would
like to volunteer for that ;)

Tom


[-- Attachment #2: mkdiff --]
[-- Type: application/octet-stream, Size: 4326 bytes --]

#!/bin/sh

# Copyright (C) 2003, 2008 Free Software Foundation

# This script is Free Software, and it can be copied, distributed and
# modified as defined in the GNU General Public License.  A copy of
# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html

# Written by Tom Tromey <tromey@redhat.com>

# mkdiff version 2.0

# Usage: mkdiff [OPTION]... [FILE]...
# Make a patch suitable for submission to the GCC patch tester.
# The diff is made relative to the top of the tree, but the FILE
# options are relative the working directory, so this can be invoked
# exactly as one would invoke "svn diff" or "git diff", depending on
# the working tree.

#   --email=ADDR      email address to use (default currentuser@gcc.gnu.org)
#   --branch=BRANCH   branch to use (default from working directory)
#   --revision=REV    revision to use (default from working directory)
#   --config=OPTSTR   set configure options (default none)
#   --make=OPTSTR     set make options (default none)
#   --check=OPTSTR    set check options (default none)

#   --help            print this help, then exit
#   --version         print version number, then exit

# Unrecognized options are assumed to be options to "svn diff"
# or "git diff".

if test -d .svn; then
    vc=svn
elif git status -a > /dev/null 2>&1; then
    vc=git
else
    echo "$name: not in SVN or git-controlled directory" 1>&2
    exit 1
fi

name=mkdiff

diffopts=
email=`id -un`@gcc.gnu.org
branch=
revision=
files=
configopts=
makeopts=
checkopts=

# Parsing loop taken from Alexandre Oliva's cvs scripts.
while test $# -gt 0; do
    case "$1" in
    -v|--version)
	sed '/^# '$name' version / { s/^# //; p; }; d' < $0
	exit 0
	;;
    -\?|-h)
	sed '/^# usage:/ { s/^# //; p; }; d' < $0 &&
	echo
	echo "run \`$name --help | more' for full usage"
	exit 0
	;;
    --help)
	sed '/^# '$name' version /,/^[^#]/ { /^[^#]/ d; s/^# //; p; }; d' < $0
	exit 0
	;;
    --email=*)
        email=`echo "$1" | sed -e 's,--email=,,'`
	;;
    --branch=*)
        branch=`echo "$1" | sed -e 's,--branch=,,'`
	;;
    --revision=*)
        revision=`echo "$1" | sed -e 's,--revision=,,'`
	;;
    --check=*)
        checkopts=`echo "$1" | sed -e 's,--check=,,'`
	;;
    --make=*)
        makeopts=`echo "$1" | sed -e 's,--make=,,'`
	;;
    --config=*)
        configopts=`echo "$1" | sed -e 's,--config=,,'`
	;;
    -*)
	diffopts="$diffopts $1"
	;;
    *)
        files="$files $1"
	;;
    esac
    shift
done

if test $vc = svn; then
    if test -z "$branch"; then
	repo=`svn info | grep '^URL:' | sed -e 's,^URL: ,,'`
	case $repo in
	    */gcc.gnu.org/svn/gcc/trunk*)
		branch=trunk
		;;
	    */gcc.gnu.org/svn/gcc/branches/*)
		branch=`echo $repo | sed 's,.*/branches/\([^/]*\).*$,\1,'`
		;;
	    *)
		echo "$name: unrecognized repository, use --branch: $repo" 1>&2
		exit 1
		;;
	esac
    fi

    if test -z "$revision"; then
	revision=`svn info | grep '^Revision:' | sed -e 's,^Revision: ,,'`
    fi
else
    if test -z "$revision"; then
	revision=`git log | sed -e 's,^commit *,,' -e 1q`
    fi
fi


here=`pwd`
orig=$here
dirname=

cdie() {
    cd $1 || {
	echo "$name: couldn't cd to $1 from `pwd`" 1>&2
	exit 1
    }
}

if test $vc = svn; then
    while test -e ../.svn; do
	cdie ..
	next=`basename "$here"`
	here=`dirname "$here"`
	if test -z "$dirname"; then
	    dirname="$next/"
	else
	    dirname="$next/$dirname"
	fi
    done
    projecttestdir=.
else
    # We want to find the project type, but we don't have to bother
    # with computing the directory properly -- git diff handles this
    # itself.
    save=`pwd`
    while ! test -e .git; do
	cdie ..
    done
    projecttestdir=`pwd`
    cd $save
fi

if test -d $projecttestdir/gcc; then
    projecttype=gcc
elif test -d $projecttestdir/gdb; then
    projecttype=gdb
else
    echo "$name: couldn't determine project type in $projecttestdir" 1>&2
    exit 1
fi

if test -z "$files"; then
    files=.
fi

# We don't use filterdiff -addprefix since that does not seem to
# handle Index: lines.
newfiles=
for file in $files; do
    newfiles="$newfiles $dirname$file"
done

echo "projecttype:$projecttype"
echo "email:$email"
if test $vc = svn; then
    echo "branch:$branch"
fi
echo "revision:$revision"
echo "configure:$configopts"
echo "make:$makeopts"
echo "check:$checkopts"
echo
$vc diff $diffopts $newfiles

[-- Attachment #3: submit-patch --]
[-- Type: application/octet-stream, Size: 2754 bytes --]

#! /bin/sh

# Copyright (C) 2003, 2008 Free Software Foundation

# This script is Free Software, and it can be copied, distributed and
# modified as defined in the GNU General Public License.  A copy of
# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html

# Written by Tom Tromey <tromey@redhat.com>

# submit-patch version 2.0

# Usage: submit-patch [OPTION]... PATCH-FILE [NAME]
# Regression test a GCC patch.

#   --host=HOST       host to use
#   --dir=DIR         directory to use on host

#   --help            print this help, then exit
#   --version         print version number, then exit

# If NAME is not given, the basename of the patch file is used as
# the patch name.
name=submit-patch
repeat="test $# -gt 0"

host=gcc13.fsffrance.org
# This is used to construct the patch dir if --dir is not given.
patchbase=/home/tromey/auto-test-

# Parsing loop taken from Alexandre Oliva's cvs scripts.
while $repeat; do
    case "$1" in
    -v|--version)
	sed '/^# '$name' version / { s/^# //; p; }; d' < $0
	exit 0
	;;
    -\?|-h)
	sed '/^# usage:/ { s/^# //; p; }; d' < $0 &&
	echo
	echo "run \`$name --help | more' for full usage"
	exit 0
	;;
    --help)
	sed '/^# '$name' version /,/^[^#]/ { /^[^#]/ d; s/^# //; p; }; d' < $0
	exit 0
	;;
    --host=*)
        host=`echo "$1" | sed -e 's,--host=,,'`
	shift
	;;
    --dir=*)
        patchdir=`echo "$1" | sed -e 's,--dir=,,'`
	shift
	;;
    --)
	shift
	repeat=false
	;;
    -*)
	echo "$name: unrecognized option '$1'" 1>&2
	echo "$name: Try '$name --help' for more information" 1>&2
	exit 1
	;;
    *)
	repeat=false
	;;
    esac
done

file=$1
shift
if test -z "$file"; then
   (sed '/^# usage:/ { s/^# //; p; }; d' < $0 &&
      echo
      echo "run \`$name --help | more' for full usage") 1>&2
    exit 1
fi

patch=$1
shift
if test -z "$patch"; then
   if test "x$file" = "x-"; then
      echo "$name: NAME argument required if patch is from stdin" 1>&2
      exit 1
   else
      patch=`basename $file`
   fi
fi

if test "x$file" != "x-"; then
    if ! grep -s "^email:" $file > /dev/null; then
	echo "$name: no email: line in $file; did you use mkdiff?" 1>&2
	exit 1
    fi
fi

if test -z "$patchdir"; then
    if test "x$file" = "x-"; then
	echo "$name: --dir required if patch is from stdin" 1>&2
	exit 1
    fi
    project=`sed -n -e 's/^projecttype://p' -e '/^$/q' $file`
    patchdir=$patchbase$project/patches
fi

# Only run filterdiff on a known non-git patch.
filter=cat
if test "x$file" != "x-"; then
    if ! grep -s "diff --git" $file > /dev/null; then
	filter="filterdiff -x '*ChangeLog*'"
    fi
fi

# FIXME: may be nice to auto-start the patch tester.
# Use 'cat' here so we can accept "-".
cat $file | $filter | ssh $host cat '>' $patchdir/`id -un`-$patch

[-- Attachment #4: gdb_tester.sh --]
[-- Type: application/x-sh, Size: 11130 bytes --]

  reply	other threads:[~2008-07-29 21:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-29 20:39 RFA: PR 2484: completion of macro names Tom Tromey
2008-07-29 20:49 ` regression test on the compile farm Thiago Jung Bauermann
2008-07-29 21:39   ` Tom Tromey [this message]
2008-09-28 22:01 ` RFA: PR 2484: completion of macro names Pedro Alves
2008-09-30 16:13   ` Tom Tromey
2008-09-30 16:54     ` Pedro Alves
2008-09-30 17:25       ` Tom Tromey
2008-10-01 17:46       ` Tom Tromey

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=m3zlo05q28.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=bauerman@br.ibm.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