[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
cross compile testing fixups
From: |
Ralf Wildenhues |
Subject: |
cross compile testing fixups |
Date: |
Sat, 15 Mar 2008 23:06:56 +0100 |
User-agent: |
Mutt/1.5.17+20080114 (2008-01-14) |
I noticed that our cross-compile testing has some deficiencies: --build
is not passed at all, and with the old testsuite, --host was given $host
rather than $host_alias (which makes a difference if the name is not
canonical and the tools have the noncanonical name).
I've applied this fix to HEAD, which also happens to speed up the old
testsuite a bit by running 'libtool --config' less often.
Cheers,
Ralf
2008-03-15 Ralf Wildenhues <address@hidden>
* tests/defs.m4sh (func_get_config): Build egrep regex to speed
up extracting several variables at once. Use it to extract all
default variables at once. Also extract build_alias and
host_alias from the libtool script.
(func_configure_nofail): Use build_alias and host_alias for
--build and --host, respectively. Pass each if nonempty.
* tests/testsuite.at: Pass --build if build_alias is nonemtpy.
* tests/quote.test: Extract ECHO and wl at once.
Index: tests/defs.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/defs.m4sh,v
retrieving revision 1.18
diff -u -r1.18 defs.m4sh
--- tests/defs.m4sh 25 Mar 2007 12:12:43 -0000 1.18
+++ tests/defs.m4sh 15 Mar 2008 22:05:36 -0000
@@ -2,7 +2,8 @@
m4_divert_push([SCRIPT])# @configure_input@
# defs -- Defines for Libtool testing environment.
#
-# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2007, 2008 Free Software
+# Foundation, Inc.
# Written by Gord Matzigkeit, 1996
# Rewritten by Gary V. Vaughan, 2003
#
@@ -96,12 +97,26 @@
my_regex="$4"
my_exitp=false
+ if test -z "$my_regex"; then
+ my_regex="^("
+ my_build_regex=:
+ else
+ my_build_regex=false
+ fi
+ my_first=:
+
for my_varname in $my_varname_list; do
- test -z "$4" && my_regex="^${my_varname}="
-
+ if $my_build_regex; then
+ $my_first || my_regex="$my_regex|"
+ my_first=false
+ my_regex="$my_regex$my_varname"
+ fi
eval $my_varname=NONE
- eval `eval $my_src | eval $GREP \"$my_regex\"`
+ done
+ $my_build_regex && my_regex="$my_regex)="
+ eval `eval "$my_src" | eval "$EGREP \"$my_regex\""`
+ for my_varname in $my_varname_list; do
if eval test x\"\$$my_varname\" = xNONE; then
func_error "$my_varname not set in \`$my_src'"
$my_failp && my_exitp=:
@@ -112,20 +127,15 @@
}
-# Extract objext from the libtool configuration
-func_get_config "objext" "$LIBTOOL --config" ": fatal"
-
-# Extract objdir from the libtool configuration
-func_get_config "objdir" "$LIBTOOL --config" ": fatal"
-
-# Extract CC from the libtool configuration
-func_get_config "CC" "$LIBTOOL --config" ": fatal"
-
-# Extract host from the libtool configuration
-func_get_config "host" "$LIBTOOL --config" ": fatal"
+# Extract some variables from the libtool configuration.
+func_get_config "objext
+objdir
+CC
+host
+host_alias
+build
+build_alias" "$LIBTOOL --config" ": fatal"
-# Extract build from the libtool configuration
-func_get_config "build" "$LIBTOOL --config" ": fatal"
# func_mkprefixdir
func_mkprefixdir ()
@@ -185,7 +195,8 @@
test -n "$my_args" && my_args=" $my_args"
my_args="--srcdir="\""$my_testdir"\"" --prefix="\""$prefix"\""$my_args"
- test "$build" != "$host" && my_args="$my_args --host=\"$host\""
+ test -n "$host_alias" && my_args="$my_args --host=\"$host_alias\""
+ test -n "$build_alias" && my_args="$my_args --build=\"$build_alias\""
func_msg "Configuring in $my_dir"
Index: tests/quote.test
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/quote.test,v
retrieving revision 1.21
diff -u -r1.21 quote.test
--- tests/quote.test 25 Mar 2007 12:12:43 -0000 1.21
+++ tests/quote.test 15 Mar 2008 22:05:36 -0000
@@ -1,7 +1,7 @@
#! /bin/sh
# quote.test - make sure that shell metacharacters do not blow up libtool
#
-# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2008 Free Software Foundation, Inc.
# Written by Gary V. Vaughan, 2003
#
# This file is part of GNU Libtool.
@@ -37,8 +37,7 @@
;;
esac
-func_get_config "ECHO" "$LIBTOOL --config"
-func_get_config "wl" "$LIBTOOL --config"
+func_get_config "ECHO wl" "$LIBTOOL --config"
for mode in compile link install; do
$ECHO "== $mode mode"
Index: tests/testsuite.at
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/testsuite.at,v
retrieving revision 1.53
diff -u -r1.53 testsuite.at
--- tests/testsuite.at 8 Mar 2008 18:02:39 -0000 1.53
+++ tests/testsuite.at 15 Mar 2008 22:05:36 -0000
@@ -35,10 +35,13 @@
done
export ACLOCAL AUTOHEADER AUTOCONF AUTOMAKE AUTORECONF
eval `$LIBTOOL --config | grep '^EGREP='`
-eval `$LIBTOOL --config | $EGREP '^(host|host_os|host_alias|build|ECHO)='`
+eval `$LIBTOOL --config | $EGREP
'^(host|host_os|host_alias|build|build_alias|ECHO)='`
configure_options=
if test -n "$host_alias"; then
- configure_options="--host $host_alias"
+ configure_options="$configure_options --host $host_alias"
+fi
+if test -n "$build_alias"; then
+ configure_options="$configure_options --build $build_alias"
fi
if (FOO=bar; unset FOO) >/dev/null 2>&1; then
unset=unset
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- cross compile testing fixups,
Ralf Wildenhues <=