Message ID | 20180615194705.28019-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-v6csp1265551lji; Fri, 15 Jun 2018 13:07:19 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIGHbkfz1K8pnYjNZMf7m2zEEPR5UDNjkeRfyNcyinCki/G4Nv/zB8UdFLw2ymdVjeiWDWg X-Received: by 2002:a37:32cd:: with SMTP id y196-v6mr2582811qky.431.1529093239219; Fri, 15 Jun 2018 13:07:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529093239; cv=none; d=google.com; s=arc-20160816; b=GZV/POW9ZawTCw/H9cXHR6EyRbr824JwgYocaYN522St2GTunRSpZO6/UkylQu2Fy9 l6kyMqqQkWY3E5oO7HDPqGFqcMGL5icaFleqD7LvQoT/64muIJZ6NyUek1x0gUnEz+GG d6QV2YnoXb/ccnt2hVnPvF0AdkKScmbQg343IcYNOSoOybtI50HIm/FWWS3Oa365hAzg l7j/GZ+f4F/6do8yV3JFi+HS+N4S+7F3XRjS8Fp3r16eiXH90f4MqmG4MhSEv/0zWTBc zAzIJgecka4lw8h+PhzTRMDB6ik3MYrT/3mjbs0HEB495+LH+dfSJj30K3Vc5eyP7jg+ MqBQ== 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=NfJ5U5jIFnzXeSOLBje2WDYfem2f4jhgHe0dDM3WbUA=; b=UjsqyM8OpVPOiFsnOSiaNMv7RoI/t4HNK7rd+Qn7DOoVI1QGvk3uX2RDChcTPvxKbE WRpjDm2wBqwCvbzgDBmuDLsG38aIydoqhOgEC3FlDqkOCyWeYl+MwqiPohLquQZ1hJ0A jCdblaJSqixkZy+qO412XDhrmuiLlyuwRrqhXrNSz+nYFymomFpAlP0CLsZ48bl6/DPU sYFuV3q7mSWgJ7/uV8SzEmBBtn4FRQbiWJkfR/mEWfUV5SjpcNukpbn1xEJTKTCxm8bS ARBBDbQfN5RUMgGCjR64uEFy6feW9eeXcJQD2y004oWVk7WEQANZxaPthW7Px/wVE0Rk FsKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=MYcVB5sa; 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 r23-v6si1073191qtj.405.2018.06.15.13.07.19 for <patch@linaro.org> (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 15 Jun 2018 13:07:19 -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=MYcVB5sa; 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]:49081 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1fTv07-0001lS-VS for patch@linaro.org; Fri, 15 Jun 2018 16:07:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52314) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <alex.bennee@linaro.org>) id 1fTugk-0002Vd-JF for qemu-devel@nongnu.org; Fri, 15 Jun 2018 15:47:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <alex.bennee@linaro.org>) id 1fTugj-0005J0-BH for qemu-devel@nongnu.org; Fri, 15 Jun 2018 15:47:14 -0400 Received: from mail-wr0-x22e.google.com ([2a00:1450:400c:c0c::22e]:43808) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <alex.bennee@linaro.org>) id 1fTugj-0005HT-4a for qemu-devel@nongnu.org; Fri, 15 Jun 2018 15:47:13 -0400 Received: by mail-wr0-x22e.google.com with SMTP id d2-v6so10941971wrm.10 for <qemu-devel@nongnu.org>; Fri, 15 Jun 2018 12:47:12 -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=NfJ5U5jIFnzXeSOLBje2WDYfem2f4jhgHe0dDM3WbUA=; b=MYcVB5sanRxjV/9p476P1qhGJtE8x4BJXi8JtTj6lpvEe/3f8DeVUgFzgbWjGD7Rad cM5HxubSmzIZkLkPVZUaaBtCz0ZH9oKDhlplZ0rO1GLCm+b78Ivr2/5HAER8oQckC/8r YBGuoaRjVLGCMpALko7wNzmyQ/d+PatAMfkqk= 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=NfJ5U5jIFnzXeSOLBje2WDYfem2f4jhgHe0dDM3WbUA=; b=KGP3Kq4uHYleBH43KHZpjnQVmd1YD3lI3MXozMK9WgGQXY9Hvtu/O1xCfOClFcAptQ 7pbiLSOHGbpX8B7l1tRZ5xHSxsk0MmZo/X4SMFyQAbWityz/IQFpONf9v71A0/CM6oFP c+ye21Gy77RpIm9FjIuPvEena+1WBHrEuTmXif6rXeet0HrUpySpWsxYrD0fO+iSKXvv NjXAult6V9JUfX67EfDT7k/XpVCKn5QFe0GORVJZBPva70dh4vx+vSqBlwA5QrYHvc9P zgpaoE6WpH/NOeVmzkdjplTuSLF/0p9JcrSADzbLd9pDPFD+i9iESBJsQ+zLhBQCxf0V ViPA== X-Gm-Message-State: APt69E1JrkjubI8cbwzlpRvfzZanm/NVnUtavIP2hPoM8lg2XIsbcn/O lrNqs72eyCIk1FWfyYvSFW7q6g== X-Received: by 2002:adf:cc8e:: with SMTP id p14-v6mr2563668wrj.226.1529092031980; Fri, 15 Jun 2018 12:47:11 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id k17-v6sm3131873wmc.23.2018.06.15.12.47.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jun 2018 12:47:08 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id D28043E0576; Fri, 15 Jun 2018 20:47:05 +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, peter.maydell@linaro.org Date: Fri, 15 Jun 2018 20:46:16 +0100 Message-Id: <20180615194705.28019-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180615194705.28019-1-alex.bennee@linaro.org> References: <20180615194705.28019-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::22e Subject: [Qemu-devel] [PATCH v7 05/54] 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 - last chance to review!
|
expand
|
diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 306e14cf69..4cd6f9b8ec 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -409,6 +409,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]))