From: Ævar Arnfjörð Bjarmason Date: Tue, 09 Mar 2021 16:02:13 GMT Subject: [PATCH 1/7] test-lib: remove test_external Message-ID: <20210309160219.13779-2-avarab@gmail.com> In-Reply-To: <87r1kzj7xi.fsf@evledraar.gmail.com> Remove the test_external function(s) in favor of running the Perl tests with a test_expect_success. The only advantage of this wrapper added in fb32c410087 (t/test-lib.sh: add test_external and test_external_without_stderr, 2008-06-19) was that we got the Test::More output as-is from the two wrapped scripts. Now we'll instead hang until the script is finished, and report on its exit code. The Test::More framework ensures that we exit with non-zero exit code on failure. My motivation for this is to eliminate a special case where things that aren't test-lib.sh are going to produce TAP, for reasons that'll be clear in subsequent commits. This also eliminates special cases I added in d998bd4ab67 (test-lib: Make the test_external_* functions TAP-aware, 2010-06-24) from test-lib.sh itself. Signed-off-by: Ævar Arnfjörð Bjarmason --- .../netrc/t-git-credential-netrc.sh | 7 +- t/README | 26 ------ t/t0202-gettext-perl.sh | 10 +-- t/t9700-perl-git.sh | 10 +-- t/test-lib-functions.sh | 89 +------------------ t/test-lib.sh | 42 ++++----- 6 files changed, 28 insertions(+), 156 deletions(-) diff --git a/contrib/credential/netrc/t-git-credential-netrc.sh b/contrib/credential/netrc/t-git-credential-netrc.sh index 07227d02287..28118a9e194 100755 --- a/contrib/credential/netrc/t-git-credential-netrc.sh +++ b/contrib/credential/netrc/t-git-credential-netrc.sh @@ -20,13 +20,10 @@ 'set up test repository' \ 'git config --add gpg.program test.git-config-gpg' - # The external test will outputs its own plan - test_external_has_tap=1 - export PERL5LIB="$GITPERLLIB" - test_external \ - 'git-credential-netrc' \ + test_expect_success 'git-credential-netrc' ' perl "$GIT_BUILD_DIR"/contrib/credential/netrc/test.pl + ' test_done ) diff --git a/t/README b/t/README index 593d4a4e270..2cc8cbc7185 100644 --- a/t/README +++ b/t/README @@ -844,32 +844,6 @@ library for your script to use. test_done fi - - test_external []