mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
tests: Fix virtpcitest in VPATH
This commit is contained in:
parent
6e037015a4
commit
2cbc0164b0
@ -305,9 +305,14 @@ pci_device_new_from_stub(const struct pciDevice *data)
|
||||
char *configSrc, *configDst;
|
||||
char tmp[32];
|
||||
struct stat sb;
|
||||
char *abs_srcdir;
|
||||
|
||||
abs_srcdir = getenv("abs_srcdir");
|
||||
if (!abs_srcdir)
|
||||
abs_srcdir = getcwd(NULL, 0);
|
||||
|
||||
if (VIR_ALLOC_QUIET(dev) < 0 ||
|
||||
virAsprintfQuiet(&configSrc, "%s/virpcitestdata/%s.config", abs_builddir, data->id) < 0 ||
|
||||
virAsprintfQuiet(&configSrc, "%s/virpcitestdata/%s.config", abs_srcdir, data->id) < 0 ||
|
||||
virAsprintfQuiet(&devpath, "%s/devices/%s", fakesysfsdir, data->id) < 0)
|
||||
ABORT_OOM();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user