bug-automake
[Top][All Lists]
Advanced

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

Small bugs in automake-1.5 tests


From: Michael S. Peek
Subject: Small bugs in automake-1.5 tests
Date: Tue, 26 Feb 2002 17:36:28 -0500

Hello,

I have found that some tests on automake fail on Solaris-2.8, although I have
traced the problems down and devised fixes, so I thought I would share them
with you.  (Guess I felt like being a contributing member of the computing
community today for a change, go figure.)

The first test to fail is cond4.test.  The problem seems to be that the make
produces extraneous output which is assigned to the msgXX variables.  For
instance, running the tests with the -x option to sh produces the following
variable assignment to msgtt:

        + /usr/local/bin/make --no-print-directory echo-objects
        msgtt=cd . && \
          CONFIG_HEADERS= CONFIG_LINKS= \
          CONFIG_FILES=Makefile /bin/sh ./config.status
        config.status: creating Makefile
        main.o one.o two.o

Everything from the "cd" to the "two.o" gets assigned to msgtt.  This causes
the whole test to crash.  My fix for this was to change the assignment of
msgtt, adding '| tail -1' to the end of the command like so:

        msgtt=`$MAKE --no-print-directory echo-objects | tail -1`

Repeating this modification for msgtf, msgft and msgff fixed the problem.

I also ran into the same problem with cond16.test, cond18.test, and
substref.test.  Making similar modifications took care of the problem.

My last problem was with yacc7.test.  The test assumes that it is using a GNU
version of the test program, which may not be the case under Solaris unless
sh-utils has also been installed.  My fix for this was simply to modify the
test to:

        test -e foo.h || test -f foo.h || exit 1

This way, if the GNU-ish call to test fails, it tries a slightly more portable
test that works under Solaris.

Attached is a patch file of my modifications.  

Bon apetite.

Michael Peek

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

diff -u --recursive --new-file ./automake-1.5/automake-1.5/tests/cond16.test 
/export/src/src/automake/config_dir/automake-1.5/automake-1.5/tests/cond16.test
--- ./automake-1.5/automake-1.5/tests/cond16.test       Wed Aug  8 17:43:59 2001
+++ 
/export/src/src/automake/config_dir/automake-1.5/automake-1.5/tests/cond16.test 
    Tue Feb 26 16:39:50 2002
@@ -43,6 +43,6 @@

 CC='gcc' ./configure

-val=`$MAKE -s echorule`;
+val=`$MAKE -s echorule | tail -1`;
 echo $val
 test "x$val" = "xfoo.c foo.o"
diff -u --recursive --new-file ./automake-1.5/automake-1.5/tests/cond18.test 
/export/src/src/automake/config_dir/automake-1.5/automake-1.5/tests/cond18.test
--- ./automake-1.5/automake-1.5/tests/cond18.test       Wed Aug  8 13:42:26 2001
+++ 
/export/src/src/automake/config_dir/automake-1.5/automake-1.5/tests/cond18.test 
    Tue Feb 26 16:42:40 2002
@@ -50,6 +50,6 @@

 CC='gcc' ./configure

-val=`$MAKE --no-print-directory echorule`;
+val=`$MAKE --no-print-directory echorule | tail -1`;
 echo $val
 test "x$val" = "xdlmain.c foo.c dlmain.o foo.o"
diff -u --recursive --new-file ./automake-1.5/automake-1.5/tests/cond4.test 
/export/src/src/automake/config_dir/automake-1.5/automake-1.5/tests/cond4.test
--- ./automake-1.5/automake-1.5/tests/cond4.test        Wed Aug  8 13:42:26 2001
+++ 
/export/src/src/automake/config_dir/automake-1.5/automake-1.5/tests/cond4.test  
    Tue Feb 26 16:26:40 2002
@@ -41,13 +41,13 @@
 $needs_gnu_make

 CC='gcc' CONDITION1=true CONDITION2=true ./configure || exit 1
-msgtt=`$MAKE --no-print-directory echo-objects`
+msgtt=`$MAKE --no-print-directory echo-objects | tail -1`
 CC='gcc' CONDITION1=true CONDITION2=false ./configure || exit 1
-msgtf=`$MAKE --no-print-directory echo-objects`
+msgtf=`$MAKE --no-print-directory echo-objects | tail -1`
 CC='gcc' CONDITION1=false CONDITION2=true ./configure || exit 1
-msgft=`$MAKE --no-print-directory echo-objects`
+msgft=`$MAKE --no-print-directory echo-objects | tail -1`
 CC='gcc' CONDITION1=false CONDITION2=false ./configure || exit 1
-msgff=`$MAKE --no-print-directory echo-objects`
+msgff=`$MAKE --no-print-directory echo-objects | tail -1`

 echo $msgtt
 echo $msgtf
diff -u --recursive --new-file ./automake-1.5/automake-1.5/tests/substref.test 
/export/src/src/automake/config_dir/automake-1.5/automake-1.5/tests/substref.test
--- ./automake-1.5/automake-1.5/tests/substref.test     Wed Aug  8 17:43:59 2001
+++ 
/export/src/src/automake/config_dir/automake-1.5/automake-1.5/tests/substref.test
   Tue Feb 26 16:47:04 2002
@@ -41,6 +41,6 @@

 CC='gcc' ./configure

-val=`$MAKE -s echorule`;
+val=`$MAKE -s echorule | tail -1`;
 echo $val
 test "x$val" = "xdlmain.c dlmain.o"
diff -u --recursive --new-file ./automake-1.5/automake-1.5/tests/yacc7.test 
/export/src/src/automake/config_dir/automake-1.5/automake-1.5/tests/yacc7.test
--- ./automake-1.5/automake-1.5/tests/yacc7.test        Thu Aug 23 01:24:44 2001
+++ 
/export/src/src/automake/config_dir/automake-1.5/automake-1.5/tests/yacc7.test  
    Tue Feb 26 17:06:00 2002
@@ -37,6 +37,6 @@

 $MAKE foo.h || exit 1

-test -e foo.h || exit 1
+test -f foo.h || exit 1

 exit 0

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



Michael Peek                                                 address@hidden
------------------------------------------------------------------------------
Systems Administrator / C++ Database Programmer      569 Dabney Hall
Department of Ecology and Evolutionary Biology       Knoxville, TN  37996-1610
University of Tennessee at Knoxville
------------------------------------------------------------------------------



reply via email to

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