提交 2cbc0164 编写于 作者: J Jiri Denemark

tests: Fix virtpcitest in VPATH

上级 6e037015
...@@ -305,9 +305,14 @@ pci_device_new_from_stub(const struct pciDevice *data) ...@@ -305,9 +305,14 @@ pci_device_new_from_stub(const struct pciDevice *data)
char *configSrc, *configDst; char *configSrc, *configDst;
char tmp[32]; char tmp[32];
struct stat sb; 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 || 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) virAsprintfQuiet(&devpath, "%s/devices/%s", fakesysfsdir, data->id) < 0)
ABORT_OOM(); ABORT_OOM();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册