From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bD8LD-0000k0-Hk for qemu-devel@nongnu.org; Wed, 15 Jun 2016 06:46:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bD8LB-0007Am-Ka for qemu-devel@nongnu.org; Wed, 15 Jun 2016 06:46:34 -0400 Received: from mail-vk0-x22a.google.com ([2607:f8b0:400c:c05::22a]:36337) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bD8LB-0007AV-Fe for qemu-devel@nongnu.org; Wed, 15 Jun 2016 06:46:33 -0400 Received: by mail-vk0-x22a.google.com with SMTP id u64so23729851vkf.3 for ; Wed, 15 Jun 2016 03:46:33 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20160614215949.6421.413@loki> References: <1465910214-22516-1-git-send-email-marcandre.lureau@redhat.com> <1465910214-22516-2-git-send-email-marcandre.lureau@redhat.com> <20160614215949.6421.413@loki> From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Date: Wed, 15 Jun 2016 12:46:31 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: Michael Roth Cc: QEMU , Peter Maydell Hi On Tue, Jun 14, 2016 at 11:59 PM, Michael Roth wrote: > 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. Right, so let's use a symlink too? +if [ ! -e tests/test-qga-config ]; then + symlink "$source_path/tests/test-qga-config" tests/test-qga-config +fi > > 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/ I agree an environment variable would be nice (along with helper functions to lookup test data files), but I think we should stick with the common symlink way for now. I'll resend the patch, thanks --=20 Marc-Andr=C3=A9 Lureau