tests/docker: add specific command to parser

A future change will want to use additional flags which clash with
docker/podman command lines. Currently they would get snarfed up by
argparser. Make the pass-through commands explicit to avoid this.

Tested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Message-ID: <20260917165602.3405537-13-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
This commit is contained in:
Alex Bennée committed 2026-09-18 14:03:23 +01:00
1 parent bcbf7afcca
commit 3d7cb5106e
3 files changed
+6 -3

No files matched your search

+1 -1
View File
@@ -381,7 +381,7 @@ if [ "$DOCKER" = yes ]; then
# Arrange for this docker run to get access to the sources with -v.
# We pass through all the configuration from the outer script to the inner.
export COVERITY_EMAIL COVERITY_BUILD_CMD
tests/docker/docker.py run -it --env COVERITY_EMAIL --env COVERITY_BUILD_CMD \
tests/docker/docker.py run -- -it --env COVERITY_EMAIL --env COVERITY_BUILD_CMD \
-v "$SECRETDIR:/work" coverity-scanner \
./run-coverity-scan --version "$VERSION" \
--description "$DESCRIPTION" $ARGS --tokenfile /work/token \
+4 -1
View File
@@ -379,9 +379,12 @@ class RunCommand(SubCommand):
help="Don't remove image when command completes")
parser.add_argument("--run-as-current-user", action="store_true",
help="Run container using the current user's uid")
parser.add_argument('cmd', nargs='*',
help="""The command to run. You should precede with
-- to avoid confusion about its flags""")
def run(self, args, argv):
return Docker(args.command).run(argv, args.keep, quiet=args.quiet,
return Docker(args.command).run(args.cmd, args.keep, quiet=args.quiet,
as_user=args.run_as_current_user)
+1 -1
View File
@@ -275,7 +275,7 @@ foreach target, plan: tcg_tests
mount = meson.project_source_root()
mount = mount + ':' + mount
here = meson.project_build_root()
cc = [docker_wrapper, 'run', '--run-as-current-user',
cc = [docker_wrapper, 'run', '--run-as-current-user', '--',
'-w', here, '-v', mount,
'qemu/' + cc_dockerfile, plan['cc']]
has_cc = true