From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48451) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7wOt-0006oe-LJ for qemu-devel@nongnu.org; Tue, 31 May 2016 23:00:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b7wOn-00006k-Nh for qemu-devel@nongnu.org; Tue, 31 May 2016 23:00:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35235) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7wOn-00005y-I3 for qemu-devel@nongnu.org; Tue, 31 May 2016 23:00:49 -0400 Date: Wed, 1 Jun 2016 11:00:45 +0800 From: Fam Zheng Message-ID: <20160601030045.GC8639@ad.usersys.redhat.com> References: <1464272863-2285-1-git-send-email-alex.bennee@linaro.org> <1464272863-2285-2-git-send-email-alex.bennee@linaro.org> <20160527112840.GA7880@ad.usersys.redhat.com> <87wpma6ykl.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <87wpma6ykl.fsf@linaro.org> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC PATCH 1/2] tests/docker/docker.py: support --qemu option 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, peter.maydell@linaro.org, neil.williams@linaro.org, steve.mcintyre@linaro.org, riku.voipio@linaro.org On Tue, 05/31 16:23, Alex Benn=E9e wrote: > >> +def _find_user_binary(binary_name): > >> + """ Find a binary in the QEMU source tree. Used for finding qem= u-$arch.""" > >> + top =3D os.path.abspath("%s/../../.." % sys.argv[0]) > > > > What if this is an out of tree build? >=20 > Yes I kinda avoided the complexity here. Do we have a programatic way o= f > finding this out or should we just assume we get based a resolvable pat= h? As said below, let's assume the user provides an absolute path or a relat= ive path against the working directory, so we don't need to worry about path guessing. The script caller should have more information. Fam