From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPTRk-0008O9-BJ for qemu-devel@nongnu.org; Tue, 19 Jul 2016 07:44:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPTRg-00037w-71 for qemu-devel@nongnu.org; Tue, 19 Jul 2016 07:44:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55979) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPTRg-00037s-27 for qemu-devel@nongnu.org; Tue, 19 Jul 2016 07:44:16 -0400 Date: Tue, 19 Jul 2016 19:44:13 +0800 From: Fam Zheng Message-ID: <20160719114413.GA3839@ad.usersys.redhat.com> References: <1468916208-18668-1-git-send-email-famz@redhat.com> <1468916208-18668-4-git-send-email-famz@redhat.com> <87lh0ym0vw.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <87lh0ym0vw.fsf@linaro.org> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v6 3/8] tests/docker/docker.py: check and run .pre script List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex =?iso-8859-1?Q?Benn=E9e?= Cc: qemu-devel@nongnu.org On Tue, 07/19 10:29, Alex Benn=E9e wrote: > > diff --git a/tests/docker/docker.py b/tests/docker/docker.py > > index 96d906e..b61d934 100755 > > --- a/tests/docker/docker.py > > +++ b/tests/docker/docker.py > > @@ -221,6 +221,18 @@ class BuildCommand(SubCommand): > > # Create a docker context directory for the build > > docker_dir =3D tempfile.mkdtemp(prefix=3D"docker_build") > > > > + # Is there a .pre file to run in the build context? > > + docker_pre =3D os.path.splitext(args.dockerfile)[0]+".pr= e" > > + if os.path.exists(docker_pre): > > + rc =3D subprocess.call(os.path.realpath(docker_pre), > > + cwd=3Ddocker_dir) > > + if rc =3D=3D 3: > > + print "Skip" > > + return 0 > > + else: > > + print "%s exited with code %d" % (docker_pre, rc= ) > > + return 1 > > + >=20 > We need to let an exit of 0 through ;-) Yes, I forgot that! Fam