From 2beae9c202bf80bffdbc4768b946c9eb93a26c7e Mon Sep 17 00:00:00 2001 From: Osier Yang Date: Tue, 16 Apr 2013 21:41:44 +0800 Subject: [PATCH] cleanup: Only include testutils.h once No reason to include it in both "if" and "else" branches. --- tests/domainsnapshotxml2xmltest.c | 4 ++-- tests/esxutilstest.c | 4 ++-- tests/lxcxml2xmltest.c | 4 ++-- tests/openvzutilstest.c | 4 ++-- tests/qemuargv2xmltest.c | 4 ++-- tests/qemuhelptest.c | 4 ++-- tests/qemumonitortest.c | 4 ++-- tests/qemuxml2argvtest.c | 4 ++-- tests/qemuxml2xmltest.c | 4 ++-- tests/qemuxmlnstest.c | 4 ++-- tests/shunloadtest.c | 4 ++-- tests/vmx2xmltest.c | 4 ++-- tests/xml2vmxtest.c | 4 ++-- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/tests/domainsnapshotxml2xmltest.c b/tests/domainsnapshotxml2xmltest.c index 6f1c600f74..694c382f59 100644 --- a/tests/domainsnapshotxml2xmltest.c +++ b/tests/domainsnapshotxml2xmltest.c @@ -8,10 +8,11 @@ #include #include +#include "testutils.h" + #ifdef WITH_QEMU # include "internal.h" -# include "testutils.h" # include "qemu/qemu_conf.h" # include "qemu/qemu_domain.h" # include "testutilsqemu.h" @@ -125,7 +126,6 @@ mymain(void) VIRT_TEST_MAIN(mymain) #else -# include "testutils.h" int main(void) diff --git a/tests/esxutilstest.c b/tests/esxutilstest.c index 55b362309c..e2baea2146 100644 --- a/tests/esxutilstest.c +++ b/tests/esxutilstest.c @@ -1,5 +1,7 @@ #include +#include "testutils.h" + #ifdef WITH_ESX # include @@ -8,7 +10,6 @@ # include "internal.h" # include "viralloc.h" -# include "testutils.h" # include "virutil.h" # include "vmx/vmx.h" # include "esx/esx_util.h" @@ -279,7 +280,6 @@ mymain(void) VIRT_TEST_MAIN(mymain) #else -# include "testutils.h" int main(void) { diff --git a/tests/lxcxml2xmltest.c b/tests/lxcxml2xmltest.c index e0f99f44af..4870f4282b 100644 --- a/tests/lxcxml2xmltest.c +++ b/tests/lxcxml2xmltest.c @@ -8,10 +8,11 @@ #include #include +#include "testutils.h" + #ifdef WITH_LXC # include "internal.h" -# include "testutils.h" # include "lxc/lxc_conf.h" # include "testutilslxc.h" @@ -136,7 +137,6 @@ mymain(void) VIRT_TEST_MAIN(mymain) #else -# include "testutils.h" int main(void) diff --git a/tests/openvzutilstest.c b/tests/openvzutilstest.c index 9fb71787aa..616b6be063 100644 --- a/tests/openvzutilstest.c +++ b/tests/openvzutilstest.c @@ -1,5 +1,7 @@ #include +#include "testutils.h" + #ifdef WITH_OPENVZ # include @@ -8,7 +10,6 @@ # include "internal.h" # include "viralloc.h" -# include "testutils.h" # include "virutil.h" # include "openvz/openvz_conf.h" @@ -160,7 +161,6 @@ mymain(void) VIRT_TEST_MAIN(mymain) #else -# include "testutils.h" int main(void) { diff --git a/tests/qemuargv2xmltest.c b/tests/qemuargv2xmltest.c index 9167d88d32..ee6c7a9c38 100644 --- a/tests/qemuargv2xmltest.c +++ b/tests/qemuargv2xmltest.c @@ -8,10 +8,11 @@ #include #include +#include "testutils.h" + #ifdef WITH_QEMU # include "internal.h" -# include "testutils.h" # include "qemu/qemu_command.h" # include "testutilsqemu.h" @@ -260,7 +261,6 @@ mymain(void) VIRT_TEST_MAIN(mymain) #else -# include "testutils.h" int main(void) diff --git a/tests/qemuhelptest.c b/tests/qemuhelptest.c index 43774f4772..72901833f3 100644 --- a/tests/qemuhelptest.c +++ b/tests/qemuhelptest.c @@ -1,11 +1,12 @@ #include +#include "testutils.h" + #ifdef WITH_QEMU # include # include -# include "testutils.h" # include "qemu/qemu_capabilities.h" # include "viralloc.h" @@ -1034,7 +1035,6 @@ mymain(void) VIRT_TEST_MAIN(mymain) #else -# include "testutils.h" int main(void) { diff --git a/tests/qemumonitortest.c b/tests/qemumonitortest.c index 285dfa889e..a8fc57ac71 100644 --- a/tests/qemumonitortest.c +++ b/tests/qemumonitortest.c @@ -5,11 +5,12 @@ #include #include +#include "testutils.h" + #ifdef WITH_QEMU # include "internal.h" # include "viralloc.h" -# include "testutils.h" # include "virutil.h" # include "qemu/qemu_monitor.h" @@ -108,7 +109,6 @@ mymain(void) VIRT_TEST_MAIN(mymain) #else -# include "testutils.h" int main(void) { diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index be6c7592a0..4bf13f070a 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -8,10 +8,11 @@ #include #include +#include "testutils.h" + #ifdef WITH_QEMU # include "internal.h" -# include "testutils.h" # include "viralloc.h" # include "qemu/qemu_capabilities.h" # include "qemu/qemu_command.h" @@ -951,7 +952,6 @@ mymain(void) VIRT_TEST_MAIN(mymain) #else -# include "testutils.h" int main(void) { diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 3a1683f0f3..7434190baf 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -8,10 +8,11 @@ #include #include +#include "testutils.h" + #ifdef WITH_QEMU # include "internal.h" -# include "testutils.h" # include "qemu/qemu_conf.h" # include "qemu/qemu_domain.h" # include "testutilsqemu.h" @@ -285,7 +286,6 @@ mymain(void) VIRT_TEST_MAIN(mymain) #else -# include "testutils.h" int main(void) diff --git a/tests/qemuxmlnstest.c b/tests/qemuxmlnstest.c index e6b42dca19..4e9144befc 100644 --- a/tests/qemuxmlnstest.c +++ b/tests/qemuxmlnstest.c @@ -8,10 +8,11 @@ #include #include +#include "testutils.h" + #ifdef WITH_QEMU # include "internal.h" -# include "testutils.h" # include "qemu/qemu_capabilities.h" # include "qemu/qemu_command.h" # include "qemu/qemu_domain.h" @@ -263,7 +264,6 @@ mymain(void) VIRT_TEST_MAIN(mymain) #else -# include "testutils.h" int main(void) { diff --git a/tests/shunloadtest.c b/tests/shunloadtest.c index eddb81877d..8271b93647 100644 --- a/tests/shunloadtest.c +++ b/tests/shunloadtest.c @@ -40,6 +40,8 @@ #include +#include "testutils.h" + #ifdef linux # include @@ -50,7 +52,6 @@ # include # include "internal.h" -# include "testutils.h" pthread_cond_t cond = PTHREAD_COND_INITIALIZER; pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; @@ -143,7 +144,6 @@ int main(int argc ATTRIBUTE_UNUSED, char **argv) } #else -# include "testutils.h" int main(void) { diff --git a/tests/vmx2xmltest.c b/tests/vmx2xmltest.c index 2d04da7500..0003f5f4a5 100644 --- a/tests/vmx2xmltest.c +++ b/tests/vmx2xmltest.c @@ -1,5 +1,7 @@ #include +#include "testutils.h" + #ifdef WITH_VMX # include @@ -8,7 +10,6 @@ # include "internal.h" # include "viralloc.h" -# include "testutils.h" # include "vmx/vmx.h" static virCapsPtr caps; @@ -298,7 +299,6 @@ mymain(void) VIRT_TEST_MAIN(mymain) #else -# include "testutils.h" int main(void) { diff --git a/tests/xml2vmxtest.c b/tests/xml2vmxtest.c index 1957659329..fa4f6f9fd0 100644 --- a/tests/xml2vmxtest.c +++ b/tests/xml2vmxtest.c @@ -1,5 +1,7 @@ #include +#include "testutils.h" + #ifdef WITH_VMX # include @@ -8,7 +10,6 @@ # include "internal.h" # include "viralloc.h" -# include "testutils.h" # include "vmx/vmx.h" static virCapsPtr caps; @@ -311,7 +312,6 @@ mymain(void) VIRT_TEST_MAIN(mymain) #else -# include "testutils.h" int main(void) {