qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [RFC PATCH 13/23] docker: add --include-file argument to 'b


From: Philippe Mathieu-Daudé
Subject: [Qemu-devel] [RFC PATCH 13/23] docker: add --include-file argument to 'build' command
Date: Mon, 8 May 2017 01:57:05 -0300

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
 tests/docker/Makefile.include | 3 ++-
 tests/docker/docker.py        | 5 +++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index ceff2c1654..47978fb56c 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -51,7 +51,8 @@ docker-image-%: $(DOCKER_FILES_DIR)/%.docker
                $(SRC_PATH)/tests/docker/docker.py build qemu:$* $< \
                $(if $V,,--quiet) $(if $(NOCACHE),--no-cache) \
                $(if $(NOUSER),,--add-current-user) \
-               $(if $(EXECUTABLE),--include-executable=$(EXECUTABLE)),\
+               $(if $(EXECUTABLE),--include-executable=$(EXECUTABLE))\
+               $(if $(EXTRA_FILE),--include-file=$(EXTRA_FILE)),\
                "BUILD","$*")
 
 # Enforce dependancies for composite images
diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index 6ddc6e4c2a..4c096a8178 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -237,6 +237,9 @@ class BuildCommand(SubCommand):
                             help="""Specify a binary that will be copied to the
                             container together with all its dependent
                             libraries""")
+        parser.add_argument("--include-file", "-f",
+                            help="""Specify a binary that will be copied to the
+                            container""")
         parser.add_argument("--add-current-user", "-u", dest="user",
                             action="store_true",
                             help="Add the current user to image's passwd")
@@ -274,6 +277,8 @@ class BuildCommand(SubCommand):
             if args.include_executable:
                 _copy_binary_with_libs(args.include_executable,
                                        docker_dir)
+            if args.include_file:
+                _copy_with_mkdir(args.include_file, docker_dir)
 
             argv += ["--build-arg=" + k.lower() + "=" + v
                         for k, v in os.environ.iteritems()
-- 
2.11.0




reply via email to

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