Thread (47 messages) 47 messages, 4 authors, 2021-12-11

Re: [PATCH 13/19] tests: apply modern idiom for signaling test failure

From: Eric Sunshine <hidden>
Date: 2021-12-11 07:47:20

On Fri, Dec 10, 2021 at 4:32 AM Jeff King [off-list ref] wrote:
On Thu, Dec 09, 2021 at 12:11:09AM -0500, Eric Sunshine wrote:
quoted
      if test -s difference
      then
              cat difference
-             (exit 1)
+             false
      else
              echo happy
      fi
...I'd have said the idiom here is just:

  git diff-tree -r test-rebase test-merge >difference &&
  test -s difference

The extra "cat" and "happy" are verbose output that we usually skip in
favor of letting "-x" logging do the talking (and leaving the failed
state so you can "cat difference" yourself).

That said, I'm OK with this minimal change in the name of keeping creep
out of the series.
Indeed, there's plenty of odd cruft like this in old test scripts
which could eventually use good cleanups such as the one you suggest
here. But I'm also OK with (indeed prefer) this minimal change for the
present in order to reduce likelihood of reviewer fatigue in this
already lengthy patch series.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help