From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org
Cc: famz@redhat.com, riku.voipio@linaro.org,
"Alex Bennée" <alex.bennee@linaro.org>
Subject: [Qemu-devel] [PATCH v3 3/5] tests/docker/docker.py: check and run .pre script
Date: Tue, 28 Jun 2016 16:42:42 +0100 [thread overview]
Message-ID: <1467128564-13476-4-git-send-email-alex.bennee@linaro.org> (raw)
In-Reply-To: <1467128564-13476-1-git-send-email-alex.bennee@linaro.org>
The docker script will now search for an associated $dockerfile.pre
script which gets run in the same build context as the dockerfile will
be. This is to support pre-seeding the build context before running the
docker build.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
v3
- new for v3, split from previous patch
- use check_call when running the pre-script
---
tests/docker/docker.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index 96d906e..244901d 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -221,6 +221,12 @@ class BuildCommand(SubCommand):
# Create a docker context directory for the build
docker_dir = tempfile.mkdtemp(prefix="docker_build")
+ # Is there a .pre file to run in the build context?
+ docker_pre = os.path.splitext(args.dockerfile)[0]+".pre"
+ if os.path.exists(docker_pre):
+ subprocess.check_call(os.path.realpath(docker_pre),
+ cwd=docker_dir)
+
# Do we include a extra binary?
if args.include_executable:
_copy_binary_with_libs(args.include_executable,
--
2.7.4
next prev parent reply other threads:[~2016-06-28 15:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-28 15:42 [Qemu-devel] [PATCH v3 0/5] Support building qemu-user powered docker test images Alex Bennée
2016-06-28 15:42 ` [Qemu-devel] [PATCH v3 1/5] tests/docker/docker.py: docker_dir outside build Alex Bennée
2016-06-28 15:42 ` [Qemu-devel] [PATCH v3 2/5] tests/docker/docker.py: support --include-executable Alex Bennée
2016-06-28 15:42 ` Alex Bennée [this message]
2016-06-28 15:42 ` [Qemu-devel] [PATCH v3 4/5] tests/docker/dockerfiles: new debian-bootstrap.docker Alex Bennée
2016-06-28 15:42 ` [Qemu-devel] [PATCH v3 5/5] tests/docker/docker.py: add update operation Alex Bennée
2016-07-08 6:15 ` [Qemu-devel] [PATCH v3 0/5] Support building qemu-user powered docker test images Fam Zheng
2016-07-08 7:53 ` Alex Bennée
2016-07-08 9:14 ` Fam Zheng
2016-07-08 10:10 ` Alex Bennée
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1467128564-13476-4-git-send-email-alex.bennee@linaro.org \
--to=alex.bennee@linaro.org \
--cc=famz@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).