]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
depcomp tests: fix up today's botched commit
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 16 Feb 2012 19:49:43 +0000 (20:49 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 16 Feb 2012 19:50:04 +0000 (20:50 +0100)
Today's commit 'v1.11-1959-g0699a84' has caused the generated
'depcomp*.tap' tests to call the 'plan_' function *before* it is
defined, and has also caused the extra checks required for better
libtool coverage to be run only when libtool is *not* in use,
rather than the other way around.  Fix this mess.

Report by Peter Rosin.

* tests/gen-testsuite-part: Include './defs' in the generated
tests, rather than doing so from 'depcomp.sh'.  Adjust the count
of TAP tests for 'depcomp-lt-auto.test' (it's 84, not 72).
* tests/depcomp.sh: Adjust accordingly, and fix inverted logic
about the decision of when to run extra checks for libtool.

tests/depcomp.sh
tests/gen-testsuite-part

index 7fa07ab81d7e454f5b6b7af593353c442f1ff662..d204058c9f65dec776108eab34deaa5dfdb35b44 100755 (executable)
@@ -67,8 +67,7 @@
 
 # -------------------------------------------------------------------------
 
-am_create_testdir=empty
-. ./defs || Exit 1
+# This expects ./defs has already been included has already been included..
 
 ocwd=`pwd` || fatal_ "cannot get current working directory"
 longpath=this-is/a-path/which-has/quite-a/definitely/truly/long_long_name
@@ -287,14 +286,14 @@ test -f build-aux/depcomp \
 # only in this later case.
 
 if test $depmode,$depcomp_with_libtool = auto,yes; then
-  do_all_tests () { do_test; }
-else
   do_all_tests ()
   {
     do_test default
     do_test noshared --disable-shared
     do_test nostatic --disable-static
   }
+else
+  do_all_tests () { do_test; }
 fi
 
 case $depmode in
index 70132092f3000d03bdc723e504fed3360bb0be20..143cef083dee7b0935fcc3f296e1065503e742f4 100755 (executable)
@@ -341,7 +341,7 @@ foreach my $lt (TRUE, FALSE)
   {
     foreach my $m (keys %depmodes)
       {
-        my $planned = ($lt && $m eq "auto") ? 72 : 28;
+        my $planned = ($lt && $m eq "auto") ? 84 : 28;
         my @required =
           (
             @{$depmodes{$m}},
@@ -349,6 +349,7 @@ foreach my $lt (TRUE, FALSE)
           );
         my @vars_init =
           (
+            "am_create_testdir=empty",
             "depmode=$m",
             "depcomp_with_libtool=" . ($lt ? "yes" : "no"),
           );
@@ -362,9 +363,9 @@ foreach my $lt (TRUE, FALSE)
               #! /bin/sh
               # Automatically generated test.  DO NOT EDIT BY HAND!
               @vars_init
-              plan_ $planned
               required="@required"
-              . ./defs-static || exit '99'
+              . ./defs || Exit 1
+              plan_ $planned
               . "\$testsrcdir/depcomp.sh"; exit "\$?"
 EOF
           },