mirror of
git://git.savannah.gnu.org/config.git
synced 2025-05-29 02:26:36 +12:00
* 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:
parent
64c794e628
commit
f5687ec147
@ -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>
|
2005-02-10 Ben Elliston <bje@gnu.org>
|
||||||
|
|
||||||
* config.guess (amd64:CYGWIN*:*:*): New.
|
* config.guess (amd64:CYGWIN*:*:*): New.
|
||||||
|
@ -1,38 +1,43 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Copyright 2004 Free Software Foundation, Inc.
|
# Copyright 2004, 2005 Free Software Foundation, Inc.
|
||||||
# Contributed by Ben Elliston <bje@gnu.org>.
|
# Contributed by Ben Elliston <bje@gnu.org>.
|
||||||
#
|
#
|
||||||
# This test reads 5-tuples from config-guess.data: the components of the simulated
|
# This test reads 5-tuples from config-guess.data: the components of
|
||||||
# uname(1) output and the expected GNU system triplet.
|
# the simulated uname(1) output and the expected GNU system triplet.
|
||||||
|
|
||||||
verbose=false
|
verbose=false
|
||||||
rc=0
|
|
||||||
export PATH=`pwd`:$PATH
|
export PATH=`pwd`:$PATH
|
||||||
IFS=" " # tab
|
IFS=" " # tab
|
||||||
|
|
||||||
sed 's/ */ /g' < config-guess.data |
|
function run_config_guess ()
|
||||||
while read machine release system version triplet ; do
|
{
|
||||||
sed \
|
rc=0
|
||||||
-e "s,@MACHINE@,$machine," \
|
while read machine release system version triplet ; do
|
||||||
-e "s,@RELEASE@,$release," \
|
sed \
|
||||||
-e "s,@SYSTEM@,$system," \
|
-e "s,@MACHINE@,$machine," \
|
||||||
-e "s,@VERSION@,$version," < uname.in > uname
|
-e "s,@RELEASE@,$release," \
|
||||||
chmod +x uname
|
-e "s,@SYSTEM@,$system," \
|
||||||
output=`sh ../config.guess 2>/dev/null`
|
-e "s,@VERSION@,$version," < uname.in > uname
|
||||||
if test $? != 0 ; then
|
chmod +x uname
|
||||||
echo "FAIL: unable to guess $machine:$release:$system:$version"
|
output=`sh ../config.guess 2>/dev/null`
|
||||||
rc=1
|
if test $? != 0 ; then
|
||||||
continue
|
echo "FAIL: unable to guess $machine:$release:$system:$version"
|
||||||
fi
|
rc=1
|
||||||
if test $output != $triplet ; then
|
continue
|
||||||
echo "FAIL: $output (expected $triplet)"
|
fi
|
||||||
rc=1
|
if test $output != $triplet ; then
|
||||||
continue
|
echo "FAIL: $output (expected $triplet)"
|
||||||
fi
|
rc=1
|
||||||
$verbose && echo "PASS: $triplet"
|
continue
|
||||||
done
|
fi
|
||||||
|
$verbose && echo "PASS: $triplet"
|
||||||
|
done
|
||||||
|
return $rc
|
||||||
|
}
|
||||||
|
|
||||||
|
sed 's/ */ /g' < config-guess.data | run_config_guess
|
||||||
|
rc=$?
|
||||||
if test $rc -eq 0 ; then
|
if test $rc -eq 0 ; then
|
||||||
$verbose || echo "PASS: config.guess checks"
|
$verbose || echo "PASS: config.guess checks"
|
||||||
else
|
else
|
||||||
|
@ -1,28 +1,35 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Copyright 2004 Free Software Foundation, Inc.
|
# Copyright 2004, 2005 Free Software Foundation, Inc.
|
||||||
# Contributed by Ben Elliston <bje@gnu.org>.
|
# Contributed by Ben Elliston <bje@gnu.org>.
|
||||||
#
|
#
|
||||||
# This test reads pairs from config-sub.data: an alias and its canonical triplet.
|
# This test reads pairs from config-sub.data: an alias and its
|
||||||
# The config.sub scripts is invoked and the test checks that the alias expands to the
|
# canonical triplet. The config.sub scripts is invoked and the test
|
||||||
# expected canonical triplet.
|
# checks that the alias expands to the expected canonical triplet.
|
||||||
|
|
||||||
verbose=false
|
verbose=false
|
||||||
rc=0
|
|
||||||
while read alias canonical ; do
|
|
||||||
output=`sh ../config.sub $alias`
|
|
||||||
if test $output != $canonical ; then
|
|
||||||
echo "FAIL: $alias -> $output, but expected $canonical"
|
|
||||||
rc=1
|
|
||||||
else
|
|
||||||
$verbose && echo "PASS: $alias"
|
|
||||||
fi
|
|
||||||
done < config-sub.data
|
|
||||||
|
|
||||||
|
function run_config_sub ()
|
||||||
|
{
|
||||||
|
rc=0
|
||||||
|
while read alias canonical ; do
|
||||||
|
output=`sh ../config.sub $alias`
|
||||||
|
if test $output != $canonical ; then
|
||||||
|
echo "FAIL: $alias -> $output, but expected $canonical"
|
||||||
|
rc=1
|
||||||
|
else
|
||||||
|
$verbose && echo "PASS: $alias"
|
||||||
|
fi
|
||||||
|
done < config-sub.data
|
||||||
|
return $rc
|
||||||
|
}
|
||||||
|
|
||||||
|
run_config_sub
|
||||||
|
rc=$?
|
||||||
if test $rc -eq 0 ; then
|
if test $rc -eq 0 ; then
|
||||||
$verbose || echo "PASS: config.sub checks"
|
$verbose || echo "PASS: config.sub checks"
|
||||||
else
|
else
|
||||||
test $rc -eq 1 && echo "Unexpected failures."
|
test $rc -eq 1 && echo "Unexpected failures."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit $rc
|
exit $rc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user