diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2021-02-02 13:39:51 +0000 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2021-02-08 09:41:00 +0000 |
commit | ddd5ed8331652cd77546c331caee49d76fffe4a4 (patch) | |
tree | a65ce4c2136184730fc82191714f681aa8f04b74 /tests/docker/docker.py | |
parent | 6147c2495d1a362cb78cdbd6a321ddae31e13f9d (diff) |
tests/docker: add a docker-exec-copy-test
This provides test machinery for checking the QEMU copying logic works
properly. It takes considerably less time to run than starting a
debootstrap only for it to fail later. I considered adding a remove
command to docker.py but figured that might be gold plating given the
relative size of the containers compared to the ones with actual stuff
in them.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210202134001.25738-7-alex.bennee@linaro.org>
Diffstat (limited to 'tests/docker/docker.py')
-rwxr-xr-x | tests/docker/docker.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 39da3fefcf..d28df4c140 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -438,6 +438,9 @@ class BuildCommand(SubCommand): help="""Specify a binary that will be copied to the container together with all its dependent libraries""") + parser.add_argument("--skip-binfmt", + action="store_true", + help="""Skip binfmt entry check (used for testing)""") parser.add_argument("--extra-files", nargs='*', help="""Specify files that will be copied in the Docker image, fulfilling the ADD directive from the @@ -466,7 +469,9 @@ class BuildCommand(SubCommand): docker_dir = tempfile.mkdtemp(prefix="docker_build") # Validate binfmt_misc will work - if args.include_executable: + if args.skip_binfmt: + qpath = args.include_executable + elif args.include_executable: qpath, enabled = _check_binfmt_misc(args.include_executable) if not enabled: return 1 |