libtool-patches
[Top][All Lists]
Advanced

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

Re: Make f77tests fail on lots of platforms?


From: Peter O'Gorman
Subject: Re: Make f77tests fail on lots of platforms?
Date: Sun, 12 Sep 2004 22:36:48 +0900
User-agent: Mozilla Thunderbird 0.7.3 (Macintosh/20040803)

Gary V.Vaughan wrote:

Better yet:

eval $MAKE || func_skip "The improved fortran tests catch a known failure mode"

I applied the following.

Thanks,
Peter
--
Peter O'Gorman - http://www.pogma.com
Index: ChangeLog
2004-09-12  Peter O'Gorman  <address@hidden>

        Our fortran tests were not very good. All the libraries created
        were convenience libs, so we did not test the creation of shared
        libraries on any platform. Also none of the libs used any actual
        fortran library calls, adding a call to write(*,*) in each lib
        causes the tests to fail on darwin (and presumably other platforms).
        These new tests would likely cause many more fortran test failures,
        so if there is an error during make it is reported as SKIP.

        * tests/f77demo-make.test: Don't fail hard, skip on failure.
        * tests/f77demo/foof2.f: New file.
        * tests/f77demo/foof3.f: New file.
        * tests/f77demo/fprogram.f: Call routine in new lib.
        * tests/f77demo/foof.f: Call routine in another new lib.
        * tests/f77demo/Makefile.am: Make a couple of new libraries, add
        $(FLIBS) to cprogram LDADD.

from  Ralf Wildenhues  <address@hidden>
Index: tests/f77demo-make.test
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/f77demo-make.test,v
retrieving revision 1.4
diff -u -3 -p -u -r1.4 f77demo-make.test
--- tests/f77demo-make.test 4 Jan 2004 20:45:24 -0000 1.4
+++ tests/f77demo-make.test 11 Sep 2004 15:18:23 -0000
@@ -31,6 +31,8 @@ func_require "f77demo-conf" "f77demo/Mak
 
 func_rmprefixdir
 func_cd "f77demo"
-func_make
+# May fail make on some platforms, simply "skip" in that case
+#func_make
+eval $MAKE || func_skip "The improved fortran tests catch a known failure mode"
 
 exit 0
Index: tests/f77demo/Makefile.am
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/f77demo/Makefile.am,v
retrieving revision 1.5
diff -u -3 -p -u -r1.5 Makefile.am
--- tests/f77demo/Makefile.am 13 Apr 2004 14:30:50 -0000 1.5
+++ tests/f77demo/Makefile.am 11 Sep 2004 15:18:23 -0000
@@ -21,12 +21,19 @@ AUTOMAKE_OPTIONS = no-dependencies forei
 ACLOCAL_AMFLAGS  = -I ../../m4
 AM_CPPFLAGS     = -I$(top_srcdir)/../..
 
-noinst_LTLIBRARIES = libfoo.la libmix.la
+lib_LTLIBRARIES = libfoo.la libmix.la libfoo2.la libfoo3.la
 
 libfoo_la_SOURCES = foof.f
 libfoo_la_LDFLAGS = -no-undefined
+libfoo_la_LIBADD = libfoo2.la
 
-libmix_la_SOURCES = foof.f fooc.c
+libfoo2_la_SOURCES = foof2.f
+libfoo2_la_LDFLAGS = -no-undefined
+
+libfoo3_la_SOURCES = foof3.f
+libfoo3_la_LDFLAGS = -no-undefined
+
+libmix_la_SOURCES = foof.f foof2.f fooc.c
 libmix_la_LDFLAGS = -no-undefined
 
 noinst_HEADERS = foo.h
@@ -34,10 +41,10 @@ noinst_HEADERS = foo.h
 bin_PROGRAMS = fprogram cprogram
 
 fprogram_SOURCES = fprogram.f
-fprogram_LDADD = libfoo.la
+fprogram_LDADD = libfoo.la libfoo3.la
 
 cprogram_SOURCES = cprogram.c
-cprogram_LDADD = libmix.la
+cprogram_LDADD = libmix.la $(FLIBS)
 
 $(OBJECTS): libtool
 libtool: $(LIBTOOL_DEPS)
Index: tests/f77demo/foof.f
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/f77demo/foof.f,v
retrieving revision 1.1
diff -u -3 -p -u -r1.1 foof.f
--- tests/f77demo/foof.f 14 Oct 2003 21:46:13 -0000 1.1
+++ tests/f77demo/foof.f 11 Sep 2004 15:18:23 -0000
@@ -6,8 +6,7 @@ C of the License, or (at your option) an
 C 
 
       subroutine fsub(arg,res)
-      implicit none
-      integer*4 arg,res
-      res=arg*2
+      write(*,*) 'fsub called'
+      call fsubf(arg,res)
       return
       end
Index: tests/f77demo/foof2.f
===================================================================
RCS file: tests/f77demo/foof2.f
diff -N tests/f77demo/foof2.f
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ tests/f77demo/foof2.f 11 Sep 2004 15:18:23 -0000
@@ -0,0 +1,14 @@
+C 
+C This program is free software; you can redistribute it and/or
+C modify it under the terms of the GNU General Public License
+C as published by the Free Software Foundation; either version 2
+C of the License, or (at your option) any later version.
+C 
+
+      subroutine fsubf(arg,res)
+      implicit none
+      integer*4 arg,res
+      write(*,*) 'fsubf called'
+      res=arg*2
+      return
+      end
Index: tests/f77demo/foof3.f
===================================================================
RCS file: tests/f77demo/foof3.f
diff -N tests/f77demo/foof3.f
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ tests/f77demo/foof3.f 11 Sep 2004 15:18:23 -0000
@@ -0,0 +1,14 @@
+C 
+C This program is free software; you can redistribute it and/or
+C modify it under the terms of the GNU General Public License
+C as published by the Free Software Foundation; either version 2
+C of the License, or (at your option) any later version.
+C 
+
+      subroutine fsub3(arg,res)
+      implicit none
+      integer*4 arg,res
+      write(*,*) 'fsub3 called'
+      res=arg*4
+      return
+      end
Index: tests/f77demo/fprogram.f
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/f77demo/fprogram.f,v
retrieving revision 1.1
diff -u -3 -p -u -r1.1 fprogram.f
--- tests/f77demo/fprogram.f 14 Oct 2003 21:46:13 -0000 1.1
+++ tests/f77demo/fprogram.f 11 Sep 2004 15:18:23 -0000
@@ -21,7 +21,14 @@ C 
          write(*,*) 'fsub is ok!'
       endif
 
+      call fsub3(arg,res)
+
+      write(*,*) 'fsub3 returned, saying that 4 *',arg,' =',res
+
+      if (res.eq.8) then
+         write(*,*) 'fsub3 is ok!'
+      endif
+
       stop
       end
 
-         

reply via email to

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