[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 08/13] tests/docker: search the tests/docker tree to inline pa
From: |
Alex Bennée |
Subject: |
[PATCH v1 08/13] tests/docker: search the tests/docker tree to inline parent dockerfile |
Date: |
Fri, 24 Jan 2020 20:40:21 +0000 |
The changes to a multi-directory set of dockerfiles means we can't
rely on hardcoding any more. Just search down the tree until we find
the file we are looking for.
Signed-off-by: Alex Bennée <address@hidden>
---
tests/docker/docker.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index 7dfca63fe4..892d70b568 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -189,9 +189,10 @@ def _read_qemu_dockerfile(img_name):
if img_name.startswith("debian") and img_name.endswith("user"):
img_name = "debian-bootstrap"
- df = os.path.join(os.path.dirname(__file__), "dockerfiles",
- img_name + ".docker")
- return _read_dockerfile(df)
+ dockerfile = img_name + ".docker"
+ for root, dirs, files in os.walk(os.path.dirname(__file__)):
+ if dockerfile in files:
+ return _read_dockerfile(os.path.join(root, dockerfile))
def _dockerfile_preprocess(df):
--
2.20.1
- [PATCH v1 00/13] docker multiarch awareness, Alex Bennée, 2020/01/24
- [PATCH v1 03/13] gitlab-ci: Refresh the list of iotests, Alex Bennée, 2020/01/24
- [PATCH v1 04/13] travis.yml: Install genisoimage package, Alex Bennée, 2020/01/24
- [PATCH v1 01/13] tests/docker: move most cross compilers to buster base, Alex Bennée, 2020/01/24
- [PATCH v1 02/13] tests/docker: better handle symlinked libs, Alex Bennée, 2020/01/24
- [PATCH v1 05/13] .shippable: --disable-docs for cross-compile tests, Alex Bennée, 2020/01/24
- [PATCH v1 06/13] tests/docker: move all cross-compilers images into dockerfiles.cross, Alex Bennée, 2020/01/24
- [PATCH v1 07/13] tests/docker: move all multiarch containers into dockerfiles.multiarch, Alex Bennée, 2020/01/24
- [PATCH v1 08/13] tests/docker: search the tests/docker tree to inline parent dockerfile,
Alex Bennée <=
- [PATCH v1 10/13] tests/docker: add debian10-native-qemu-build, Alex Bennée, 2020/01/24
- [PATCH v1 09/13] tests/docker: switch to multiarch aware container support, Alex Bennée, 2020/01/24
- [PATCH v1 13/13] tests/docker: enable cross-compilers for aarch64, Alex Bennée, 2020/01/24
- [PATCH v1 11/13] tests/docker: rename the cross builds, Alex Bennée, 2020/01/24
- [PATCH v1 12/13] tests/docker: re-enable cross-compiling for x86_64 hosts, Alex Bennée, 2020/01/24