Hi Lava users,


I am using the sample you sent me last week to run tradefed: https://gist.github.com/mwasilew/e6e80a351d43388b1c3342098012ec


Until we have a real device to run on Tradefed we decided to use it with qemu, so the question is:


  1. How do we deploy android on qemu via Lava?
  2. How to boot android via lava?


Do you have any sample job for the above questions?


george


From: George Nistor
Sent: Thursday, August 8, 2019 2:19:05 PM
To: Vladut Magas <vladut.m@l4b-software.com>; Inon Sharony <inon.s@l4b-software.com>; Yair Podemasky <yair.p@l4b-software.com>
Cc: Andreas Schlüter <andreas.s@l4b-software.com>; Ilya Fedusiv <ilya.f@l4b-software.com>
Subject: FW: [Lava-users] running commands locally from a Lava job
 
Here is the answer I have just received from Linaro via their mail-list.

They say it is not a good idea to build tradefed with lava, but it can be used in the scenario to run TF from an LXC container - they have said.
Tradefed should be built from outside Lava.

george

-----Original Message-----
From: Milosz Wasilewski <milosz.wasilewski@linaro.org>
Sent: Thursday, August 8, 2019 2:07 PM
To: George Nistor <george.n@l4b-software.com>
Cc: lava-users@lists.lavasoftware.org
Subject: Re: [Lava-users] running commands locally from a Lava job

On Thu, 8 Aug 2019 at 11:50, George Nistor <george.n@l4b-software.com> wrote:
>
> Thanks for the answers,
>
> 1. What do you mean by  "with LXC container acting as a host side ". It is an LXC container on the machine where Lava runs and inside this containes runs Tradefed?

yes, exactly. Here is an example job definition:
https://gist.github.com/mwasilew/e6e80a351d43388b1c3342098012ec5c

I can't share the actual job and logs as there are passwords included.

milosz

> 2. Where can I find an example of these Jobs? Could you help me with an link, or sample jobs?
>
> george
>
> -----Original Message-----
> From: Milosz Wasilewski <milosz.wasilewski@linaro.org>
> Sent: Thursday, August 8, 2019 1:29 PM
> To: George Nistor <george.n@l4b-software.com>
> Cc: lava-users@lists.lavasoftware.org
> Subject: Re: [Lava-users] running commands locally from a Lava job
>
> I would say it's a bad idea. LAVA is not meant for building stuff. It can do that but you will need to hack around quite a lot. Secondly IIUC you need to have dependency between build and run steps. If you want to implement this using LAVA this implies multi-node job. There is no other way LAVA will manage dependencies and timings between executions. So this is getting pretty complicated already.
>
> LAVA is already running tradefed jobs (CTS and VTS) using real hardware and it's a pretty common use case. There are 2 implementations of this. One is using single node job with LXC container acting as a host side. Other is using multinode and can shard tests between multiple devices. However tradefed packages are built outside of lava and downloaded before job starts.
>
> To sum up, I think what you're trying to do is not best suited for LAVA. However it might be possible given some effort spent on experimenting.
>
> milosz
>
> On Thu, 8 Aug 2019 at 11:20, George Nistor <george.n@l4b-software.com> wrote:
> >
> > Yes
> > For one job to build tradefederation from inside a docker container.
> > For the second job to run Google TradeFederation from the docker container.
> >
> > Would be that possible with Lava?
> >
> > george
> >
> > -----Original Message-----
> > From: Milosz Wasilewski <milosz.wasilewski@linaro.org>
> > Sent: Thursday, August 8, 2019 1:16 PM
> > To: George Nistor <george.n@l4b-software.com>
> > Cc: lava-users@lists.lavasoftware.org
> > Subject: Re: [Lava-users] running commands locally from a Lava job
> >
> > George,
> >
> > Do I understand correctly you would like to use LAVA as a building tool?
> >
> > milosz
> >
> > On Thu, 8 Aug 2019 at 10:47, George Nistor <george.n@l4b-software.com> wrote:
> > >
> > > Hi Lava users,
> > >
> > >
> > >
> > > Is it possible to run commands inside a lava job test-section, locally,  from a Lava Job?
> > >
> > > Ex:
> > >
> > > cd /media/sh_shared_folders
> > >
> > > docker build -t tradefed .
> > >
> > >
> > >
> > > We have the following setup:
> > >
> > > A machine with Linux Ubuntu;
> > > an Oracle Virtual Box  VM on the machine with a Xubuntu distro
> > > image inside the VM we have created 3 Docker containers:
> > >
> > > one with the Jenkins
> > > second one with Lava
> > > third is created for the purpose of running Google TradeFederation
> > > against the Android device
> > >
> > >
> > >
> > > (The AOSP source tree is available to the VM via shared_folders
> > > and the docker container has also access to it. (via docker run -v
> > > dir_host:dir_container) )
> > >
> > >
> > >
> > > What we what to achieve is to have 2 jobs in Lava :
> > >
> > > one for building the Docker image for the purpose of building
> > > TradeFederation inside
> > >
> > >                                                                                                                                 Ex. Running these commande locally:
> > >
> > >                                                      source
> > > ./build/make/envsetup.sh
> > >
> > >                                                      lunch
> > > <device-target>
> > >
> > >                                                       make
> > > tradefed-all -j8
> > >
> > >
> > >
> > > second using the above image, instantiate, create a container
> > > which should run TradeFederation against the android device
> > > connected to the machine
> > >
> > >
> > >
> > > What I need is to be able to run commands locally inside the VM (on Xubuntu distro) from a Lava job.  For these we have to somehow not send the command to qemu but run them locally.
> > >
> > > Is this possible? If yes, how can we achieve this?
> > >
> > >
> > >
> > > George Nistor
> > >
> > > _______________________________________________
> > > Lava-users mailing list
> > > Lava-users@lists.lavasoftware.org
> > > https://lists.lavasoftware.org/mailman/listinfo/lava-users
> _______________________________________________
> Lava-users mailing list
> Lava-users@lists.lavasoftware.org
> https://lists.lavasoftware.org/mailman/listinfo/lava-users