qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 for 3.0 13/16] docker: add --hint to docker.p


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH v2 for 3.0 13/16] docker: add --hint to docker.py check
Date: Tue, 17 Jul 2018 00:24:23 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 07/13/2018 09:17 AM, Alex Bennée wrote:
> When a check fails we currently just report why we failed. This is not
> totally helpful to people who want to boot-strap a new image. Add a
> --hint option which we can pass down to give a bit more information.
> 
> Signed-off-by: Alex Bennée <address@hidden>

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>

> ---
>  tests/docker/Makefile.include | 3 ++-
>  tests/docker/docker.py        | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index ec23620153..c9e412f9d0 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -73,7 +73,8 @@ docker-binfmt-image-debian-%: 
> $(DOCKER_FILES_DIR)/debian-bootstrap.docker
>                       $(if $(EXECUTABLE),--include-executable=$(EXECUTABLE)), 
> \
>                       "BUILD","binfmt debian-$* (debootstrapped)"),           
> \
>               $(call quiet-command,                                           
> \
> -                     $(DOCKER_SCRIPT) check --quiet qemu:debian-$* $<,       
> \
> +                     $(DOCKER_SCRIPT) check --quiet qemu:debian-$* $<        
> \
> +                     --hint "you will need to build $(EXECUTABLE)",          
> \
>                       "CHECK", "debian-$* exists"))
>  
>  endif
> diff --git a/tests/docker/docker.py b/tests/docker/docker.py
> index 2f81c6b13b..523f4b95a2 100755
> --- a/tests/docker/docker.py
> +++ b/tests/docker/docker.py
> @@ -475,6 +475,7 @@ class CheckCommand(SubCommand):
>                              default="checksum", help="check type")
>          parser.add_argument("--olderthan", default=60, type=int,
>                              help="number of minutes")
> +        parser.add_argument("--hint", default="", help="hint to user")
>  
>      def run(self, args, argv):
>          tag = args.tag
> @@ -487,7 +488,7 @@ class CheckCommand(SubCommand):
>  
>          info = dkr.inspect_tag(tag)
>          if info is None:
> -            print("Image does not exist")
> +            print("Image does not exist %s" % (args.hint))
>              return 1
>  
>          if args.checktype == "checksum":
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]