diff mbox series

[RFC,2/3] tests/vm: add --build-target option

Message ID 20190121171543.32422-3-alex.bennee@linaro.org
State New
Headers show
Series vmbuild tweaks for BSD targets | expand

Commit Message

Alex Bennée Jan. 21, 2019, 5:15 p.m. UTC
This allows us to invoke the build with a custom target (for the VMs
that use the {target} format string specifier). Currently OpenBSD is
still hardwired due to problems running check

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
 tests/vm/basevm.py | 3 +++
 tests/vm/freebsd   | 2 +-
 tests/vm/netbsd    | 3 +--
 3 files changed, 5 insertions(+), 3 deletions(-)

-- 
2.17.1

Comments

Philippe Mathieu-Daudé Jan. 21, 2019, 10:54 p.m. UTC | #1
On 1/21/19 6:15 PM, Alex Bennée wrote:
> This allows us to invoke the build with a custom target (for the VMs

> that use the {target} format string specifier). Currently OpenBSD is

> still hardwired due to problems running check

> 

> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

> ---

>  tests/vm/basevm.py | 3 +++

>  tests/vm/freebsd   | 2 +-

>  tests/vm/netbsd    | 3 +--

>  3 files changed, 5 insertions(+), 3 deletions(-)

> 

> diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py

> index 5caf77d6b8..bdca6cb2fc 100755

> --- a/tests/vm/basevm.py

> +++ b/tests/vm/basevm.py

> @@ -228,6 +228,8 @@ def parse_args(vmcls):

>                        help="build image")

>      parser.add_option("--build-qemu",

>                        help="build QEMU from source in guest")

> +    parser.add_option("--build-target",

> +                      help="QEMU build target", default="check")

>      parser.add_option("--interactive", "-I", action="store_true",

>                        help="Interactively run command")

>      parser.add_option("--snapshot", "-s", action="store_true",

> @@ -255,6 +257,7 @@ def main(vmcls):

>              cmd = [vm.BUILD_SCRIPT.format(

>                     configure_opts = " ".join(argv),

>                     jobs=args.jobs,

> +                   target=args.build_target,

>                     verbose = "V=1" if args.verbose else "")]

>          else:

>              cmd = argv

> diff --git a/tests/vm/freebsd b/tests/vm/freebsd

> index a85c866c30..1d64c31b7c 100755

> --- a/tests/vm/freebsd

> +++ b/tests/vm/freebsd

> @@ -25,7 +25,7 @@ class FreeBSDVM(basevm.BaseVM):

>          cd $(mktemp -d /var/tmp/qemu-test.XXXXXX);

>          tar -xf /dev/vtbd1;

>          ./configure {configure_opts};

> -        gmake --output-sync -j{jobs} check {verbose};

> +        gmake --output-sync -j{jobs} {target} {verbose};

>      """

>  

>      def build_image(self, img):

> diff --git a/tests/vm/netbsd b/tests/vm/netbsd

> index fac6a7ce51..a2c3d13af4 100755

> --- a/tests/vm/netbsd

> +++ b/tests/vm/netbsd

> @@ -25,8 +25,7 @@ class NetBSDVM(basevm.BaseVM):

>          cd $(mktemp -d /var/tmp/qemu-test.XXXXXX);

>          tar -xf /dev/rld1a;

>          ./configure --python=python2.7 {configure_opts};

> -        gmake --output-sync -j{jobs} {verbose};

> -        gmake --output-sync -j{jobs} check {verbose};

> +        gmake --output-sync -j{jobs} {target} {verbose};

>      """

>  

>      def build_image(self, img):

> 


Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Philippe Mathieu-Daudé Jan. 23, 2019, 8:13 p.m. UTC | #2
Hi Alex,

On Mon, Jan 21, 2019 at 11:54 PM Philippe Mathieu-Daudé
<philmd@redhat.com> wrote:
>

> On 1/21/19 6:15 PM, Alex Bennée wrote:

> > This allows us to invoke the build with a custom target (for the VMs

> > that use the {target} format string specifier). Currently OpenBSD is

> > still hardwired due to problems running check

> >

> > Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

> > ---

> >  tests/vm/basevm.py | 3 +++

> >  tests/vm/freebsd   | 2 +-

> >  tests/vm/netbsd    | 3 +--

> >  3 files changed, 5 insertions(+), 3 deletions(-)

> >

> > diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py

> > index 5caf77d6b8..bdca6cb2fc 100755

> > --- a/tests/vm/basevm.py

> > +++ b/tests/vm/basevm.py

> > @@ -228,6 +228,8 @@ def parse_args(vmcls):

> >                        help="build image")

