Message ID | 20180608123307.24773-6-alex.bennee@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp856353lji; Fri, 8 Jun 2018 06:10:58 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJZynzZhHuQJJubbzqDz6v/GoMVnCVZR1l5bJnX9eO+YgELKQC+2sztTMaBnH/D/MCXWnAN X-Received: by 2002:a37:a3d2:: with SMTP id m201-v6mr5245579qke.121.1528463458490; Fri, 08 Jun 2018 06:10:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528463458; cv=none; d=google.com; s=arc-20160816; b=ygD6776AnJ2dh+b3qwLga+CUq36hhiw6WgtmR7ESLkTFirRItyJl0vKkYalQUiVjLf 0cM+v1yp7LyA5QIhp2KPXHD9cOM8v4R7v/JU9v0oo93i26aUp2JjSjKjVyX+4LHYWO32 AhDNFRuP/5hcIeEtSl2knT6EzX+bnD4hMnIUX6poIpozHwWHvPXF8V6PC25VXwl6S03L sKMsH1IIB9cBtucQUe839PrVEZxGs3kVfEOsncpaEsKQs1hRc0CX44f7IfvyGWEiKmjN tfbz9eocXUwUVE0iYVpdByNXW4OlKbIn1Im+A/uv61KYF+3pfQWfO9ZyrxP0fS0/oa6m 3brg== 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=T8rTPAZhnlEBJ+DtsCKnTIzBqGHOQC66IIMdcJKRMjc=; b=zDp4VYKaq9pAMTW4TEowDCF0Y71Tzn2yXdxTBln/TqQVRRLJUmr8Oxsw1lWBTyBJ4c e9croAnU3Hxg3TnU1/U4VKjUVF3VBQo06j9XDFY0q4sScw2JvybJltCN30ZvxkMtfKEZ F6iaJsvzMq0tG0RL+5Rzu1FaAp8qz0u7qonqfxkO1UfpYWkKkKmkag68qj1QmRKhytW5 mco7nQWBM+6UUEuMRvcbso/J9FR6WjNcQURrJ5St2yf8M2Cx2O/IsO0tiU/9Sx61CZlJ bRG5kt5HhJUxJPUJxVfGdlZBvLRaV6Tz14zWK+CdXOUUKhPQpGtQ3T+bzxyxsDsHSVfL hOrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=XeVSoNWI; 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 y50-v6si2830327qth.396.2018.06.08.06.10.58 for <patch@linaro.org> (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 08 Jun 2018 06:10:58 -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=XeVSoNWI; 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]:35568 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1fRHAP-0006uQ-UN for patch@linaro.org; Fri, 08 Jun 2018 09:10:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <alex.bennee@linaro.org>) id 1fRGZv-0001A1-9l for qemu-devel@nongnu.org; Fri, 08 Jun 2018 08:33:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <alex.bennee@linaro.org>) id 1fRGZu-0006C6-Cm for qemu-devel@nongnu.org; Fri, 08 Jun 2018 08:33:15 -0400 Received: from mail-wr0-x235.google.com ([2a00:1450:400c:c0c::235]:43745) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <alex.bennee@linaro.org>) id 1fRGZu-0006Bb-6J for qemu-devel@nongnu.org; Fri, 08 Jun 2018 08:33:14 -0400 Received: by mail-wr0-x235.google.com with SMTP id d2-v6so13210623wrm.10 for <qemu-devel@nongnu.org>; Fri, 08 Jun 2018 05:33:14 -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=T8rTPAZhnlEBJ+DtsCKnTIzBqGHOQC66IIMdcJKRMjc=; b=XeVSoNWISGddesX8r00+fjqc4R3BRWEVGTHsuHm22yMg6RpFulsB6ThGazUn5acIV5 Jo8F5XKSExXGI6NF+hlUDPiUd1rTsHaWVyR/vDorUR93ysfQOMeGzfZAHfQRF8vdFcmf wH2aEyMHjBkEU0qPpNWffVYqDHd3SGStZcx4Y= 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=T8rTPAZhnlEBJ+DtsCKnTIzBqGHOQC66IIMdcJKRMjc=; b=mBOK2Q6kNKgKN331bPYKFVX3k4UiuVc5o0NxJXlBX/EN4jDGdkzp2gqtGIX5GFW1LI Ka9sOXyzNg42yGfKVFqimm788YOE5s+L62hk7/gRUxgPqovnHJHj6UtOmaC2uQ2jaRTC NksJerEednZa/WDEn66zEAGHdC9pP24kPR6//zT4EDNrC72SKdxuPhsN1hw6bY2sQ/4s mWF7YPG41XYTaKNqnKk2w5+dABLoo4Ryj6Ri5+HVE4D1u+o8feh+6sJFQbXpCiSIy1Vh I38zVzScy9rUpZR5t+32BImbsZKN8ee3shho/NfRxiN8T9krKOE3sXumXGGJ1hP0xNOk H3Dg== X-Gm-Message-State: APt69E3hcRzJkmPpF79uWwl9kus5hFmNPJO6FXjp+yXn0qp8ZujMgFuW mczwsV9CH67ZMt/VoDyHrlIe+w== X-Received: by 2002:adf:a148:: with SMTP id r8-v6mr4772883wrr.104.1528461193134; Fri, 08 Jun 2018 05:33:13 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id r200-v6sm2831058wmb.39.2018.06.08.05.33.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Jun 2018 05:33:09 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 77C493E02D1; Fri, 8 Jun 2018 13:33:07 +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, pbonzini@redhat.com, stefanha@redhat.com, stefanb@linux.vnet.ibm.com, marcandre.lureau@redhat.com Date: Fri, 8 Jun 2018 13:32:23 +0100 Message-Id: <20180608123307.24773-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180608123307.24773-1-alex.bennee@linaro.org> References: <20180608123307.24773-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::235 Subject: [Qemu-devel] [PATCH v6 05/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]))