From patchwork Tue Jun 28 15:42:42 2016 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: 641604 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rf9Pc5QHsz9s5J for ; Wed, 29 Jun 2016 01:55:32 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b=W4ANE0OY; dkim-atps=neutral Received: from localhost ([::1]:37749 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHvMI-0005vP-NW for incoming@patchwork.ozlabs.org; Tue, 28 Jun 2016 11:55:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52911) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHvA6-00087q-II for qemu-devel@nongnu.org; Tue, 28 Jun 2016 11:42:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHvA4-0002TW-KC for qemu-devel@nongnu.org; Tue, 28 Jun 2016 11:42:53 -0400 Received: from mail-wm0-x229.google.com ([2a00:1450:400c:c09::229]:37488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHvA4-0002TF-EM for qemu-devel@nongnu.org; Tue, 28 Jun 2016 11:42:52 -0400 Received: by mail-wm0-x229.google.com with SMTP id a66so33937724wme.0 for ; Tue, 28 Jun 2016 08:42:52 -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=k4MdGUq+iMDYP0FRr0xNOtY20Xc+P4mctMusvZ7qdXs=; b=W4ANE0OY3IDFqr2hwMOozKHl2ecukrU1YtL5X8ifmUvkHnepw4zlqHImUpcl+zSd1Y wsLoKcgvUxQe3TzdJKsMitJLVDYzWFwiLf1/NZzI7GI/nzg/6vVYMCxXcTp9PkNsAV0t jHLP30c+OZ90WCpVIIoyyftZNFCRRgEejuBYc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=k4MdGUq+iMDYP0FRr0xNOtY20Xc+P4mctMusvZ7qdXs=; b=dQfN9/2FG+nJZroh6X59qQzVCU0kO6KA22usOkdIW6EfBFmYCam3SLSGzD5GpcZOha 3XoRub6gVKTBisxKQfPQBzZwVNUBCFT1jl/5AOAPv6ls+Nb4Out4vcnkYJnpdtKM+xLT NNFATFTYdT3ybFtfWGOhY2H42ja9iLBVsqi0namkToMaLSwGfK2bZNFbbGCBEqPVmmuV YpzSNm0QkyBlINKDGcWTeD8arS4cHjRq+BdLMeB3lv0Pf+T6kk2EViiU9C3FW8mgyTWL wj6DLKw0YA6UohqQMaXJd2F7rT1s01Z94ERMZvMPVmTI1N0NG4rw/DFE+VyBtYgl014Z loGQ== X-Gm-Message-State: ALyK8tLZrLfRZr8JKfi50RqkdA+asGPnIIkOPCHgzTAgaSFUVju5Y4bBnVueZZKmDocBzGMX X-Received: by 10.194.67.101 with SMTP id m5mr4112752wjt.129.1467128571723; Tue, 28 Jun 2016 08:42:51 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id qg5sm5994420wjc.13.2016.06.28.08.42.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Jun 2016 08:42:48 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 267BF3E04E2; Tue, 28 Jun 2016 16:42:54 +0100 (BST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 28 Jun 2016 16:42:42 +0100 Message-Id: <1467128564-13476-4-git-send-email-alex.bennee@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1467128564-13476-1-git-send-email-alex.bennee@linaro.org> References: <1467128564-13476-1-git-send-email-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::229 Subject: [Qemu-devel] [PATCH v3 3/5] tests/docker/docker.py: check and run .pre script 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=20Benn=C3=A9e?= , riku.voipio@linaro.org, famz@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The docker script will now search for an associated $dockerfile.pre script which gets run in the same build context as the dockerfile will be. This is to support pre-seeding the build context before running the docker build. Signed-off-by: Alex Bennée --- v3 - new for v3, split from previous patch - use check_call when running the pre-script --- tests/docker/docker.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 96d906e..244901d 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -221,6 +221,12 @@ class BuildCommand(SubCommand): # Create a docker context directory for the build docker_dir = tempfile.mkdtemp(prefix="docker_build") + # Is there a .pre file to run in the build context? + docker_pre = os.path.splitext(args.dockerfile)[0]+".pre" + if os.path.exists(docker_pre): + subprocess.check_call(os.path.realpath(docker_pre), + cwd=docker_dir) + # Do we include a extra binary? if args.include_executable: _copy_binary_with_libs(args.include_executable,