diff --git a/tests/testutils.c b/tests/testutils.c index 2b37c1965d..9d454c23bc 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -55,7 +55,7 @@ static size_t testCounter; static virBitmap *testBitmap; static virBitmap *failedTests; -virArch virTestHostArch = VIR_ARCH_X86_64; +static virArch virTestHostArch = VIR_ARCH_X86_64; virArch virArchFromHost(void) @@ -63,6 +63,11 @@ virArchFromHost(void) return virTestHostArch; } +void +virTestSetHostArch(virArch arch) +{ + virTestHostArch = arch; +} static int virTestUseTerminalColors(void) { diff --git a/tests/testutils.h b/tests/testutils.h index 13a154a5af..ff5661bb3f 100644 --- a/tests/testutils.h +++ b/tests/testutils.h @@ -35,7 +35,7 @@ # error Fix build system #endif -extern virArch virTestHostArch; +void virTestSetHostArch(virArch arch); int virTestRun(const char *title, int (*body)(const void *data), diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index 105b41cbeb..53fb5f656d 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -307,7 +307,7 @@ qemuTestSetHostArch(virQEMUDriver *driver, if (arch == VIR_ARCH_NONE) arch = VIR_ARCH_X86_64; - virTestHostArch = arch; + virTestSetHostArch(arch); driver->hostarch = virArchFromHost(); driver->caps->host.arch = virArchFromHost(); qemuTestSetHostCPU(driver, arch, NULL);