On 05/15/2014 11:35 AM, Markus Armbruster wrote: > > The root stupid idea is to run stuff in the source tree. Since a source > tree can have many build trees, finding the correct build tree can't be > automated. > > If you run stuff in the build tree, there is exactly one source tree, > and putting a pointer to it in the build tree is trivial. In fact, we > already have one: try "make -pn | grep ^SRC_PATH". > > I'd generate a suitable script into the build tree that sets up > necessary variables, then sources $SRC_PATH/qemu-iotests/check.
In fact, this is sort of what libvirt does. We have a 'run.in' script template at the top directory, then create 'run' in the build tree (whether or not it is a VPATH tree); the run script then primes any necessary environment variables to execute commands using the build tree as its preferred location for executables, dynamic libraries, and helper files. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature