Message ID | 20180517174718.10107-9-alex.bennee@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp245085lji; Thu, 17 May 2018 10:57:08 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqqh1vL/e6skWrMywgdOtWM8Mjos3Glz68Anc3+xS/YCKWezL1V1wE4PhxcPr2GJPaF4ZQM X-Received: by 2002:ac8:3f23:: with SMTP id c32-v6mr6360246qtk.286.1526579828420; Thu, 17 May 2018 10:57:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526579828; cv=none; d=google.com; s=arc-20160816; b=eafhkA/Szf0+yviTC1QKXPbrYNd6DPKcUzkTnXGRTIdFOcdVcyQst3D/mCBYhAP47e jLanEa74JV8Hzmco13NpyFk+23s5qa7KWD3jjQGgO3JsZvzIUHOZyrRUZB7plZPnUwKY +8y9rW9sLnEWVSsmL6XYDl/pVrKxoQjjapBrDkRDJ7BdfmnoBMaV7T78tVubPFC3oJur VwXUAW82FOJQAkkLPCX2MzXSg20qz/vk68FPQF2/gCAWQtrwwYkB+hQnaqeIwE8l1B1j 7OhZ7buuGl/JDuPePjEKNeX81SETMrU9gzKDx9+Rp+Su8uK/Dv7yD+WLxuCVwr8j5Mdq KLfA== 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=2bTmo5Z3bqje3uvfKSKg6BbcjFDioLuevJQVtr4gvdc=; b=q5AAsRbGTN9+/elt3ZMlvlCeQWE+KuyjIiUmnVpFc+tIDDtz7y5Br8x37BZyJShvzb txJ8bkn3On7brOwAB700HoKj4j3mjTiaUAA7K2ohzYazOkHF2FhtgQsVoC2gGnrD6FxA vMXulkelUUA/qRaHOwmEfWcoiZLfdrJLtrWcV5k0RrVrIYlZfRtdsPVmukPfyTChX34C Dnh/bWK7aBBhZRYLAW0rKQLFDDHmCcUa1ml05Pcdpu07oOiv61WbnW6UmHVY50V8qxtX v1LxxuJvktcZjkKG5ks+U+DGc4xmEhtwpcchsSMZuwjYmmYqtbgIwNXuEx+AMUY1nPCm g9sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Lh8C12y3; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id i6-v6si5275655qvj.65.2018.05.17.10.57.08 for <patch@linaro.org> (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 17 May 2018 10:57:08 -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=Lh8C12y3; 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]:38473 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1fJN9H-0005sb-Ro for patch@linaro.org; Thu, 17 May 2018 13:57:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <alex.bennee@linaro.org>) id 1fJN02-0006Hs-Ct for qemu-devel@nongnu.org; Thu, 17 May 2018 13:47:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <alex.bennee@linaro.org>) id 1fJMzz-0003Xa-7r for qemu-devel@nongnu.org; Thu, 17 May 2018 13:47:34 -0400 Received: from mail-wr0-x232.google.com ([2a00:1450:400c:c0c::232]:33181) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <alex.bennee@linaro.org>) id 1fJMzz-0003XE-2B for qemu-devel@nongnu.org; Thu, 17 May 2018 13:47:31 -0400 Received: by mail-wr0-x232.google.com with SMTP id o4-v6so6573502wrm.0 for <qemu-devel@nongnu.org>; Thu, 17 May 2018 10:47:30 -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=2bTmo5Z3bqje3uvfKSKg6BbcjFDioLuevJQVtr4gvdc=; b=Lh8C12y30eFVN7AcP6QXxhb1ZZcqKFfsyH4MTX4UlUZL1XmY7xk68k31LKj9KfxwxR ybPi6sL2NrEtKoTUoVHTRwuf3ECcaXkiKa6uP/y2AJp9qv6Yr4smZgaLxHxqWtr1xZX4 nFEz3Hwp8UmgzAb91kbAO7t7WkRZz2YwTHLWw= 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=2bTmo5Z3bqje3uvfKSKg6BbcjFDioLuevJQVtr4gvdc=; b=RPheI0ML8lJG7UdWvzpRkuk5Bn49myneUHtAOKmI/MXWH2IATnCZAvWQo/yGSOJanP Lp8XyjzR/9dozvy/dBbweCPLrfaRDVBNSPvwCau6Rz4q8lywegdz0bRpIz6RMcDtovb9 nqMCrBkr1YELnX0jQQGOCA9SqxzCwOu12AriQsFt364sL4FpDYLFt/goFf4vDZNEyC61 uWeW+8kME0GSl0/xVe83457lOqD8mYT+GJTfCaE/4k+InNBwqhPiqolAZNlPtfZst4c/ rsg+P+Dg//K2RMQMrPnCpW926bmfIBNWpRzfngYlBFRZJX+T6nTwV11wxqhCkJHOzFAo GFtA== X-Gm-Message-State: ALKqPweWLvhPO9ZeWrjIeJxflZrCMA618nazLgqqZ9E2EjxFHpfnUFiU 68478Dt2RD84RDsP+bDsMJgp7g== X-Received: by 2002:adf:ce03:: with SMTP id p3-v6mr4934083wrn.110.1526579249887; Thu, 17 May 2018 10:47:29 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id m134-v6sm6393755wmg.4.2018.05.17.10.47.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 May 2018 10:47:25 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 67FAB3E0DCB; Thu, 17 May 2018 18:47:19 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org> To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Thu, 17 May 2018 18:46:37 +0100 Message-Id: <20180517174718.10107-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180517174718.10107-1-alex.bennee@linaro.org> References: <20180517174718.10107-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::232 Subject: [Qemu-devel] [PATCH v4 08/49] docker: Add "cc" subcommand X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
fix building of tests/tcg
|
expand
|
diff --git a/tests/docker/docker.py b/tests/docker/docker.py index f8267586eb..bcc3ee2dee 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -408,6 +408,31 @@ class ProbeCommand(SubCommand): return +class CcCommand(SubCommand): + """Compile sources with cc in images""" + name = "cc" + + def args(self, parser): + parser.add_argument("--image", "-i", required=True, + help="The docker image in which to run cc") + parser.add_argument("--source-path", "-s", nargs="*", dest="paths", + help="""Extra paths to (ro) mount into container for + reading sources""") + + def run(self, args, argv): + if argv and argv[0] == "--": + argv = argv[1:] + cwd = os.getcwd() + cmd = ["--rm", "-w", cwd, + "-v", "%s:%s:rw" % (cwd, cwd)] + if args.paths: + for p in args.paths: + cmd += ["-v", "%s:%s:ro,z" % (p, p)] + cmd += [args.image, "cc"] + cmd += argv + return Docker().command("run", cmd, args.quiet) + + def main(): parser = argparse.ArgumentParser(description="A Docker helper", usage="%s <subcommand> ..." % os.path.basename(sys.argv[0]))