From 0699a84a6f7a085acb76446caa81ce3133dedaf2 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Thu, 16 Feb 2012 19:08:58 +0100 Subject: [PATCH] depcomp tests: put TAP plan in generated tests This avoids a spurious maintcheck failure, and also simplifies the 'depcomp.sh' helper script a little. * tests/gen-testsuite-part: Create and place also a proper 'plan_' call (to emit the TAP plan) in each generated 'depmod*.tap' test. * tests/depcomp.sh: Remove 'plan_' invocations, and simplify a little since we are at it. --- tests/depcomp.sh | 27 +++++++++++---------------- tests/gen-testsuite-part | 2 ++ 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/tests/depcomp.sh b/tests/depcomp.sh index d14928048..7fa07ab81 100755 --- a/tests/depcomp.sh +++ b/tests/depcomp.sh @@ -286,30 +286,25 @@ test -f build-aux/depcomp \ # selected by '--enable-dependency-tracking', we make this threefold check # 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 + } +fi + case $depmode in auto) - if test $depcomp_with_libtool = no; then - plan_ 28 - do_all_tests () { do_test; } - else - plan_ 84 - do_all_tests () - { - do_test default - do_test noshared --disable-shared - do_test nostatic --disable-static - } - fi displayed_depmode='..*' # At least one character long. cfg_deptrack=--enable-dependency-tracking ;; disabled) - plan_ 28 - do_all_tests () { do_test; } displayed_depmode=none cfg_deptrack=--disable-dependency-tracking ;; *) - plan_ 28 - do_all_tests () { do_test; } displayed_depmode="(cached) $depmode" cfg_deptrack="$cachevar=$depmode" # Sanity check: ensure the cache variable we force is truly diff --git a/tests/gen-testsuite-part b/tests/gen-testsuite-part index 0c334fe66..70132092f 100755 --- a/tests/gen-testsuite-part +++ b/tests/gen-testsuite-part @@ -341,6 +341,7 @@ foreach my $lt (TRUE, FALSE) { foreach my $m (keys %depmodes) { + my $planned = ($lt && $m eq "auto") ? 72 : 28; my @required = ( @{$depmodes{$m}}, @@ -361,6 +362,7 @@ 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' . "\$testsrcdir/depcomp.sh"; exit "\$?" -- 2.34.1