Commit 3825be8c by Tom Tromey Committed by Tom Tromey

patch_tester.sh (usage): Watermark is not lexicographic.

	* patch_tester.sh (usage): Watermark is not lexicographic.
	Load $STATE/defaults if it exists.
	(selfexec): Use $0.
	(apply_patch): Handle deletions.
	(bootntest): Handle default settings.

From-SVN: r132974
parent 97efb03a
2008-03-06 Tom Tromey <tromey@redhat.com>
* patch_tester.sh (usage): Watermark is not lexicographic.
Load $STATE/defaults if it exists.
(selfexec): Use $0.
(apply_patch): Handle deletions.
(bootntest): Handle default settings.
2008-03-05 Jakub Jelinek <jakub@redhat.com> 2008-03-05 Jakub Jelinek <jakub@redhat.com>
* gennews (files): Reference GCC 4.3 web pages. * gennews (files): Reference GCC 4.3 web pages.
......
#!/bin/sh #!/bin/sh
# Tests a set of patches from a directory. # Tests a set of patches from a directory.
# Copyright (C) 2007 Free Software Foundation, Inc. # Copyright (C) 2007, 2008 Free Software Foundation, Inc.
# Contributed by Sebastian Pop <sebastian.pop@amd.com> # Contributed by Sebastian Pop <sebastian.pop@amd.com>
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
...@@ -48,8 +48,7 @@ patch_tester.sh [-j<N>] [-standby N] [-watermark N] [-savecompilers] [-nogpg] ...@@ -48,8 +48,7 @@ patch_tester.sh [-j<N>] [-standby N] [-watermark N] [-savecompilers] [-nogpg]
PATCHES_DIR. Default is ${default_standby} minutes. PATCHES_DIR. Default is ${default_standby} minutes.
WATERMARK is the 5 minute average system charge under which a new WATERMARK is the 5 minute average system charge under which a new
compile can start. Default is ${default_watermark}. Note that the comparison compile can start. Default is ${default_watermark}.
is done in lexicographical order, so don't forget the leading 0.
SAVECOMPILERS copies the compilers in the same directory as the SAVECOMPILERS copies the compilers in the same directory as the
test results for the non patched version. Default is not copy. test results for the non patched version. Default is not copy.
...@@ -132,6 +131,12 @@ fi ...@@ -132,6 +131,12 @@ fi
svn -q co svn://gcc.gnu.org/svn/gcc/trunk . svn -q co svn://gcc.gnu.org/svn/gcc/trunk .
} }
# This can contain required local settings:
# default_config configure options, always passed
# default_make make bootstrap options, always passed
# default_check make check options, always passed
[ -f $STATE/defaults ] && . $STATE/defaults
VERSION=`svn info $SOURCE | grep "^Revision:" | sed -e "s/^Revision://g" -e "s/ //g"` VERSION=`svn info $SOURCE | grep "^Revision:" | sed -e "s/^Revision://g" -e "s/ //g"`
exec >> $STATE/tester.log 2>&1 || exit 1 exec >> $STATE/tester.log 2>&1 || exit 1
...@@ -182,7 +187,7 @@ cleanup () { ...@@ -182,7 +187,7 @@ cleanup () {
} }
selfexec () { selfexec () {
exec ${CONFIG_SHELL-/bin/sh} $SOURCE/contrib/patch_tester.sh $args exec ${CONFIG_SHELL-/bin/sh} $0 $args
} }
update () { update () {
...@@ -263,6 +268,17 @@ apply_patch () { ...@@ -263,6 +268,17 @@ apply_patch () {
return 1 return 1
fi fi
fi fi
# Just assume indexes for now -- not really great, but svn always
# makes them.
grep "^Index: " $PATCH | sed -e 's/Index: //' | while read file; do
# If the patch resulted in an empty file, delete it.
# This is how svn reports deletions.
if [ ! -s $file ]; then
rm -f $file
report "Deleting empty file $file"
fi
done
} }
save_compilers () { save_compilers () {
...@@ -279,13 +295,16 @@ bootntest () { ...@@ -279,13 +295,16 @@ bootntest () {
cd $BUILD cd $BUILD
CONFIG_OPTIONS=`grep "^configure:" $PATCH | sed -e "s/^configure://g"` CONFIG_OPTIONS=`grep "^configure:" $PATCH | sed -e "s/^configure://g"`
CONFIG_OPTIONS="$default_config $CONFIG_OPTIONS"
if ! $SOURCE/configure $CONFIG_OPTIONS &> $1/configure ; then if ! $SOURCE/configure $CONFIG_OPTIONS &> $1/configure ; then
report "configure failed with:" report "configure failed with:"
freport $1/configure freport $1/configure
return 1 return 1
fi fi
if ! make $dashj `grep "^make:" $PATCH | sed -e "s/^make://g"` bootstrap &> $1/bootstrap ; then MAKE_ARGS=`grep "^make:" $PATCH | sed -e "s/^make://g"`
MAKE_ARGS="$default_make $MAKE_ARGS"
if ! make $dashj $MAKE_ARGS bootstrap &> $1/bootstrap ; then
report "bootstrap failed with last lines:" report "bootstrap failed with last lines:"
tail -30 $1/bootstrap > $1/last_bootstrap tail -30 $1/bootstrap > $1/last_bootstrap
freport $1/last_bootstrap freport $1/last_bootstrap
...@@ -296,6 +315,7 @@ bootntest () { ...@@ -296,6 +315,7 @@ bootntest () {
fi fi
CHECK_OPTIONS=`grep "^check:" $PATCH | sed -e "s/^check://g"` CHECK_OPTIONS=`grep "^check:" $PATCH | sed -e "s/^check://g"`
CHECK_OPTIONS="$default_check $CHECK_OPTIONS"
make $dashj $CHECK_OPTIONS -k check &> $1/check make $dashj $CHECK_OPTIONS -k check &> $1/check
for LOG in $TESTLOGS ; do for LOG in $TESTLOGS ; do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment