[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 6/8] Acceptance tests: add the build directory to the syst
From: |
Cleber Rosa |
Subject: |
Re: [PATCH v7 6/8] Acceptance tests: add the build directory to the system PATH |
Date: |
Fri, 15 Nov 2019 18:19:14 -0500 |
User-agent: |
Mutt/1.12.1 (2019-06-15) |
On Fri, Nov 08, 2019 at 02:13:02PM +0100, Philippe Mathieu-Daudé wrote:
> On 11/4/19 4:13 PM, Cleber Rosa wrote:
> > So that when binaries such as qemu-img are searched for, those in the
> > build tree will be favored. As a clarification, SRC_ROOT_DIR is
> > dependent on the location from where tests are executed, so they are
> > equal to the build directory if one is being used.
> >
> > The original motivation is that Avocado libraries such as
> > avocado.utils.vmimage.get() may use the matching binaries, but it may
> > also apply to any other binary that test code may eventually attempt
> > to execute.
> >
> > Signed-off-by: Cleber Rosa <address@hidden>
> > ---
> > tests/acceptance/avocado_qemu/__init__.py | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/tests/acceptance/avocado_qemu/__init__.py
> > b/tests/acceptance/avocado_qemu/__init__.py
> > index 17ce583c87..a4bb796a47 100644
> > --- a/tests/acceptance/avocado_qemu/__init__.py
> > +++ b/tests/acceptance/avocado_qemu/__init__.py
> > @@ -110,6 +110,12 @@ class Test(avocado.Test):
> > return None
> > def setUp(self):
> > + # Some utility code uses binaries from the system's PATH. For
> > + # instance, avocado.utils.vmimage.get() uses qemu-img, to
> > + # create a snapshot image. This is a transparent way of
> > + # making sure those utilities find and use binaries on the
> > + # build tree by default.
> > + os.environ['PATH'] = '%s:%s' % (SRC_ROOT_DIR, os.environ['PATH'])
>
> But qemu-img is compiled in BUILD_ROOT_DIR, isn't it?
>
> Maybe we should pass its path by argument, such --qemu-img /path/to/it.
>
Hi Philippe,
On the next version we should see a properly named variable for the
build directory, and (as explained in the previous response) also
a more explicit setting of the qemu-img binary used (although not
a parameter or command line argument at this point).
Looking forward for your opinion on the next version, and thanks
again!
- Cleber.
> > self._vms = {}
> > self.arch = self.params.get('arch',
> >
[PATCH v7 7/8] Acceptance tests: depend on qemu-img, Cleber Rosa, 2019/11/04
[PATCH v7 8/8] Acceptance test: add "boot_linux" tests, Cleber Rosa, 2019/11/04
Re: [PATCH v7 0/8] Acceptance test: Add "boot_linux" acceptance test, no-reply, 2019/11/04
Re: [PATCH v7 0/8] Acceptance test: Add "boot_linux" acceptance test, Wainer dos Santos Moschetta, 2019/11/07