aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2018-04-12 17:18:12 +0100
committerAlex Bennée <alex.bennee@linaro.org>2018-06-20 20:22:34 +0100
commit99cfdb866274ae6f68059181528c7d6dd86cc4b2 (patch)
tree253b165aa90adeadc7ef53cf1cb967b55f922856 /tests
parent5e03c2d816284e1033814fa6e638ed0df0a58d87 (diff)
docker: extend "cc" command to accept compiler
When calling our cross-compilation images we want to call something other than the default cc. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Fam Zheng <famz@redhat.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/docker/docker.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index 42267bb94d..db1e2537f5 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -419,6 +419,8 @@ class CcCommand(SubCommand):
def args(self, parser):
parser.add_argument("--image", "-i", required=True,
help="The docker image in which to run cc")
+ parser.add_argument("--cc", default="cc",
+ help="The compiler executable to call")
parser.add_argument("--source-path", "-s", nargs="*", dest="paths",
help="""Extra paths to (ro) mount into container for
reading sources""")
@@ -432,7 +434,7 @@ class CcCommand(SubCommand):
if args.paths:
for p in args.paths:
cmd += ["-v", "%s:%s:ro,z" % (p, p)]
- cmd += [args.image, "cc"]
+ cmd += [args.image, args.cc]
cmd += argv
return Docker().command("run", cmd, args.quiet)