automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, testsuite-work, updated. v1


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, testsuite-work, updated. v1.11-851-g2d44870
Date: Sun, 15 May 2011 14:27:15 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=2d448707a0b72421a74d4699f951a251d47738ca

The branch, testsuite-work has been updated
       via  2d448707a0b72421a74d4699f951a251d47738ca (commit)
       via  68e69411324c7d79a5c274977785d4b3cdba910f (commit)
       via  daa946a431442335bdf965e27b6f81f6c109fddc (commit)
       via  670146aeb51fdf3063c3e479c761a921a7053700 (commit)
       via  63796a15ef7d6cbff0fe734f8c293368183d6516 (commit)
      from  70a9da6a32f9dbb14a7133c341ecc2f1d9b76f59 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2d448707a0b72421a74d4699f951a251d47738ca
Merge: 70a9da6 68e6941
Author: Stefano Lattarini <address@hidden>
Date:   Sun May 15 15:38:14 2011 +0200

    Merge branch 'master' into testsuite-work
    
    * master:
      testsuite: be more cross-compile friendly
      tests: fix portability issues in 'repeated-options.test'

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                   |   16 +++++++++++++
 tests/defs                  |   50 ++++++++++++++++++++++++++++++++++++++++--
 tests/repeated-options.test |   12 +++++++---
 3 files changed, 71 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7859a4e..764a99a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2011-05-15  Stefano Lattarini  <address@hidden>
+
+       testsuite: be more cross-compile friendly
+       * tests/defs.in (cross_compiling): New subroutine.
+       (am__tool_prefix): New internal variable.
+       (gcc, g++, gcj): Force the use of the correct "tool prefix"
+       when cross compiling.
+       (gfortran, g77, non-cross): New requirements.
+
+2011-05-15  Stefano Lattarini  <address@hidden>
+
+       tests: fix portability issues in 'repeated-options.test'
+       * tests/repeated-options.test: Do not assume that object files
+       have `.o' suffix and executables have no default suffix; instead,
+       use `$(OBJEXT)' and `$(EXEEXT)'.
+
 2011-05-07  Stefano Lattarini  <address@hidden>
 
        tests: fix spurious failure of extradep.test on FreeBSD
diff --git a/tests/defs b/tests/defs
index d2f1284..e4e3cc1 100644
--- a/tests/defs
+++ b/tests/defs
@@ -129,6 +129,15 @@ fail_ () { warn_ "$me: failed test: $@"; Exit 1; }
 skip_ () { warn_ "$me: skipped test: $@"; Exit 77; }
 framework_failure_ () { warn_ "$me: set-up failure: $@"; Exit 99; }
 
+# cross_compiling
+# ---------------
+# Tell whether we are cross-compiling.  This is especially useful to skip
+# tests (or portions of them) that requires a native compiler.
+cross_compiling ()
+{
+  test x"$host_alias" != x
+}
+
 # is_newest FILE FILES
 # --------------------
 # Return false if any file in FILES is newer than FILE.
@@ -232,6 +241,14 @@ sed_unindent_prog="" # Avoid interferences from the 
environment.
 # will be skipped due to some tool missing in $PATH itself.
 echo "$PATH"
 
+# So that we can force the use of correct gcc, g++ etc., consistently
+# with cross-compilation settings.
+if cross_compiling; then
+  am__tool_prefix="$host_alias-"
+else
+  am__tool_prefix=
+fi
+
 # Look for (and maybe set up) required tools and/or system features; skip
 # the current test if they are not found.
 for tool in : $required
@@ -285,7 +302,7 @@ do
       # always use it.  This is important only when the user
       # has defined CC in his environment, otherwise ./configure will
       # prefer gcc to other compilers.
-      CC=gcc
+      CC=${am__tool_prefix}gcc
       export CC
       echo "$me: running $CC --version"
       $CC --version || skip_ "GNU C compiler not available"
@@ -293,7 +310,7 @@ do
       $CC -v || skip_ "botched installation for GNU C compiler"
       ;;
     gcj)
-      GCJ=gcj
+      GCJ=${am__tool_prefix}gcj
       export GCJ
       echo "$me: running $GCJ --version"
       $GCJ --version || skip_ "GNU Java compiler not available"
@@ -301,13 +318,37 @@ do
       $GCJ -v || skip_ "botched installation for GNU Java compiler"
       ;;
     g++)
-      CXX=g++
+      CXX=${am__tool_prefix}g++
       export CXX
       echo "$me: running $CXX --version"
       $CXX --version || skip_ "GNU C++ compiler not available"
       echo "$me: running $CXX -v"
       $CXX -v || skip_ "botched installation for GNU C++ compiler"
       ;;
+    gfortran)
+      FC=${am__tool_prefix}gfortran
+      export FC
+      echo "$me: running $FC --version"
+      $FC --version || skip_ "GNU Fortran compiler not available"
+      echo "$me: running $FC -v"
+      $FC -v || skip_ "botched installation for GNU Fortran compiler"
+      case " $required " in
+        *\ g77\ *) ;;
+        *) F77=$FC; export F77;;
+      esac
+      ;;
+    g77)
+      F77=${am__tool_prefix}g77
+      export F77
+      echo "$me: running $F77 --version"
+      $F77 --version || skip_ "GNU Fortran 77 compiler not available"
+      echo "$me: running $F77 -v"
+      $F77 -v || skip_ "botched installation for GNU Fortran 77 compiler"
+      case " $required " in
+        *\ gfortran\ *) ;;
+        *) FC=$F77; export FC;;
+      esac
+      ;;
     icc)
       CC=icc
       export CC
@@ -357,6 +398,9 @@ do
         skip_ "Devel::Cover cannot cope with threads"
       fi
       ;;
+    non-cross)
+      cross_compiling && skip_ "doesn't work in cross-compile mode"
+      ;;
     python)
       # Python doesn't support --version, it has -V
       echo "$me: running python -V"
diff --git a/tests/repeated-options.test b/tests/repeated-options.test
index 4ad6be6..c3c2e29 100755
--- a/tests/repeated-options.test
+++ b/tests/repeated-options.test
@@ -34,14 +34,20 @@ AUTOMAKE_OPTIONS = parallel-tests subdir-objects 
subdir-objects
 AUTOMAKE_OPTIONS += dist-bzip2 parallel-tests
 TESTS = foo.test
 EXTRA_DIST = $(TESTS)
+TESTS_ENVIRONMENT = EXEEXT='$(EXEEXT)'
 bin_PROGRAMS = sub/foo
+.PHONY: test-build
+test-build:
+       ls -l . sub
+       test -f sub/foo.$(OBJEXT)
+       test -f sub/foo$(EXEEXT)
 END
 
 mkdir sub
 
 cat > foo.test <<'END'
 #!/bin/sh
-test -f sub/foo && test -x sub/foo
+test -f sub/foo$EXEEXT && test -x sub/foo$EXEEXT
 END
 chmod a+x foo.test
 
@@ -62,9 +68,7 @@ $AUTOCONF
 
 ./configure
 $MAKE
-ls -l . sub
-test -f sub/foo.o
-test -f sub/foo
+$MAKE test-build
 $MAKE check
 ls -l
 test -f foo.log


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]