unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Eric Bavier <bavier@posteo.net>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 43616-done@debbugs.gnu.org
Subject: bug#43616: [PATCH] tests: Simplify shell exit status negation;
Date: Mon, 28 Sep 2020 21:23:26 -0500	[thread overview]
Message-ID: <525ad162f05ce43bda03a723f0faaf9385e93e77.camel@posteo.net> (raw)
In-Reply-To: <87sgb4fdj3.fsf@gnu.org>

On Sat, 2020-09-26 at 23:12 +0200, Ludovic Courtès wrote:
> Hi Eric,
> 
> bavier@posteo.net skribis:
> 
> > From: Eric Bavier <bavier@member.fsf.org>
> > 
> > * tests/guix-archive.sh, tests/guix-build-branch.sh, tests/guix-
> > build.sh,
> > tests/guix-daemon.sh, tests/guix-download.sh, tests/guix-
> > environment.sh,
> > tests/guix-gc.sh, tests/guix-git-authenticate.sh, tests/guix-
> > graph.sh,
> > tests/guix-hash.sh, tests/guix-lint.sh, tests/guix-pack-
> > relocatable.sh,
> > tests/guix-pack.sh, tests/guix-package-aliases.sh, tests/guix-
> > package-net.sh,
> > tests/guix-package.sh: Use the shell '!' keyword to negate command
> > exit status
> > in place of 'if ...; then false; else true; fi'
> 
> [...]
> 
> > -if guix archive something-that-does-not-exist
> > -then false; else true; fi
> > +! guix archive something-that-does-not-exist
> 
> I have a vague recollection that I came to the conclusion that the
> ‘if’
> was needed, but now I don’t see why.
> 
> If you’re confident please go ahead!  It’s never too late for me to
> improve my shell knowledge.  :-)

I've used the same in other project test suites for a while now, and
have successfully run Guix's tests with this patch several times.

Pushed in d8934360d2453a403b5433e71d09188e4ed23b57

Thanks for the review,
`~Eric






      reply	other threads:[~2020-09-29  2:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-25 18:00 [bug#43616] [PATCH] tests: Simplify shell exit status negation; bavier
2020-09-26 21:12 ` Ludovic Courtès
2020-09-29  2:23   ` Eric Bavier [this message]

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: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=525ad162f05ce43bda03a723f0faaf9385e93e77.camel@posteo.net \
    --to=bavier@posteo.net \
    --cc=43616-done@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /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://git.savannah.gnu.org/cgit/guix.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).