From: "Alex Bennée" <alex.bennee@linaro.org>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: cota@braap.org, famz@redhat.com, berrange@redhat.com,
richard.henderson@linaro.org, balrogg@gmail.com,
aurelien@aurel32.net, agraf@suse.de, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 for 3.0 07/16] docker: gracefully skip check_qemu
Date: Tue, 17 Jul 2018 11:22:15 +0100 [thread overview]
Message-ID: <87601e5fhk.fsf@linaro.org> (raw)
In-Reply-To: <63c0e5cd-fac0-789c-d7fd-f77ed8d9d047@amsat.org>
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
> On 07/13/2018 09:17 AM, Alex Bennée wrote:
>> Not all our images are able to run the tests. Rather than use features
>> we can just check for the existence and run-ability of gtester. If the
>> image has been setup for binfmt_misc it will be able to run anyway.
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>> tests/docker/common.rc | 8 +++++++-
>> 1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/docker/common.rc b/tests/docker/common.rc
>> index cfc620d554..6df431eb72 100755
>> --- a/tests/docker/common.rc
>> +++ b/tests/docker/common.rc
>> @@ -47,7 +47,13 @@ check_qemu()
>> else
>> TEST="$@"
>> fi
>> - make $MAKEFLAGS $TEST
>> +
>> + if type gtester > /dev/null 2>&1 && \
>
> commit e465ce7d09939d631f1861e0bd8873417c1c0d65
>
> tests: Use "command -v" instead of which(1) in shell scripts
type is also a shell built-in albeit an 1982 bashism. I'll switch to
command -v as tending towards POSIX is what we should aim for (although
our test-FOO/common.rc structure seems a little confused).
>
> When which(1) is not installed, we would complain "perl not found"
> because it's the first set_prog_path check. The error message is
> wrong.
>
> Fix it by using "command -v", a native way to query the existence
> of a command.
>
>> + gtester --version > /dev/null 2>&1; then
>> + make $MAKEFLAGS $TEST
>> + else
>> + echo "No working gtester, skipping make $TEST"
>> + fi
>> }
>>
>> test_fail()
>>
--
Alex Bennée
next prev parent reply other threads:[~2018-07-17 10:22 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-13 12:17 [Qemu-devel] [PATCH v2 for 3.0 00/16] various docker fixes Alex Bennée
2018-07-13 12:17 ` [Qemu-devel] [PATCH v2 for 3.0 01/16] tests/.gitignore: don't ignore docker tests Alex Bennée
2018-07-13 12:17 ` [Qemu-devel] [PATCH v2 for 3.0 02/16] docker: base debian-tricore on qemu:debian9 Alex Bennée
2018-07-17 14:49 ` Philippe Mathieu-Daudé
2018-07-13 12:17 ` [Qemu-devel] [PATCH v2 for 3.0 03/16] shippable: Build the TriCore docker image Alex Bennée
2018-07-13 13:27 ` Alex Bennée
2018-07-17 2:55 ` Philippe Mathieu-Daudé
2018-07-13 12:17 ` [Qemu-devel] [PATCH v2 for 3.0 04/16] docker: fail more gracefully on docker.py check Alex Bennée
2018-07-13 12:17 ` [Qemu-devel] [PATCH v2 for 3.0 05/16] docker: split configure_qemu from build_qemu Alex Bennée
2018-07-17 2:50 ` Philippe Mathieu-Daudé
2018-07-13 12:17 ` [Qemu-devel] [PATCH v2 for 3.0 06/16] docker: move make check into check_qemu helper Alex Bennée
2018-07-17 3:00 ` Philippe Mathieu-Daudé
2018-07-17 9:59 ` Alex Bennée
2018-07-17 14:56 ` Philippe Mathieu-Daudé
2018-07-13 12:17 ` [Qemu-devel] [PATCH v2 for 3.0 07/16] docker: gracefully skip check_qemu Alex Bennée
2018-07-17 3:02 ` Philippe Mathieu-Daudé
2018-07-17 10:22 ` Alex Bennée [this message]
2018-07-17 15:05 ` Philippe Mathieu-Daudé
2018-07-13 12:17 ` [Qemu-devel] [PATCH v2 for 3.0 08/16] docker: Makefile.include don't include partial images Alex Bennée
2018-07-17 3:07 ` Philippe Mathieu-Daudé
2018-07-13 12:17 ` [Qemu-devel] [PATCH v2 for 3.0 09/16] docker: disable debian-powerpc-user-cross Alex Bennée
2018-07-17 15:52 ` Philippe Mathieu-Daudé
2018-07-13 12:17 ` [Qemu-devel] [PATCH v2 for 3.0 10/16] docker: add test-unit runner Alex Bennée
2018-07-17 3:37 ` Philippe Mathieu-Daudé
2018-07-13 12:17 ` [Qemu-devel] [PATCH v2 for 3.0 11/16] docker: add expansion for docker-test-FOO to Makefile.include Alex Bennée
2018-07-16 1:42 ` Philippe Mathieu-Daudé
2018-07-16 9:07 ` Alex Bennée
2018-07-17 15:03 ` Philippe Mathieu-Daudé
2018-07-13 12:17 ` [Qemu-devel] [PATCH v2 for 3.0 12/16] docker: drop QEMU_TARGET check, fallback in EXECUTABLE not set Alex Bennée
2018-07-17 15:51 ` Philippe Mathieu-Daudé
2018-07-13 12:17 ` [Qemu-devel] [PATCH v2 for 3.0 13/16] docker: add --hint to docker.py check Alex Bennée
2018-07-17 3:24 ` Philippe Mathieu-Daudé
2018-07-17 15:14 ` Philippe Mathieu-Daudé
2018-07-13 12:17 ` [Qemu-devel] [PATCH v2 for 3.0 14/16] docker: Update debootstrap script after Debian migration from Alioth to Salsa Alex Bennée
2018-07-13 12:17 ` [Qemu-devel] [PATCH v2 for 3.0 15/16] docker: add commentary to debian-bootstrap.docker Alex Bennée
2018-07-17 15:02 ` Philippe Mathieu-Daudé
2018-07-13 12:17 ` [Qemu-devel] [PATCH v2 for 3.0 16/16] docker: ignore distro versioning of debootstrap Alex Bennée
2018-07-17 15:52 ` Philippe Mathieu-Daudé
2018-07-17 16:02 ` [Qemu-devel] [PATCH v2 for 3.0 00/16] various docker fixes Philippe Mathieu-Daudé
2018-07-17 18:53 ` Alex Bennée
2018-07-17 20:28 ` Philippe Mathieu-Daudé
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=87601e5fhk.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=agraf@suse.de \
--cc=aurelien@aurel32.net \
--cc=balrogg@gmail.com \
--cc=berrange@redhat.com \
--cc=cota@braap.org \
--cc=f4bug@amsat.org \
--cc=famz@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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).