> >      parser.add_option("--build-qemu",

> >                        help="build QEMU from source in guest")

> > +    parser.add_option("--build-target",

> > +                      help="QEMU build target", default="check")

> >      parser.add_option("--interactive", "-I", action="store_true",

> >                        help="Interactively run command")

> >      parser.add_option("--snapshot", "-s", action="store_true",

> > @@ -255,6 +257,7 @@ def main(vmcls):

> >              cmd = [vm.BUILD_SCRIPT.format(

> >                     configure_opts = " ".join(argv),

> >                     jobs=args.jobs,

> > +                   target=args.build_target,

> >                     verbose = "V=1" if args.verbose else "")]

> >          else:

> >              cmd = argv

> > diff --git a/tests/vm/freebsd b/tests/vm/freebsd

> > index a85c866c30..1d64c31b7c 100755

> > --- a/tests/vm/freebsd

> > +++ b/tests/vm/freebsd

> > @@ -25,7 +25,7 @@ class FreeBSDVM(basevm.BaseVM):

> >          cd $(mktemp -d /var/tmp/qemu-test.XXXXXX);

> >          tar -xf /dev/vtbd1;

> >          ./configure {configure_opts};

> > -        gmake --output-sync -j{jobs} check {verbose};

> > +        gmake --output-sync -j{jobs} {target} {verbose};

> >      """

> >

> >      def build_image(self, img):

> > diff --git a/tests/vm/netbsd b/tests/vm/netbsd

> > index fac6a7ce51..a2c3d13af4 100755

> > --- a/tests/vm/netbsd

> > +++ b/tests/vm/netbsd

> > @@ -25,8 +25,7 @@ class NetBSDVM(basevm.BaseVM):

> >          cd $(mktemp -d /var/tmp/qemu-test.XXXXXX);

> >          tar -xf /dev/rld1a;

> >          ./configure --python=python2.7 {configure_opts};

> > -        gmake --output-sync -j{jobs} {verbose};


Actually this change ^ belong to the previous patch, "call make check directly".

> > -        gmake --output-sync -j{jobs} check {verbose};

> > +        gmake --output-sync -j{jobs} {target} {verbose};

> >      """

> >

> >      def build_image(self, img):

> >

>

> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
diff mbox series

Patch

diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index 5caf77d6b8..bdca6cb2fc 100755
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -228,6 +228,8 @@  def parse_args(vmcls):
                       help="build image")
     parser.add_option("--build-qemu",
                       help="build QEMU from source in guest")
+    parser.add_option("--build-target",
+                      help="QEMU build target", default="check")
     parser.add_option("--interactive", "-I", action="store_true",
                       help="Interactively run command")
     parser.add_option("--snapshot", "-s", action="store_true",
@@ -255,6 +257,7 @@  def main(vmcls):
             cmd = [vm.BUILD_SCRIPT.format(
                    configure_opts = " ".join(argv),
                    jobs=args.jobs,
+                   target=args.build_target,
                    verbose = "V=1" if args.verbose else "")]
         else:
             cmd = argv
diff --git a/tests/vm/freebsd b/tests/vm/freebsd
index a85c866c30..1d64c31b7c 100755
--- a/tests/vm/freebsd
+++ b/tests/vm/freebsd
@@ -25,7 +25,7 @@  class FreeBSDVM(basevm.BaseVM):
         cd $(mktemp -d /var/tmp/qemu-test.XXXXXX);
         tar -xf /dev/vtbd1;
         ./configure {configure_opts};
-        gmake --output-sync -j{jobs} check {verbose};
+        gmake --output-sync -j{jobs} {target} {verbose};
     """
 
     def build_image(self, img):
diff --git a/tests/vm/netbsd b/tests/vm/netbsd
index fac6a7ce51..a2c3d13af4 100755
--- a/tests/vm/netbsd
+++ b/tests/vm/netbsd
@@ -25,8 +25,7 @@  class NetBSDVM(basevm.BaseVM):
         cd $(mktemp -d /var/tmp/qemu-test.XXXXXX);
         tar -xf /dev/rld1a;
         ./configure --python=python2.7 {configure_opts};
-        gmake --output-sync -j{jobs} {verbose};
-        gmake --output-sync -j{jobs} check {verbose};
+        gmake --output-sync -j{jobs} {target} {verbose};
     """
 
     def build_image(self, img):