git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Joachim Schmitz" <jojo@schmitz-digital.de>
To: "'Johannes Sixt'" <j.sixt@viscovery.net>
Cc: <git@vger.kernel.org>
Subject: RE: make test
Date: Mon, 15 Oct 2012 13:00:14 +0200	[thread overview]
Message-ID: <003101cdaac4$430b7a30$c9226e90$@schmitz-digital.de> (raw)
In-Reply-To: <507BEB12.9040101@viscovery.net>

> From: Johannes Sixt [mailto:j.sixt@viscovery.net]
> Sent: Monday, October 15, 2012 12:53 PM
> To: Joachim Schmitz
> Cc: git@vger.kernel.org
> Subject: Re: make test
> 
> Am 10/15/2012 12:36, schrieb Joachim Schmitz:
> > not ok 4 - pretend we have a known breakage # TODO known breakage
> >
> >    This is expected, right?
> 
> Right.
> 
> >    the next is not though? Why might it be failing, where to check?
> >
> > not ok - 12 tests clean up even on failures
> > #
> > #               mkdir failing-cleanup &&
> > #...
> > #               test_cmp expect out
> > #               )
> > #
> 
> First thing:
> 
>   ./t0000-basic.sh -v -i

OK, I should have mentioned that I did look with -v :
not ok - 12 tests clean up even on failures
#
#               mkdir failing-cleanup &&
#               (
#               cd failing-cleanup &&
#
#               cat >failing-cleanup.sh <<-EOF &&
#               #!/bin/sh
#
#               test_description='Failing tests with cleanup commands'
#
#               # Point to the t/test-lib.sh, which isn't in ../ as usual
#               TEST_DIRECTORY="/home/jojo/git/git/t"
#               . "$TEST_DIRECTORY"/test-lib.sh
#
#               test_expect_success 'tests clean up even after a failure' '
#                       touch clean-after-failure &&
#                       test_when_finished rm clean-after-failure &&
#                       (exit 1)
#               '
#               test_expect_success 'failure to clean up causes the test to fail' '
#                       test_when_finished "(exit 2)"
#               '
#               test_done
#
#               EOF
#
#               chmod +x failing-cleanup.sh &&
#               test_must_fail ./failing-cleanup.sh >out 2>err &&
#               ! test -s err &&
#               ! test -f "trash directory.failing-cleanup/clean-after-failure" &&
#               sed -e 's/Z$//' -e 's/^> //' >expect <<-\EOF &&
#               > not ok - 1 tests clean up even after a failure
#               > #     Z
#               > #     touch clean-after-failure &&
#               > #     test_when_finished rm clean-after-failure &&
#               > #     (exit 1)
#               > #     Z
#               > not ok - 2 failure to clean up causes the test to fail
#               > #     Z
#               > #     test_when_finished "(exit 2)"
#               > #     Z
#               > # failed 2 among 2 test(s)
#               > 1..2
#               EOF
#               test_cmp expect out
#               )
#

> and if that does not give sufficient clues,
> 
>   $SHELL_PATH -x ./t0000-basic.sh -v -i

not ok - 12 tests clean up even on failures
#
#               mkdir failing-cleanup &&
#               (
#               cd failing-cleanup &&
#
#               cat >failing-cleanup.sh <<-EOF &&
#               #!/bin/sh
#
#               test_description='Failing tests with cleanup commands'
#
#               # Point to the t/test-lib.sh, which isn't in ../ as usual
#               TEST_DIRECTORY="/home/jojo/git/git/t"
#               . "$TEST_DIRECTORY"/test-lib.sh
#
#               test_expect_success 'tests clean up even after a failure' '
#                       touch clean-after-failure &&
#                       test_when_finished rm clean-after-failure &&
#                       (exit 1)
#               '
#               test_expect_success 'failure to clean up causes the test to fail' '
#                       test_when_finished "(exit 2)"
#               '
#               test_done
#
#               EOF
#
#               chmod +x failing-cleanup.sh &&
#               test_must_fail ./failing-cleanup.sh >out 2>err &&
#               ! test -s err &&
#               ! test -f "trash directory.failing-cleanup/clean-after-failure" &&
#               sed -e 's/Z$//' -e 's/^> //' >expect <<-\EOF &&
#               > not ok - 1 tests clean up even after a failure
#               > #     Z
#               > #     touch clean-after-failure &&
#               > #     test_when_finished rm clean-after-failure &&
#               > #     (exit 1)
#               > #     Z
#               > not ok - 2 failure to clean up causes the test to fail
#               > #     Z
#               > #     test_when_finished "(exit 2)"
#               > #     Z
#               > # failed 2 among 2 test(s)
#               > 1..2
#               EOF
#               test_cmp expect out
#               )
#
+ die

Looks identical, except for the "die" at the end. And still leaves me without a clue...

> (Beware, though: in some cases, the latter gives additional failures, in
> particular, when the stderr of a command is checked for with test_cmp
> instead of grep because the 'actual' results contain the shell command
> logs, which are not in the 'expected' results.)
> 
> -- Hannes,

Bye, Jojo

  reply	other threads:[~2012-10-15 11:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-15 10:36 make test Joachim Schmitz
2012-10-15 10:53 ` Johannes Sixt
2012-10-15 11:00   ` Joachim Schmitz [this message]
2012-10-15 11:18     ` Johannes Sixt
2012-10-15 11:37       ` Joachim Schmitz
2012-10-15 11:52         ` Johannes Sixt
2012-10-15 11:58           ` Joachim Schmitz
2012-10-15 12:09             ` Johannes Sixt
2012-10-15 12:34               ` Andreas Schwab
2012-10-15 13:18                 ` Joachim Schmitz
2012-10-17  8:30                 ` Joachim Schmitz
2012-10-15 13:18               ` Joachim Schmitz
  -- strict thread matches above, loose matches on Subject: below --
2012-10-22 14:19 Joachim Schmitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='003101cdaac4$430b7a30$c9226e90$@schmitz-digital.de' \
    --to=jojo@schmitz-digital.de \
    --cc=git@vger.kernel.org \
    --cc=j.sixt@viscovery.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).