From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59385) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpSKo-0006hJ-03 for qemu-devel@nongnu.org; Wed, 28 Sep 2016 23:48:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bpSKi-0004Q1-2h for qemu-devel@nongnu.org; Wed, 28 Sep 2016 23:48:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48224) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpSKh-0004Ps-Pd for qemu-devel@nongnu.org; Wed, 28 Sep 2016 23:48:28 -0400 Date: Thu, 29 Sep 2016 11:48:24 +0800 From: Fam Zheng Message-ID: <20160929034824.GI6412@lemon> References: <1475047892-11955-1-git-send-email-famz@redhat.com> <871t04vyhi.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <871t04vyhi.fsf@linaro.org> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] docker: Build in a clean directory 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 Wed, 09/28 16:24, Alex Benn=E9e wrote: >=20 > Fam Zheng writes: >=20 > > Currently we configure and build under "$QEMU_SRC/tests/docker" which= is > > dubious, create a fixed directory (to be friendly to ccache) and chan= ge > > to there before calling build_qemu. > > > > Signed-off-by: Fam Zheng > > --- > > tests/docker/common.rc | 3 +++ > > tests/docker/test-clang | 2 ++ > > tests/docker/test-full | 2 ++ > > tests/docker/test-mingw | 2 ++ > > tests/docker/test-quick | 2 ++ > > 5 files changed, 11 insertions(+) > > > > diff --git a/tests/docker/common.rc b/tests/docker/common.rc > > index 510a3ad..21657e8 100755 > > --- a/tests/docker/common.rc > > +++ b/tests/docker/common.rc > > @@ -11,6 +11,9 @@ > > # or (at your option) any later version. See the COPYING file in > > # the top-level directory. > > > > +BUILD_DIR=3D/var/tmp/qemu-build > > +mkdir $BUILD_DIR >=20 > Is that safe on multi-user machines? >=20 > Also should we honour $TMPDIR if set? It's not, but containers are not multi-user, at least not here in QEMU do= cker testing. We already use a fixed directory before this change, which is $QEMU_SRC/tests/docker, so this patch is not making it worse. And we know $TMPDIR is not set, too. Fam >=20 > > + > > requires() > > { > > for c in $@; do > > diff --git a/tests/docker/test-clang b/tests/docker/test-clang > > index 60e4e97..16485e6 100755 > > --- a/tests/docker/test-clang > > +++ b/tests/docker/test-clang > > @@ -15,6 +15,8 @@ > > > > requires clang > > > > +cd "$BUILD_DIR" > > + > > OPTS=3D"--enable-debug --cxx=3Dclang++ --cc=3Dclang --host-cc=3Dclan= g" > > # -fsanitize=3Dundefined is broken on Fedora 23, skip it for now > > # See also: https://bugzilla.redhat.com/show_bug.cgi?id=3D1263834 > > diff --git a/tests/docker/test-full b/tests/docker/test-full > > index fd9b798..05f0d49 100755 > > --- a/tests/docker/test-full > > +++ b/tests/docker/test-full > > @@ -13,5 +13,7 @@ > > > > . common.rc > > > > +cd "$BUILD_DIR" > > + > > build_qemu > > make check $MAKEFLAGS > > diff --git a/tests/docker/test-mingw b/tests/docker/test-mingw > > index c03757a..3396876 100755 > > --- a/tests/docker/test-mingw > > +++ b/tests/docker/test-mingw > > @@ -15,6 +15,8 @@ > > > > requires mingw dtc > > > > +cd "$BUILD_DIR" > > + > > for prefix in x86_64-w64-mingw32- i686-w64-mingw32-; do > > TARGET_LIST=3Dx86_64-softmmu,aarch64-softmmu \ > > build_qemu --cross-prefix=3D$prefix \ > > diff --git a/tests/docker/test-quick b/tests/docker/test-quick > > index 7885dfa..c465dc0 100755 > > --- a/tests/docker/test-quick > > +++ b/tests/docker/test-quick > > @@ -13,6 +13,8 @@ > > > > . common.rc > > > > +cd "$BUILD_DIR" > > + > > DEF_TARGET_LIST=3D"x86_64-softmmu,aarch64-softmmu" > > TARGET_LIST=3D${TARGET_LIST:-$DEF_TARGET_LIST} \ > > build_qemu >=20 >=20 > -- > Alex Benn=E9e