qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: "Fam Zheng" <famz@redhat.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [PULL 06/17] docker: move make check into check_qemu helper
Date: Fri, 19 Jun 2020 11:32:46 +0100	[thread overview]
Message-ID: <CAFEAcA8BzEiBVyy7CDbsJdG4FCy_GErW_ZuXQt++__vZ149=jw@mail.gmail.com> (raw)
In-Reply-To: <20180724105109.8392-7-alex.bennee@linaro.org>

On Tue, 24 Jul 2018 at 11:51, Alex Bennée <alex.bennee@linaro.org> wrote:
>
> Not all docker images can run the check step. Let's move everything
> into a common helper so we don't need to replicate checks in the
> future.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
> diff --git a/tests/docker/common.rc b/tests/docker/common.rc
> index ba1f942328..4ff5974016 100755
> --- a/tests/docker/common.rc
> +++ b/tests/docker/common.rc
> @@ -40,6 +40,17 @@ build_qemu()
>      make $MAKEFLAGS
>  }
>
> +check_qemu()
> +{
> +    # default to make check unless the caller specifies
> +    if test -z "$@"; then
> +        INVOCATION="check"
> +    else
> +        INVOCATION="$@"
> +    fi

Philippe pointed out on IRC that a recent change has resulted
in the shell now pointing out an error in the above code
(with "common.rc: line 50: test: check: binary operator expected").

test -z wants a single string argument, so passing it "$@" is wrong
(that will expand to multiple arguments if the function was
called with multiple arguments).

Probably what is wanted is
  if [ $# == 0 ]; then

ie test whether the function was passed no arguments, rather
than looking specifically for whether all its arguments
squashed together end up being the empty string. (If you
really want the latter that's "$*".)

> +    make $MAKEFLAGS $INVOCATION
> +}

thanks
-- PMM


  reply	other threads:[~2020-06-19 10:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24 10:50 [Qemu-devel] [PULL for 3.0 00/17] docker fixes and tcg test tweak Alex Bennée
2018-07-24 10:50 ` [Qemu-devel] [PULL 01/17] tests/.gitignore: don't ignore docker tests Alex Bennée
2018-07-24 10:50 ` [Qemu-devel] [PULL 02/17] docker: base debian-tricore on qemu:debian9 Alex Bennée
2018-07-24 10:50 ` [Qemu-devel] [PULL 03/17] docker: par down QEMU_CONFIGURE_OPTS in debian-tricore-cross Alex Bennée
2018-07-24 10:50 ` [Qemu-devel] [PULL 04/17] docker: fail more gracefully on docker.py check Alex Bennée
2018-07-24 10:50 ` [Qemu-devel] [PULL 05/17] docker: split configure_qemu from build_qemu Alex Bennée
2018-07-24 10:50 ` [Qemu-devel] [PULL 06/17] docker: move make check into check_qemu helper Alex Bennée
2020-06-19 10:32   ` Peter Maydell [this message]
2018-07-24 10:50 ` [Qemu-devel] [PULL 07/17] docker: gracefully skip check_qemu Alex Bennée
2018-07-24 10:51 ` [Qemu-devel] [PULL 08/17] docker: Makefile.include don't include partial images Alex Bennée
2018-07-24 10:51 ` [Qemu-devel] [PULL 09/17] docker: add test-unit runner Alex Bennée
2018-07-24 10:51 ` [Qemu-devel] [PULL 10/17] docker: add expansion for docker-test-FOO to Makefile.include Alex Bennée
2018-07-24 10:51 ` [Qemu-devel] [PULL 11/17] docker: drop QEMU_TARGET check, fallback in EXECUTABLE not set Alex Bennée
2018-07-24 10:51 ` [Qemu-devel] [PULL 12/17] docker: report hint when docker.py check fails Alex Bennée
2018-07-24 10:51 ` [Qemu-devel] [PULL 13/17] docker: Update debootstrap script after Debian migration from Alioth to Salsa Alex Bennée
2018-07-24 10:51 ` [Qemu-devel] [PULL 14/17] docker: add commentary to debian-bootstrap.docker Alex Bennée
2018-07-24 10:51 ` [Qemu-devel] [PULL 15/17] docker: ignore distro versioning of debootstrap Alex Bennée
2018-07-24 10:51 ` [Qemu-devel] [PULL 16/17] docker: perform basic binfmt_misc validation in docker.py Alex Bennée
2018-07-24 10:51 ` [Qemu-devel] [PULL 17/17] tests/tcg: remove runcom test Alex Bennée
2018-07-24 14:17 ` [Qemu-devel] [PULL for 3.0 00/17] docker fixes and tcg test tweak Peter Maydell

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

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

  git send-email \
    --in-reply-to='CAFEAcA8BzEiBVyy7CDbsJdG4FCy_GErW_ZuXQt++__vZ149=jw@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=f4bug@amsat.org \
    --cc=famz@redhat.com \
    --cc=qemu-devel@nongnu.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.
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 NNTP newsgroup(s).