All of lore.kernel.org
 help / color / mirror / Atom feed
From: Etienne Carriere <etienne.carriere@linaro.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 7/8] testing: test can use the locally generated qemu host tool
Date: Tue, 19 Mar 2019 08:05:01 +0100	[thread overview]
Message-ID: <CAN5uoS9ZKu4ZS+1qz-Ow4PcNph+LUYJ_gVCBxOo2OEMojUeeMQ@mail.gmail.com> (raw)
In-Reply-To: <1552951269-16967-7-git-send-email-etienne.carriere@linaro.org>

Dear all,

I made this to allow test_optee to use the qemu config from the platform.
But I wonder if it would be more suitable to have an generic option to
script run-tests to build the emulator within the test config.

Your thoughts?

Best regards,
etienne

On Tue, 19 Mar 2019 at 00:21, Etienne Carriere
<etienne.carriere@linaro.org> wrote:
>
> This change adds argument local to emulator boot method. When local is
> True, emulator.py runs the qemu host tool locally generated by the
> test. Otherwise the test uses the qemu host as found from PATH.
>
> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
> ---
> Changes v1 -> v2:
>  - No commit not in v1 series.
>
> ---
>  support/testing/infra/emulator.py | 16 ++++++++++++++--
>  1 file changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/support/testing/infra/emulator.py b/support/testing/infra/emulator.py
> index 802e89d..5fbf213 100644
> --- a/support/testing/infra/emulator.py
> +++ b/support/testing/infra/emulator.py
> @@ -1,5 +1,7 @@
>  import pexpect
>
> +import os
> +
>  import infra
>
>
> @@ -8,6 +10,7 @@ class Emulator(object):
>      def __init__(self, builddir, downloaddir, logtofile, timeout_multiplier):
>          self.qemu = None
>          self.downloaddir = downloaddir
> +        self.builddir = builddir
>          self.logfile = infra.open_log_file(builddir, "run", logtofile)
>          # We use elastic runners on the cloud to runs our tests. Those runners
>          # can take a long time to run the emulator. Use a timeout multiplier
> @@ -30,13 +33,22 @@ class Emulator(object):
>      #
>      # options: array of command line options to pass to Qemu
>      #
> -    def boot(self, arch, kernel=None, kernel_cmdline=None, options=None):
> +    # local: if True, the locally built qemu host tool is used instead of a
> +    # qemu host tool found from the PATH.
> +    #
> +    def boot(self, arch, kernel=None, kernel_cmdline=None, options=None,
> +             local=None):
>          if arch in ["armv7", "armv5"]:
>              qemu_arch = "arm"
>          else:
>              qemu_arch = arch
>
> -        qemu_cmd = ["qemu-system-{}".format(qemu_arch),
> +        if local:
> +            basedir = os.path.join(self.builddir, "host/bin/")
> +        else:
> +            basedir = ""
> +
> +        qemu_cmd = [basedir + "qemu-system-{}".format(qemu_arch),
>                      "-serial", "stdio",
>                      "-display", "none"]
>
> --
> 1.9.1
>

  reply	other threads:[~2019-03-19  7:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-18 23:21 [Buildroot] [PATCH v2 1/8] boot/arm-trusted-firmware: support 32bit Arm targets Etienne Carriere
2019-03-18 23:21 ` [Buildroot] [PATCH v2 2/8] boot/arm-trusted-firmware: in-tree and OP-TEE BL32 Etienne Carriere
2019-03-20 21:54   ` Thomas Petazzoni
2019-03-18 23:21 ` [Buildroot] [PATCH v2 3/8] boot/arm-trusted-firmware: support debug mode Etienne Carriere
2019-03-20 21:59   ` Thomas Petazzoni
2019-03-18 23:21 ` [Buildroot] [PATCH v2 4/8] boot/arm-trusted-firmware: support alternate image files Etienne Carriere
2019-03-20 22:03   ` Thomas Petazzoni
2019-03-21  8:06     ` Etienne Carriere
2019-03-18 23:21 ` [Buildroot] [PATCH v2 5/8] package/optee-test: fix dependency in TAs build Etienne Carriere
2019-03-20 22:03   ` Thomas Petazzoni
2019-03-18 23:21 ` [Buildroot] [PATCH v2 6/8] configs/qemu_armv7a_tz_virt: Armv7-A emulation with TrustZone services Etienne Carriere
2019-03-19 22:00   ` Arnout Vandecappelle
2019-03-20  8:49     ` Etienne Carriere
2019-03-20  9:20       ` Arnout Vandecappelle
2019-03-20 12:06         ` Etienne Carriere
2019-03-18 23:21 ` [Buildroot] [PATCH v2 7/8] testing: test can use the locally generated qemu host tool Etienne Carriere
2019-03-19  7:05   ` Etienne Carriere [this message]
2019-03-19 22:03     ` Arnout Vandecappelle
2019-03-22 10:06       ` Etienne Carriere
2019-03-18 23:21 ` [Buildroot] [PATCH v2 8/8] support/testing: test_optee.py: test optee boot and testsuite Etienne Carriere
2019-03-20 21:34 ` [Buildroot] [PATCH v2 1/8] boot/arm-trusted-firmware: support 32bit Arm targets Thomas Petazzoni

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=CAN5uoS9ZKu4ZS+1qz-Ow4PcNph+LUYJ_gVCBxOo2OEMojUeeMQ@mail.gmail.com \
    --to=etienne.carriere@linaro.org \
    --cc=buildroot@busybox.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.