# define VIR_FROM_THIS VIR_FROM_LIBXL
-static const char *abs_top_srcdir;
static virCapsPtr caps;
static int
{
int ret = 0;
- abs_top_srcdir = getenv("abs_top_srcdir");
- if (!abs_top_srcdir)
- abs_top_srcdir = abs_srcdir "/..";
-
/* Set the timezone because we are mocking the time() function.
* If we don't do that, then localtime() may return unpredictable
* results. In order to detect things that just work by a blind
# define VIR_FROM_THIS VIR_FROM_NONE
-static const char *abs_top_srcdir;
-
# ifdef __linux__
# define RULESTYPE "linux"
# else
{
int ret = 0;
- abs_top_srcdir = getenv("abs_top_srcdir");
- if (!abs_top_srcdir)
- abs_top_srcdir = abs_srcdir "/..";
-
# define DO_TEST(name) \
do { \
static struct testInfo info = { \
# define VIR_FROM_THIS VIR_FROM_NONE
-static const char *abs_top_srcdir;
-
# ifdef __linux__
# define RULESTYPE "linux"
# else
{
int ret = 0;
- abs_top_srcdir = getenv("abs_top_srcdir");
- if (!abs_top_srcdir)
- abs_top_srcdir = abs_srcdir "/..";
-
# define DO_TEST(name) \
do { \
static struct testInfo info = { \
# define VIR_FROM_THIS VIR_FROM_QEMU
-static const char *abs_top_srcdir;
static virQEMUDriver driver;
struct testInfo {
setenv("LIBVIRT_FAKE_ROOT_DIR", fakerootdir, 1);
- abs_top_srcdir = getenv("abs_top_srcdir");
- if (!abs_top_srcdir)
- abs_top_srcdir = abs_srcdir "/..";
-
if (qemuTestDriverInit(&driver) < 0) {
VIR_FREE(fakerootdir);
return EXIT_FAILURE;
# define VIR_FROM_THIS VIR_FROM_QEMU
-static const char *abs_top_srcdir;
static virQEMUDriver driver;
static unsigned char *
setenv("LIBVIRT_FAKE_ROOT_DIR", fakerootdir, 1);
- abs_top_srcdir = getenv("abs_top_srcdir");
- if (!abs_top_srcdir)
- abs_top_srcdir = abs_srcdir "/..";
-
/* Set the timezone because we are mocking the time() function.
* If we don't do that, then localtime() may return unpredictable
* results. In order to detect things that just work by a blind
VIR_LOG_INIT("tests.scsitest");
-static const char *abs_top_srcdir;
static char *virscsi_prefix;
static int
char *tmpdir = NULL;
char template[] = "/tmp/libvirt_XXXXXX";
- abs_top_srcdir = getenv("abs_top_srcdir");
- if (!abs_top_srcdir)
- abs_top_srcdir = abs_srcdir "/..";
-
if (virAsprintf(&virscsi_prefix, "%s" VIR_SCSI_DATA, abs_srcdir) < 0) {
ret = -1;
goto cleanup;