From patchwork Tue Apr 10 19:39:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 133098 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp1634082ljb; Tue, 10 Apr 2018 12:43:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx49Mp7HmQEEcfLh0YUx+WkKQKvhZO8r2GQ/sAO7Lbk7XIc5g6agl+6Z7nHWNFm/bAHymCB2e X-Received: by 10.55.79.9 with SMTP id d9mr2731115qkb.2.1523389382372; Tue, 10 Apr 2018 12:43:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523389382; cv=none; d=google.com; s=arc-20160816; b=UeTdM7CfEN4k1YW07VrCDX5e4uv8MQZJb9q2j5HJ1lYwf8GKIuz1tTXbFlEzaOipA/ RQtCK5Jn+ZCjr0lv4/xNPJlx066T4DNIxo1s1dgkohjFXSdwu9iaRpePcLTdcxgyGQ31 p7Nwj10P4dworvtCHO93EDsXugMnwsR8f175fN/rLNjqNt0D14MMCOVRfd5yAHzcjNTS Afp5k0z4lu0Rx5X8JFnC9tHyS7hayIQ5OIiN5K8GgFAm/0hvdRlWjOcujtxv0+yZkE3H 0iytI6NFSOjtEsMmYzf82sMglITlR/WLyHpv+HR/gj9kqJK9E0F624PIryeKAZ9T8yjw JrAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=g88whosAybvhXVaC8+xtzN1sjWnni1rDs+t1txgPR1g=; b=Eo6K7S1VdlnFruQzYhqaqjcTrl32DVaGXZqsaiGfnH7VnW8uR42ra21mHN9TvywoW4 OMKJvWaXUhbjL4xeGMQqIqdf4OWaUdsJ2ScYQne1X5AGHZHiorQcrDDbxRTSG/Ka3BG7 OgkkVQ5pkl8GYCjep0YrNjo519rQGMG5WgixQrjt3qlA5MXixfh+2/4NUmrbQhPTJVKz VOUkb8m0ok+uT4DqN0HEaGqaf9lSrRiG5rz8qgUY4hhScDAfCb1ao4uXjM8QxhsU3ST1 /wy+bgbwjffMml68IIE/oQ8SAEXAb3HKegSVE+0zrUZKOalN5QkM9jirsFNDTeh+yeHN ZdXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=MShHE+Gb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id o13si4317837qtg.131.2018.04.10.12.43.02 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 10 Apr 2018 12:43:02 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=MShHE+Gb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39701 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5zAT-00034M-Oj for patch@linaro.org; Tue, 10 Apr 2018 15:43:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5z72-00007z-Cm for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5z71-0006JT-I3 for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:28 -0400 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:41727) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5z71-0006Ip-C3 for qemu-devel@nongnu.org; Tue, 10 Apr 2018 15:39:27 -0400 Received: by mail-wr0-x243.google.com with SMTP id s12so13927716wrc.8 for ; Tue, 10 Apr 2018 12:39:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=g88whosAybvhXVaC8+xtzN1sjWnni1rDs+t1txgPR1g=; b=MShHE+Gb4y7usokzltAYs475Ps+ebsp7Ivw89jeHZi2vzdfcg/qvrj75gCe9fgz6HG bEzO+82KU9zLgz6AVePUeMMUUIiDFOQXpdS6I9l0kcC9LrXC6wYjo6oeUvPrP2Ecwiuj /F95+qaVH087v+NM7ULwtgkYWGZc0MAjdYCAY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=g88whosAybvhXVaC8+xtzN1sjWnni1rDs+t1txgPR1g=; b=AQ3LBC5MM3mWEG47g7sFYRgus5VQXOtTLbbr84aeKELepSIzKEt4jpYI/fCxB6ixaI VjxRLcM6djDgsZKeARA18Y7mKl7BdqERuDDiSD5Gn6A1BfPA7B2+Ex1KVMBe2ZUcFagK Ic6gDkR7/K2VBoe5PwuwABgmCsa7KjwfLE+v4Wou9qquH5MlxRfcwexthAdYpfe7phJF TunqYreazlUL8lU3SJ3hvMurT2tBby6qg1XnhYUTAvDP2CunjYwaqBCDOGV9DHIAYyQD fJ7zgaeNFOwONSkpO3im27pbhd3XGfiPf/RqpDnX9l2tmo1eeMRC/GlnZFtAfngrbFxJ 9Rjg== X-Gm-Message-State: ALQs6tBDw8sTl+Lg1ieNaGEKW+NuX6IUoB0PlNxX3l+frUb9PVPaybl0 S8eYMVMbrAui/a+rLxMUDGRSzA== X-Received: by 10.223.196.141 with SMTP id m13mr1262741wrf.173.1523389166235; Tue, 10 Apr 2018 12:39:26 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id k28sm5332902wrk.96.2018.04.10.12.39.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:39:24 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id D1A993E0971; Tue, 10 Apr 2018 20:39:19 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 20:39:01 +0100 Message-Id: <20180410193919.28026-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180410193919.28026-1-alex.bennee@linaro.org> References: <20180410193919.28026-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::243 Subject: [Qemu-devel] [PATCH v1 06/24] docker: extend "cc" command to accept compiler X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , famz@redhat.com, cota@braap.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" When calling our cross-compilation images we want to call something other than the default cc. Signed-off-by: Alex Bennée --- tests/docker/docker.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) -- 2.16.2 diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 8733266153..9444f4bea4 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -397,6 +397,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", + 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""") @@ -407,9 +409,19 @@ class CcCommand(SubCommand): cwd = os.getcwd() cmd = ["--rm", "-w", cwd, "-v", "%s:%s:rw" % (cwd, cwd)] - for p in args.paths: - cmd += ["-v", "%s:%s:ro,z" % (p, p)] - cmd += [args.image, "cc"] + + if args.paths: + for p in args.paths: + cmd += ["-v", "%s:%s:ro,z" % (p, p)] + + cmd += [args.image] + + # The compile command we are running + if args.cc: + cmd += [args.cc] + else: + cmd += ["cc"] + cmd += argv return Docker().command("run", cmd, True)