* testsuite/config-sub.sh (run_config_sub): New function. Compute

$rc within the function and return it.
	* testsuite/config-guess.sh (run_config_guess): Likewise.
This commit is contained in:
Ben Elliston 2005-02-10 03:46:56 +00:00
parent 64c794e628
commit f5687ec147
3 changed files with 59 additions and 41 deletions

View File

@ -1,3 +1,9 @@
2005-02-10 Ben Elliston <bje@gnu.org>
* testsuite/config-sub.sh (run_config_sub): New function. Compute
$rc within the function and return it.
* testsuite/config-guess.sh (run_config_guess): Likewise.
2005-02-10 Ben Elliston <bje@gnu.org>
* config.guess (amd64:CYGWIN*:*:*): New.

View File

@ -1,17 +1,18 @@
#!/bin/sh
#
# Copyright 2004 Free Software Foundation, Inc.
# Copyright 2004, 2005 Free Software Foundation, Inc.
# Contributed by Ben Elliston <bje@gnu.org>.
#
# This test reads 5-tuples from config-guess.data: the components of the simulated
# uname(1) output and the expected GNU system triplet.
# This test reads 5-tuples from config-guess.data: the components of
# the simulated uname(1) output and the expected GNU system triplet.
verbose=false
rc=0
export PATH=`pwd`:$PATH
IFS=" " # tab
sed 's/ */ /g' < config-guess.data |
function run_config_guess ()
{
rc=0
while read machine release system version triplet ; do
sed \
-e "s,@MACHINE@,$machine," \
@ -32,7 +33,11 @@ sed 's/ */ /g' < config-guess.data |
fi
$verbose && echo "PASS: $triplet"
done
return $rc
}
sed 's/ */ /g' < config-guess.data | run_config_guess
rc=$?
if test $rc -eq 0 ; then
$verbose || echo "PASS: config.guess checks"
else

View File

@ -1,13 +1,16 @@
#!/bin/sh
#
# Copyright 2004 Free Software Foundation, Inc.
# Copyright 2004, 2005 Free Software Foundation, Inc.
# Contributed by Ben Elliston <bje@gnu.org>.
#
# This test reads pairs from config-sub.data: an alias and its canonical triplet.
# The config.sub scripts is invoked and the test checks that the alias expands to the
# expected canonical triplet.
# This test reads pairs from config-sub.data: an alias and its
# canonical triplet. The config.sub scripts is invoked and the test
# checks that the alias expands to the expected canonical triplet.
verbose=false
function run_config_sub ()
{
rc=0
while read alias canonical ; do
output=`sh ../config.sub $alias`
@ -18,7 +21,11 @@ while read alias canonical ; do
$verbose && echo "PASS: $alias"
fi
done < config-sub.data
return $rc
}
run_config_sub
rc=$?
if test $rc -eq 0 ; then
$verbose || echo "PASS: config.sub checks"
else