From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37612) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCwNT-00028u-18 for qemu-devel@nongnu.org; Tue, 14 Jun 2016 18:00:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCwNO-0005SI-4F for qemu-devel@nongnu.org; Tue, 14 Jun 2016 18:00:06 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:34815) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCwNN-0005Rp-S3 for qemu-devel@nongnu.org; Tue, 14 Jun 2016 18:00:02 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u5ELwlTR015934 for ; Tue, 14 Jun 2016 18:00:00 -0400 Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) by mx0a-001b2d01.pphosted.com with ESMTP id 23jch4pk1h-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 14 Jun 2016 18:00:00 -0400 Received: from localhost by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 14 Jun 2016 15:59:59 -0600 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Roth In-Reply-To: <1465910214-22516-2-git-send-email-marcandre.lureau@redhat.com> References: <1465910214-22516-1-git-send-email-marcandre.lureau@redhat.com> <1465910214-22516-2-git-send-email-marcandre.lureau@redhat.com> Date: Tue, 14 Jun 2016 16:59:49 -0500 Message-Id: <20160614215949.6421.413@loki> Subject: Re: [Qemu-devel] [PATCH 1/2] build-sys: define QEMU_SRC_PATH List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org Cc: peter.maydell@linaro.org Quoting marcandre.lureau@redhat.com (2016-06-14 08:16:53) > From: Marc-Andr=C3=A9 Lureau > = > Define QEMU_SRC_PATH in config-host.h, to ease accessing of tests data > files. > = > Signed-off-by: Marc-Andr=C3=A9 Lureau I know this avoids the need to define environment variables for individual test targets to pass on SRC_PATH, but the fact that we didn't rely on this before made me a bit apprehensive about suggesting it. qemu-iotests for instance relies on a symlink back to SRC_PATH, and check-qapi-schema tests feed individual schema files to a script via tests/Makefile.include. Both can be made to check against a different/changing SRC_PATH, but if we bake it into the code that's not possible. I'm not sure if there's a valid use-case for needing to do so, but it seems to be bad form to not have any mechanism to change them without recompiling. Personally I think I'd prefer the environment variable approach, even if it means needing to add it per-target. I think if we wanted to get fancy we could do this via a recipe that exports environment variables added to a lazily-evaluated Makefile variable by each target's dependencies, but it's probably not worth it outside of a more general cleanup to how we handle SRC_PATH/BUILD_DIR dependencies throughout tests/ If others are fine with the approach taken here though I wouldn't hold things up. > --- > scripts/create_config | 3 +++ > 1 file changed, 3 insertions(+) > = > diff --git a/scripts/create_config b/scripts/create_config > index 1dd6a35..2fbe126 100755 > --- a/scripts/create_config > +++ b/scripts/create_config > @@ -116,6 +116,9 @@ case $line in > DSOSUF=3D*) > echo "#define HOST_DSOSUF \"${line#*=3D}\"" > ;; > + SRC_PATH=3D*) > + echo "#define QEMU_SRC_PATH \"${line#*=3D}\"" > + ;; > esac > = > done # read > -- = > 2.7.4 >=20