Blame SOURCES/0015-Arrange-tests-in-subdirectories.patch

e10a2d
From e3eeddbc857a5647135c42c97be75198929a8ce1 Mon Sep 17 00:00:00 2001
e10a2d
From: "Richard W.M. Jones" <rjones@redhat.com>
e10a2d
Date: Thu, 3 Oct 2019 09:53:49 +0100
e10a2d
Subject: [PATCH 15/21] Arrange tests in subdirectories.
e10a2d
e10a2d
This simplifies and isolates each test.
e10a2d
---
e10a2d
 .gitignore                                    |   6 +-
e10a2d
 Makefile.am                                   | 261 +-----------------
e10a2d
 configure.ac                                  |  77 +++++-
e10a2d
 tests/Makefile.am                             |  20 ++
e10a2d
 tests/aws-baremetal-x86/Makefile.am           |  28 ++
e10a2d
 .../test.sh}                                  |   4 +-
e10a2d
 tests/aws-kvm-arm/Makefile.am                 |  28 ++
e10a2d
 .../test.sh}                                  |   4 +-
e10a2d
 tests/aws-kvm-x86/Makefile.am                 |  28 ++
e10a2d
 .../test.sh}                                  |   4 +-
e10a2d
 tests/aws-xen-x86/Makefile.am                 |  28 ++
e10a2d
 .../test.sh}                                  |   4 +-
e10a2d
 tests/baremetal/Makefile.am                   |  28 ++
e10a2d
 .../{test-baremetal.sh => baremetal/test.sh}  |   4 +-
e10a2d
 tests/bhyve/Makefile.am                       |  27 ++
e10a2d
 tests/{test-bhyve.sh => bhyve/test.sh}        |   4 +-
e10a2d
 tests/docker/Makefile.am                      |  29 ++
e10a2d
 tests/{test-docker.sh => docker/test.sh}      |   4 +-
e10a2d
 tests/esx4.1/Makefile.am                      |  28 ++
e10a2d
 tests/{test-esx4.1.sh => esx4.1/test.sh}      |   4 +-
e10a2d
 tests/hyperv/Makefile.am                      |  28 ++
e10a2d
 tests/{test-hyperv.sh => hyperv/test.sh}      |   4 +-
e10a2d
 tests/kvm-explicit-cpu/Makefile.am            |  28 ++
e10a2d
 .../test.sh}                                  |   4 +-
e10a2d
 tests/kvm/Makefile.am                         |  28 ++
e10a2d
 tests/{test-kvm.sh => kvm/test.sh}            |   4 +-
e10a2d
 tests/ldoms/Makefile.am                       |  28 ++
e10a2d
 tests/{test-ldoms.sh => ldoms/test.sh}        |   4 +-
e10a2d
 tests/linux-vserver/Makefile.am               |  28 ++
e10a2d
 .../test.sh}                                  |   4 +-
e10a2d
 tests/lkvm-arm/Makefile.am                    |  29 ++
e10a2d
 tests/{test-lkvm-arm.sh => lkvm-arm/test.sh}  |   4 +-
e10a2d
 tests/lkvm/Makefile.am                        |  28 ++
e10a2d
 tests/{test-lkvm.sh => lkvm/test.sh}          |   4 +-
e10a2d
 tests/lx86/Makefile.am                        |  28 ++
e10a2d
 tests/{test-lx86.sh => lx86/test.sh}          |   4 +-
e10a2d
 tests/lxc/Makefile.am                         |  29 ++
e10a2d
 tests/{test-lxc.sh => lxc/test.sh}            |   4 +-
e10a2d
 tests/parallels-desktop/Makefile.am           |  28 ++
e10a2d
 .../test.sh}                                  |   4 +-
e10a2d
 tests/ppc64-baremetal/Makefile.am             |  27 ++
e10a2d
 .../test.sh}                                  |   4 +-
e10a2d
 tests/ppc64-kvm/Makefile.am                   |  28 ++
e10a2d
 .../{test-ppc64-kvm.sh => ppc64-kvm/test.sh}  |   4 +-
e10a2d
 tests/ppc64-lpar-dedicated/Makefile.am        |  28 ++
e10a2d
 .../test.sh}                                  |   4 +-
e10a2d
 tests/ppc64-lpar-shared/Makefile.am           |  29 ++
e10a2d
 .../test.sh}                                  |   4 +-
e10a2d
 tests/qemu-arm/Makefile.am                    |  29 ++
e10a2d
 tests/{test-qemu-arm.sh => qemu-arm/test.sh}  |   4 +-
e10a2d
 tests/qemu-smbios-kvm/Makefile.am             |  28 ++
e10a2d
 .../test.sh}                                  |   4 +-
e10a2d
 tests/qemu-smbios/Makefile.am                 |  28 ++
e10a2d
 .../test.sh}                                  |   4 +-
e10a2d
 tests/qemu/Makefile.am                        |  28 ++
e10a2d
 tests/{test-qemu.sh => qemu/test.sh}          |   4 +-
e10a2d
 tests/rhel5-xen-dom0/Makefile.am              |  48 ++++
e10a2d
 .../test.sh}                                  |   4 +-
e10a2d
 tests/rhel5-xen-domU-hvm-ia64/Makefile.am     |  33 +++
e10a2d
 .../test.sh}                                  |   4 +-
e10a2d
 tests/rhel5-xen-domU-hvm/Makefile.am          |  28 ++
e10a2d
 .../test.sh}                                  |   4 +-
e10a2d
 tests/rhel5-xen-domU-pv/Makefile.am           |  46 +++
e10a2d
 .../test.sh}                                  |   4 +-
e10a2d
 tests/rhev/Makefile.am                        |  28 ++
e10a2d
 tests/{test-rhev.sh => rhev/test.sh}          |   4 +-
e10a2d
 tests/vmm/Makefile.am                         |  27 ++
e10a2d
 tests/{test-vmm.sh => vmm/test.sh}            |   4 +-
e10a2d
 tests/xen-arm/Makefile.am                     |  29 ++
e10a2d
 tests/{test-xen-arm.sh => xen-arm/test.sh}    |   4 +-
e10a2d
 tests/zvm/Makefile.am                         |  29 ++
e10a2d
 tests/{test-zvm.sh => zvm/test.sh}            |   4 +-
e10a2d
 72 files changed, 1138 insertions(+), 361 deletions(-)
e10a2d
 create mode 100644 tests/Makefile.am
e10a2d
 create mode 100644 tests/aws-baremetal-x86/Makefile.am
e10a2d
 rename tests/{test-aws-baremetal-x86.sh => aws-baremetal-x86/test.sh} (93%)
e10a2d
 create mode 100644 tests/aws-kvm-arm/Makefile.am
e10a2d
 rename tests/{test-aws-kvm-arm.sh => aws-kvm-arm/test.sh} (94%)
e10a2d
 create mode 100644 tests/aws-kvm-x86/Makefile.am
e10a2d
 rename tests/{test-aws-kvm-x86.sh => aws-kvm-x86/test.sh} (94%)
e10a2d
 create mode 100644 tests/aws-xen-x86/Makefile.am
e10a2d
 rename tests/{test-aws-xen-x86.sh => aws-xen-x86/test.sh} (94%)
e10a2d
 create mode 100644 tests/baremetal/Makefile.am
e10a2d
 rename tests/{test-baremetal.sh => baremetal/test.sh} (94%)
e10a2d
 create mode 100644 tests/bhyve/Makefile.am
e10a2d
 rename tests/{test-bhyve.sh => bhyve/test.sh} (94%)
e10a2d
 create mode 100644 tests/docker/Makefile.am
e10a2d
 rename tests/{test-docker.sh => docker/test.sh} (94%)
e10a2d
 create mode 100644 tests/esx4.1/Makefile.am
e10a2d
 rename tests/{test-esx4.1.sh => esx4.1/test.sh} (94%)
e10a2d
 create mode 100644 tests/hyperv/Makefile.am
e10a2d
 rename tests/{test-hyperv.sh => hyperv/test.sh} (94%)
e10a2d
 create mode 100644 tests/kvm-explicit-cpu/Makefile.am
e10a2d
 rename tests/{test-kvm-explicit-cpu.sh => kvm-explicit-cpu/test.sh} (94%)
e10a2d
 create mode 100644 tests/kvm/Makefile.am
e10a2d
 rename tests/{test-kvm.sh => kvm/test.sh} (95%)
e10a2d
 create mode 100644 tests/ldoms/Makefile.am
e10a2d
 rename tests/{test-ldoms.sh => ldoms/test.sh} (94%)
e10a2d
 create mode 100644 tests/linux-vserver/Makefile.am
e10a2d
 rename tests/{test-linux-vserver.sh => linux-vserver/test.sh} (94%)
e10a2d
 create mode 100644 tests/lkvm-arm/Makefile.am
e10a2d
 rename tests/{test-lkvm-arm.sh => lkvm-arm/test.sh} (94%)
e10a2d
 create mode 100644 tests/lkvm/Makefile.am
e10a2d
 rename tests/{test-lkvm.sh => lkvm/test.sh} (94%)
e10a2d
 create mode 100644 tests/lx86/Makefile.am
e10a2d
 rename tests/{test-lx86.sh => lx86/test.sh} (95%)
e10a2d
 create mode 100644 tests/lxc/Makefile.am
e10a2d
 rename tests/{test-lxc.sh => lxc/test.sh} (95%)
e10a2d
 create mode 100644 tests/parallels-desktop/Makefile.am
e10a2d
 rename tests/{test-parallels-desktop.sh => parallels-desktop/test.sh} (94%)
e10a2d
 create mode 100644 tests/ppc64-baremetal/Makefile.am
e10a2d
 rename tests/{test-ppc64-baremetal.sh => ppc64-baremetal/test.sh} (94%)
e10a2d
 create mode 100644 tests/ppc64-kvm/Makefile.am
e10a2d
 rename tests/{test-ppc64-kvm.sh => ppc64-kvm/test.sh} (94%)
e10a2d
 create mode 100644 tests/ppc64-lpar-dedicated/Makefile.am
e10a2d
 rename tests/{test-ppc64-lpar-dedicated.sh => ppc64-lpar-dedicated/test.sh} (94%)
e10a2d
 create mode 100644 tests/ppc64-lpar-shared/Makefile.am
e10a2d
 rename tests/{test-ppc64-lpar-shared.sh => ppc64-lpar-shared/test.sh} (94%)
e10a2d
 create mode 100644 tests/qemu-arm/Makefile.am
e10a2d
 rename tests/{test-qemu-arm.sh => qemu-arm/test.sh} (94%)
e10a2d
 create mode 100644 tests/qemu-smbios-kvm/Makefile.am
e10a2d
 rename tests/{test-qemu-smbios-kvm.sh => qemu-smbios-kvm/test.sh} (94%)
e10a2d
 create mode 100644 tests/qemu-smbios/Makefile.am
e10a2d
 rename tests/{test-qemu-smbios.sh => qemu-smbios/test.sh} (94%)
e10a2d
 create mode 100644 tests/qemu/Makefile.am
e10a2d
 rename tests/{test-qemu.sh => qemu/test.sh} (94%)
e10a2d
 create mode 100644 tests/rhel5-xen-dom0/Makefile.am
e10a2d
 rename tests/{test-rhel5-xen-dom0.sh => rhel5-xen-dom0/test.sh} (94%)
e10a2d
 create mode 100644 tests/rhel5-xen-domU-hvm-ia64/Makefile.am
e10a2d
 rename tests/{test-rhel5-xen-domU-hvm-ia64.sh => rhel5-xen-domU-hvm-ia64/test.sh} (93%)
e10a2d
 create mode 100644 tests/rhel5-xen-domU-hvm/Makefile.am
e10a2d
 rename tests/{test-rhel5-xen-domU-hvm.sh => rhel5-xen-domU-hvm/test.sh} (94%)
e10a2d
 create mode 100644 tests/rhel5-xen-domU-pv/Makefile.am
e10a2d
 rename tests/{test-rhel5-xen-domU-pv.sh => rhel5-xen-domU-pv/test.sh} (94%)
e10a2d
 create mode 100644 tests/rhev/Makefile.am
e10a2d
 rename tests/{test-rhev.sh => rhev/test.sh} (94%)
e10a2d
 create mode 100644 tests/vmm/Makefile.am
e10a2d
 rename tests/{test-vmm.sh => vmm/test.sh} (95%)
e10a2d
 create mode 100644 tests/xen-arm/Makefile.am
e10a2d
 rename tests/{test-xen-arm.sh => xen-arm/test.sh} (94%)
e10a2d
 create mode 100644 tests/zvm/Makefile.am
e10a2d
 rename tests/{test-zvm.sh => zvm/test.sh} (95%)
e10a2d
e10a2d
diff --git a/.gitignore b/.gitignore
e10a2d
index f565f34..4833fd6 100644
e10a2d
--- a/.gitignore
e10a2d
+++ b/.gitignore
e10a2d
@@ -1,12 +1,14 @@
e10a2d
 *~
e10a2d
+*.bak
e10a2d
 *.log
e10a2d
 *.trs
e10a2d
 *.o
e10a2d
 
e10a2d
+Makefile
e10a2d
+Makefile.in
e10a2d
+
e10a2d
 /virt-what-*.tar.gz
e10a2d
 /.deps
e10a2d
-/Makefile
e10a2d
-/Makefile.in
e10a2d
 /aclocal.m4
e10a2d
 /autom4te.cache
e10a2d
 /compile
e10a2d
diff --git a/Makefile.am b/Makefile.am
e10a2d
index 48fd518..b62738f 100644
e10a2d
--- a/Makefile.am
e10a2d
+++ b/Makefile.am
e10a2d
@@ -15,9 +15,13 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
+AM_CPPFLAGS = -Wall
e10a2d
+
e10a2d
 CLEANFILES = virt-what *~
e10a2d
 
e10a2d
-AM_CPPFLAGS = -Wall
e10a2d
+EXTRA_DIST = virt-what.in virt-what.pod
e10a2d
+
e10a2d
+SUBDIRS = . tests
e10a2d
 
e10a2d
 sbin_SCRIPTS = virt-what
e10a2d
 libexec_PROGRAMS = virt-what-cpuid-helper
e10a2d
@@ -37,258 +41,3 @@ virt-what.txt: virt-what.pod
e10a2d
 	pod2text $? > $@
e10a2d
 
e10a2d
 endif
e10a2d
-
e10a2d
-TESTS = \
e10a2d
-	tests/test-aws-baremetal-x86.sh \
e10a2d
-	tests/test-aws-kvm-arm.sh \
e10a2d
-	tests/test-aws-kvm-x86.sh \
e10a2d
-	tests/test-aws-xen-x86.sh \
e10a2d
-	tests/test-baremetal.sh \
e10a2d
-	tests/test-bhyve.sh \
e10a2d
-	tests/test-docker.sh \
e10a2d
-	tests/test-esx4.1.sh \
e10a2d
-	tests/test-hyperv.sh \
e10a2d
-	tests/test-kvm.sh \
e10a2d
-	tests/test-kvm-explicit-cpu.sh \
e10a2d
-	tests/test-linux-vserver.sh \
e10a2d
-	tests/test-ldoms.sh \
e10a2d
-	tests/test-lkvm.sh \
e10a2d
-	tests/test-lkvm-arm.sh \
e10a2d
-	tests/test-lxc.sh \
e10a2d
-	tests/test-lx86.sh \
e10a2d
-	tests/test-parallels-desktop.sh \
e10a2d
-	tests/test-ppc64-baremetal.sh \
e10a2d
-	tests/test-ppc64-kvm.sh \
e10a2d
-	tests/test-ppc64-lpar-dedicated.sh \
e10a2d
-	tests/test-ppc64-lpar-shared.sh \
e10a2d
-	tests/test-qemu.sh \
e10a2d
-	tests/test-qemu-arm.sh \
e10a2d
-	tests/test-qemu-smbios.sh \
e10a2d
-	tests/test-qemu-smbios-kvm.sh \
e10a2d
-	tests/test-rhel5-xen-dom0.sh \
e10a2d
-	tests/test-rhel5-xen-domU-hvm.sh \
e10a2d
-	tests/test-rhel5-xen-domU-hvm-ia64.sh \
e10a2d
-	tests/test-rhel5-xen-domU-pv.sh \
e10a2d
-	tests/test-rhev.sh \
e10a2d
-	tests/test-vmm.sh \
e10a2d
-	tests/test-xen-arm.sh \
e10a2d
-	tests/test-zvm.sh
e10a2d
-
e10a2d
-EXTRA_DIST = \
e10a2d
-	virt-what.in \
e10a2d
-	virt-what.pod \
e10a2d
-	tests/aws-baremetal-x86/proc/cpuinfo \
e10a2d
-	tests/aws-baremetal-x86/proc/self/status \
e10a2d
-	tests/aws-baremetal-x86/sbin/dmidecode \
e10a2d
-	tests/aws-baremetal-x86/sbin/uname \
e10a2d
-	tests/aws-baremetal-x86/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/aws-kvm-x86/proc/cpuinfo \
e10a2d
-	tests/aws-kvm-x86/proc/self/status \
e10a2d
-	tests/aws-kvm-x86/sbin/dmidecode \
e10a2d
-	tests/aws-kvm-x86/sbin/uname \
e10a2d
-	tests/aws-kvm-x86/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/aws-xen-x86/proc/cpuinfo \
e10a2d
-	tests/aws-xen-x86/proc/self/status \
e10a2d
-	tests/aws-xen-x86/sbin/dmidecode \
e10a2d
-	tests/aws-xen-x86/sbin/uname \
e10a2d
-	tests/aws-xen-x86/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/baremetal/proc/cpuinfo \
e10a2d
-	tests/baremetal/proc/self/status \
e10a2d
-	tests/baremetal/sbin/dmidecode \
e10a2d
-	tests/baremetal/sbin/uname \
e10a2d
-	tests/baremetal/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/bhyve/proc/cpuinfo \
e10a2d
-	tests/bhyve/sbin/dmidecode \
e10a2d
-	tests/bhyve/sbin/uname \
e10a2d
-	tests/bhyve/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/docker/.dockerinit \
e10a2d
-	tests/docker/proc/cpuinfo \
e10a2d
-	tests/docker/proc/self/status \
e10a2d
-	tests/docker/sbin/dmidecode \
e10a2d
-	tests/docker/sbin/uname \
e10a2d
-	tests/docker/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/esx4.1/proc/cpuinfo \
e10a2d
-	tests/esx4.1/proc/self/status \
e10a2d
-	tests/esx4.1/sbin/dmidecode \
e10a2d
-	tests/esx4.1/sbin/uname \
e10a2d
-	tests/esx4.1/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/hyperv/proc/cpuinfo \
e10a2d
-	tests/hyperv/proc/self/status \
e10a2d
-	tests/hyperv/sbin/dmidecode \
e10a2d
-	tests/hyperv/sbin/uname \
e10a2d
-	tests/hyperv/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/kvm/proc/cpuinfo \
e10a2d
-	tests/kvm/proc/self/status \
e10a2d
-	tests/kvm/sbin/dmidecode \
e10a2d
-	tests/kvm/sbin/uname \
e10a2d
-	tests/kvm/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/kvm-explicit-cpu/proc/cpuinfo \
e10a2d
-	tests/kvm-explicit-cpu/proc/self/status \
e10a2d
-	tests/kvm-explicit-cpu/sbin/dmidecode \
e10a2d
-	tests/kvm-explicit-cpu/sbin/uname \
e10a2d
-	tests/kvm-explicit-cpu/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/ldoms/dev/mdesc \
e10a2d
-	tests/ldoms/proc/cpuinfo \
e10a2d
-	tests/ldoms/sbin/uname \
e10a2d
-	tests/ldoms/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/linux-vserver/proc/cpuinfo \
e10a2d
-	tests/linux-vserver/proc/self/status \
e10a2d
-	tests/linux-vserver/sbin/dmidecode \
e10a2d
-	tests/linux-vserver/sbin/uname \
e10a2d
-	tests/linux-vserver/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/lkvm/proc/cpuinfo \
e10a2d
-	tests/lkvm/proc/self/status \
e10a2d
-	tests/lkvm/sbin/dmidecode \
e10a2d
-	tests/lkvm/sbin/uname \
e10a2d
-	tests/lkvm/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/lkvm-arm/proc/cpuinfo \
e10a2d
-	tests/lkvm-arm/proc/device-tree/compatible \
e10a2d
-	tests/lkvm-arm/proc/self/status \
e10a2d
-	tests/lkvm-arm/sbin/dmidecode \
e10a2d
-	tests/lkvm-arm/sbin/uname \
e10a2d
-	tests/lkvm-arm/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/lxc/proc/1/environ \
e10a2d
-	tests/lxc/proc/cpuinfo \
e10a2d
-	tests/lxc/proc/self/status \
e10a2d
-	tests/lxc/sbin/dmidecode \
e10a2d
-	tests/lxc/sbin/uname \
e10a2d
-	tests/lxc/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/lx86/proc/cpuinfo \
e10a2d
-	tests/lx86/proc/self/status \
e10a2d
-	tests/lx86/sbin/dmidecode \
e10a2d
-	tests/lx86/sbin/uname \
e10a2d
-	tests/lx86/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/parallels-desktop/proc/cpuinfo \
e10a2d
-	tests/parallels-desktop/proc/self/status \
e10a2d
-	tests/parallels-desktop/sbin/dmidecode \
e10a2d
-	tests/parallels-desktop/sbin/uname \
e10a2d
-	tests/parallels-desktop/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/ppc64-baremetal/proc/cpuinfo \
e10a2d
-	tests/ppc64-baremetal/sbin/dmidecode \
e10a2d
-	tests/ppc64-baremetal/sbin/uname \
e10a2d
-	tests/ppc64-baremetal/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/ppc64-kvm/proc/cpuinfo \
e10a2d
-	tests/ppc64-kvm/proc/self/status \
e10a2d
-	tests/ppc64-kvm/sbin/dmidecode \
e10a2d
-	tests/ppc64-kvm/sbin/uname \
e10a2d
-	tests/ppc64-kvm/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/ppc64-lpar-dedicated/proc/cpuinfo \
e10a2d
-	tests/ppc64-lpar-dedicated/proc/ppc64/lparcfg \
e10a2d
-	tests/ppc64-lpar-dedicated/sbin/dmidecode \
e10a2d
-	tests/ppc64-lpar-dedicated/sbin/uname \
e10a2d
-	tests/ppc64-lpar-dedicated/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/ppc64-lpar-shared/sbin/dmidecode \
e10a2d
-	tests/ppc64-lpar-shared/sbin/uname \
e10a2d
-	tests/ppc64-lpar-shared/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/ppc64-lpar-shared/proc/cpuinfo \
e10a2d
-	tests/ppc64-lpar-shared/proc/self/status \
e10a2d
-	tests/ppc64-lpar-shared/proc/ppc64/lparcfg \
e10a2d
-	tests/ppc64-lpar-shared/sbin/dmidecode \
e10a2d
-	tests/ppc64-lpar-shared/sbin/uname \
e10a2d
-	tests/ppc64-lpar-shared/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/qemu/proc/cpuinfo \
e10a2d
-	tests/qemu/proc/self/status \
e10a2d
-	tests/qemu/sbin/dmidecode \
e10a2d
-	tests/qemu/sbin/uname \
e10a2d
-	tests/qemu/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/qemu-arm/proc/cpuinfo \
e10a2d
-	tests/qemu-arm/proc/device-tree/fw-cfg@9020000/compatible \
e10a2d
-	tests/qemu-arm/proc/self/status \
e10a2d
-	tests/qemu-arm/sbin/dmidecode \
e10a2d
-	tests/qemu-arm/sbin/uname \
e10a2d
-	tests/qemu-arm/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/qemu-smbios/proc/cpuinfo \
e10a2d
-	tests/qemu-smbios/proc/self/status \
e10a2d
-	tests/qemu-smbios/sbin/dmidecode \
e10a2d
-	tests/qemu-smbios/sbin/uname \
e10a2d
-	tests/qemu-smbios/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/qemu-smbios-kvm/proc/cpuinfo \
e10a2d
-	tests/qemu-smbios-kvm/proc/self/status \
e10a2d
-	tests/qemu-smbios-kvm/sbin/dmidecode \
e10a2d
-	tests/qemu-smbios-kvm/sbin/uname \
e10a2d
-	tests/qemu-smbios-kvm/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/rhel5-xen-dom0/proc/cpuinfo \
e10a2d
-	tests/rhel5-xen-dom0/proc/self/status \
e10a2d
-	tests/rhel5-xen-dom0/proc/xen/balloon \
e10a2d
-	tests/rhel5-xen-dom0/proc/xen/capabilities \
e10a2d
-	tests/rhel5-xen-dom0/proc/xen/privcmd \
e10a2d
-	tests/rhel5-xen-dom0/proc/xen/xenbus \
e10a2d
-	tests/rhel5-xen-dom0/proc/xen/xsd_kva \
e10a2d
-	tests/rhel5-xen-dom0/proc/xen/xsd_port \
e10a2d
-	tests/rhel5-xen-dom0/sbin/dmidecode \
e10a2d
-	tests/rhel5-xen-dom0/sbin/uname \
e10a2d
-	tests/rhel5-xen-dom0/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/rhel5-xen-dom0/sys/hypervisor/properties/pagesize \
e10a2d
-	tests/rhel5-xen-dom0/sys/hypervisor/properties/changeset \
e10a2d
-	tests/rhel5-xen-dom0/sys/hypervisor/properties/virtual_start \
e10a2d
-	tests/rhel5-xen-dom0/sys/hypervisor/properties/capabilities \
e10a2d
-	tests/rhel5-xen-dom0/sys/hypervisor/properties/writable_pt \
e10a2d
-	tests/rhel5-xen-dom0/sys/hypervisor/type \
e10a2d
-	tests/rhel5-xen-dom0/sys/hypervisor/vmcoreinfo \
e10a2d
-	tests/rhel5-xen-dom0/sys/hypervisor/version/minor \
e10a2d
-	tests/rhel5-xen-dom0/sys/hypervisor/version/major \
e10a2d
-	tests/rhel5-xen-dom0/sys/hypervisor/version/extra \
e10a2d
-	tests/rhel5-xen-dom0/sys/hypervisor/compilation/compiler \
e10a2d
-	tests/rhel5-xen-dom0/sys/hypervisor/compilation/compiled_by \
e10a2d
-	tests/rhel5-xen-dom0/sys/hypervisor/compilation/compile_date \
e10a2d
-	tests/rhel5-xen-dom0/sys/hypervisor/uuid \
e10a2d
-	tests/rhel5-xen-domU-hvm/proc/cpuinfo \
e10a2d
-	tests/rhel5-xen-domU-hvm/proc/self/status \
e10a2d
-	tests/rhel5-xen-domU-hvm/sbin/dmidecode \
e10a2d
-	tests/rhel5-xen-domU-hvm/sbin/uname \
e10a2d
-	tests/rhel5-xen-domU-hvm/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/rhel5-xen-domU-hvm-ia64/proc/cpuinfo \
e10a2d
-	tests/rhel5-xen-domU-hvm-ia64/proc/self/status \
e10a2d
-	tests/rhel5-xen-domU-hvm-ia64/sbin/dmidecode \
e10a2d
-	tests/rhel5-xen-domU-hvm-ia64/sbin/uname \
e10a2d
-	tests/rhel5-xen-domU-hvm-ia64/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/rhel5-xen-domU-hvm-ia64/sys/bus/xen/drivers/vbd/bind \
e10a2d
-	tests/rhel5-xen-domU-hvm-ia64/sys/bus/xen/drivers/vbd/unbind \
e10a2d
-	tests/rhel5-xen-domU-hvm-ia64/sys/bus/xen/drivers/vif/bind \
e10a2d
-	tests/rhel5-xen-domU-hvm-ia64/sys/bus/xen/drivers/vif/unbind \
e10a2d
-	tests/rhel5-xen-domU-hvm-ia64/sys/bus/xen/drivers_probe \
e10a2d
-	tests/rhel5-xen-domU-pv/proc/cpuinfo \
e10a2d
-	tests/rhel5-xen-domU-pv/proc/self/status \
e10a2d
-	tests/rhel5-xen-domU-pv/proc/xen/balloon \
e10a2d
-	tests/rhel5-xen-domU-pv/proc/xen/capabilities \
e10a2d
-	tests/rhel5-xen-domU-pv/proc/xen/privcmd \
e10a2d
-	tests/rhel5-xen-domU-pv/proc/xen/xenbus \
e10a2d
-	tests/rhel5-xen-domU-pv/sbin/dmidecode \
e10a2d
-	tests/rhel5-xen-domU-pv/sbin/uname \
e10a2d
-	tests/rhel5-xen-domU-pv/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/rhel5-xen-domU-pv/sys/hypervisor/properties/pagesize \
e10a2d
-	tests/rhel5-xen-domU-pv/sys/hypervisor/properties/changeset \
e10a2d
-	tests/rhel5-xen-domU-pv/sys/hypervisor/properties/virtual_start \
e10a2d
-	tests/rhel5-xen-domU-pv/sys/hypervisor/properties/capabilities \
e10a2d
-	tests/rhel5-xen-domU-pv/sys/hypervisor/properties/writable_pt \
e10a2d
-	tests/rhel5-xen-domU-pv/sys/hypervisor/type \
e10a2d
-	tests/rhel5-xen-domU-pv/sys/hypervisor/vmcoreinfo \
e10a2d
-	tests/rhel5-xen-domU-pv/sys/hypervisor/version/minor \
e10a2d
-	tests/rhel5-xen-domU-pv/sys/hypervisor/version/major \
e10a2d
-	tests/rhel5-xen-domU-pv/sys/hypervisor/version/extra \
e10a2d
-	tests/rhel5-xen-domU-pv/sys/hypervisor/compilation/compiler \
e10a2d
-	tests/rhel5-xen-domU-pv/sys/hypervisor/compilation/compiled_by \
e10a2d
-	tests/rhel5-xen-domU-pv/sys/hypervisor/compilation/compile_date \
e10a2d
-	tests/rhel5-xen-domU-pv/sys/hypervisor/uuid \
e10a2d
-	tests/rhev/proc/cpuinfo \
e10a2d
-	tests/rhev/proc/self/status \
e10a2d
-	tests/rhev/sbin/dmidecode \
e10a2d
-	tests/rhev/sbin/uname \
e10a2d
-	tests/rhev/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/vmm/proc/cpuinfo \
e10a2d
-	tests/vmm/sbin/dmidecode \
e10a2d
-	tests/vmm/sbin/uname \
e10a2d
-	tests/vmm/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/xen-arm/proc/cpuinfo \
e10a2d
-	tests/xen-arm/proc/device-tree/hypervisor/compatible \
e10a2d
-	tests/xen-arm/proc/self/status \
e10a2d
-	tests/xen-arm/sbin/dmidecode \
e10a2d
-	tests/xen-arm/sbin/uname \
e10a2d
-	tests/xen-arm/sbin/virt-what-cpuid-helper \
e10a2d
-	tests/zvm/proc/cpuinfo \
e10a2d
-	tests/zvm/proc/self/status \
e10a2d
-	tests/zvm/proc/sysinfo \
e10a2d
-	tests/zvm/sbin/dmidecode \
e10a2d
-	tests/zvm/sbin/uname \
e10a2d
-	tests/zvm/sbin/virt-what-cpuid-helper \
e10a2d
-	$(TESTS)
e10a2d
diff --git a/configure.ac b/configure.ac
e10a2d
index 3f16dba..5e0d9c4 100644
e10a2d
--- a/configure.ac
e10a2d
+++ b/configure.ac
e10a2d
@@ -32,10 +32,85 @@ dnl Architecture we are compiling for.
e10a2d
 AC_CANONICAL_HOST
e10a2d
 AM_CONDITIONAL([HOST_CPU_IA64], [ test "x$host_cpu" = "xia64" ])
e10a2d
 
e10a2d
+dnl List of tests.
e10a2d
+tests="\
e10a2d
+	aws-baremetal-x86 \
e10a2d
+	aws-kvm-arm \
e10a2d
+	aws-kvm-x86 \
e10a2d
+	aws-xen-x86 \
e10a2d
+	baremetal \
e10a2d
+	bhyve \
e10a2d
+	docker \
e10a2d
+	esx4.1 \
e10a2d
+	hyperv \
e10a2d
+	kvm \
e10a2d
+	kvm-explicit-cpu \
e10a2d
+	ldoms \
e10a2d
+	linux-vserver \
e10a2d
+	lkvm \
e10a2d
+	lkvm-arm \
e10a2d
+	lx86 \
e10a2d
+	lxc \
e10a2d
+	parallels-desktop \
e10a2d
+	ppc64-baremetal \
e10a2d
+	ppc64-kvm \
e10a2d
+	ppc64-lpar-dedicated \
e10a2d
+	ppc64-lpar-shared \
e10a2d
+	qemu \
e10a2d
+	qemu-arm \
e10a2d
+	qemu-smbios \
e10a2d
+	qemu-smbios-kvm \
e10a2d
+	rhel5-xen-dom0 \
e10a2d
+	rhel5-xen-domU-hvm \
e10a2d
+	rhel5-xen-domU-hvm-ia64 \
e10a2d
+	rhel5-xen-domU-pv \
e10a2d
+	rhev \
e10a2d
+	vmm \
e10a2d
+	xen-arm \
e10a2d
+	zvm \
e10a2d
+        "
e10a2d
+AC_SUBST([tests])
e10a2d
+
e10a2d
 dnl Produce output files.
e10a2d
 AC_CONFIG_HEADERS([config.h])
e10a2d
 AC_CONFIG_FILES([virt-what],[chmod +x virt-what])
e10a2d
-AC_CONFIG_FILES([Makefile])
e10a2d
+AC_CONFIG_FILES([Makefile
e10a2d
+                 tests/Makefile
e10a2d
+	         tests/aws-baremetal-x86/Makefile
e10a2d
+	         tests/aws-kvm-arm/Makefile
e10a2d
+	         tests/aws-kvm-x86/Makefile
e10a2d
+	         tests/aws-xen-x86/Makefile
e10a2d
+	         tests/baremetal/Makefile
e10a2d
+	         tests/bhyve/Makefile
e10a2d
+	         tests/docker/Makefile
e10a2d
+	         tests/esx4.1/Makefile
e10a2d
+	         tests/hyperv/Makefile
e10a2d
+	         tests/kvm/Makefile
e10a2d
+	         tests/kvm-explicit-cpu/Makefile
e10a2d
+	         tests/ldoms/Makefile
e10a2d
+	         tests/linux-vserver/Makefile
e10a2d
+	         tests/lkvm/Makefile
e10a2d
+	         tests/lkvm-arm/Makefile
e10a2d
+	         tests/lx86/Makefile
e10a2d
+	         tests/lxc/Makefile
e10a2d
+	         tests/parallels-desktop/Makefile
e10a2d
+	         tests/ppc64-baremetal/Makefile
e10a2d
+	         tests/ppc64-kvm/Makefile
e10a2d
+	         tests/ppc64-lpar-dedicated/Makefile
e10a2d
+	         tests/ppc64-lpar-shared/Makefile
e10a2d
+	         tests/qemu/Makefile
e10a2d
+	         tests/qemu-arm/Makefile
e10a2d
+	         tests/qemu-smbios/Makefile
e10a2d
+	         tests/qemu-smbios-kvm/Makefile
e10a2d
+	         tests/rhel5-xen-dom0/Makefile
e10a2d
+	         tests/rhel5-xen-domU-hvm/Makefile
e10a2d
+	         tests/rhel5-xen-domU-hvm-ia64/Makefile
e10a2d
+	         tests/rhel5-xen-domU-pv/Makefile
e10a2d
+	         tests/rhev/Makefile
e10a2d
+	         tests/vmm/Makefile
e10a2d
+	         tests/xen-arm/Makefile
e10a2d
+	         tests/zvm/Makefile
e10a2d
+                 ])
e10a2d
 
e10a2d
 AC_CHECK_PROG([POD2MAN], [pod2man], [pod2man], [false])
e10a2d
 if test "$POD2MAN" = "false"; then
e10a2d
diff --git a/tests/Makefile.am b/tests/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..36bf918
e10a2d
--- /dev/null
e10a2d
+++ b/tests/Makefile.am
e10a2d
@@ -0,0 +1,20 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+SUBDIRS = $(tests)
e10a2d
diff --git a/tests/aws-baremetal-x86/Makefile.am b/tests/aws-baremetal-x86/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..b748df8
e10a2d
--- /dev/null
e10a2d
+++ b/tests/aws-baremetal-x86/Makefile.am
e10a2d
@@ -0,0 +1,28 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-aws-baremetal-x86.sh b/tests/aws-baremetal-x86/test.sh
e10a2d
similarity index 93%
e10a2d
rename from tests/test-aws-baremetal-x86.sh
e10a2d
rename to tests/aws-baremetal-x86/test.sh
e10a2d
index d456163..4a1e566 100755
e10a2d
--- a/tests/test-aws-baremetal-x86.sh
e10a2d
+++ b/tests/aws-baremetal-x86/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/aws-baremetal-x86
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="aws"
e10a2d
 
e10a2d
 if [ "$output" != "$expected" ]; then
e10a2d
diff --git a/tests/aws-kvm-arm/Makefile.am b/tests/aws-kvm-arm/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..b748df8
e10a2d
--- /dev/null
e10a2d
+++ b/tests/aws-kvm-arm/Makefile.am
e10a2d
@@ -0,0 +1,28 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-aws-kvm-arm.sh b/tests/aws-kvm-arm/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-aws-kvm-arm.sh
e10a2d
rename to tests/aws-kvm-arm/test.sh
e10a2d
index 8875421..5d31995 100755
e10a2d
--- a/tests/test-aws-kvm-arm.sh
e10a2d
+++ b/tests/aws-kvm-arm/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/aws-kvm-arm
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 # XXX At the moment KVM cannot be detected on this platform.
e10a2d
 # We hope to fix that, but for now the only fact printed is "aws".
e10a2d
 expected="aws"
e10a2d
diff --git a/tests/aws-kvm-x86/Makefile.am b/tests/aws-kvm-x86/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..b748df8
e10a2d
--- /dev/null
e10a2d
+++ b/tests/aws-kvm-x86/Makefile.am
e10a2d
@@ -0,0 +1,28 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-aws-kvm-x86.sh b/tests/aws-kvm-x86/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-aws-kvm-x86.sh
e10a2d
rename to tests/aws-kvm-x86/test.sh
e10a2d
index db4c19f..133ef13 100755
e10a2d
--- a/tests/test-aws-kvm-x86.sh
e10a2d
+++ b/tests/aws-kvm-x86/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/aws-kvm-x86
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="kvm
e10a2d
 aws"
e10a2d
 
e10a2d
diff --git a/tests/aws-xen-x86/Makefile.am b/tests/aws-xen-x86/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..b748df8
e10a2d
--- /dev/null
e10a2d
+++ b/tests/aws-xen-x86/Makefile.am
e10a2d
@@ -0,0 +1,28 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-aws-xen-x86.sh b/tests/aws-xen-x86/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-aws-xen-x86.sh
e10a2d
rename to tests/aws-xen-x86/test.sh
e10a2d
index 22b7f83..4ed4cde 100755
e10a2d
--- a/tests/test-aws-xen-x86.sh
e10a2d
+++ b/tests/aws-xen-x86/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/aws-xen-x86
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="xen
e10a2d
 xen-hvm
e10a2d
 aws"
e10a2d
diff --git a/tests/baremetal/Makefile.am b/tests/baremetal/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..b748df8
e10a2d
--- /dev/null
e10a2d
+++ b/tests/baremetal/Makefile.am
e10a2d
@@ -0,0 +1,28 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-baremetal.sh b/tests/baremetal/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-baremetal.sh
e10a2d
rename to tests/baremetal/test.sh
e10a2d
index 1ca4bcf..d4a0c3f 100755
e10a2d
--- a/tests/test-baremetal.sh
e10a2d
+++ b/tests/baremetal/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/baremetal
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected=""
e10a2d
 
e10a2d
 if [ "$output" != "$expected" ]; then
e10a2d
diff --git a/tests/bhyve/Makefile.am b/tests/bhyve/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..0198c8f
e10a2d
--- /dev/null
e10a2d
+++ b/tests/bhyve/Makefile.am
e10a2d
@@ -0,0 +1,27 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-bhyve.sh b/tests/bhyve/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-bhyve.sh
e10a2d
rename to tests/bhyve/test.sh
e10a2d
index a66b3b4..81cb9fe 100755
e10a2d
--- a/tests/test-bhyve.sh
e10a2d
+++ b/tests/bhyve/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/bhyve
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="bhyve"
e10a2d
 
e10a2d
 if [ "$output" != "$expected" ]; then
e10a2d
diff --git a/tests/docker/Makefile.am b/tests/docker/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..e0ea991
e10a2d
--- /dev/null
e10a2d
+++ b/tests/docker/Makefile.am
e10a2d
@@ -0,0 +1,29 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	.dockerinit \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-docker.sh b/tests/docker/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-docker.sh
e10a2d
rename to tests/docker/test.sh
e10a2d
index 4187f61..f09ad9f 100755
e10a2d
--- a/tests/test-docker.sh
e10a2d
+++ b/tests/docker/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/docker
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="docker"
e10a2d
 
e10a2d
 if [ "$output" != "$expected" ]; then
e10a2d
diff --git a/tests/esx4.1/Makefile.am b/tests/esx4.1/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..b748df8
e10a2d
--- /dev/null
e10a2d
+++ b/tests/esx4.1/Makefile.am
e10a2d
@@ -0,0 +1,28 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-esx4.1.sh b/tests/esx4.1/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-esx4.1.sh
e10a2d
rename to tests/esx4.1/test.sh
e10a2d
index 35c4e1d..0306a82 100755
e10a2d
--- a/tests/test-esx4.1.sh
e10a2d
+++ b/tests/esx4.1/test.sh
e10a2d
@@ -16,9 +16,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/esx4.1
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="vmware"
e10a2d
 
e10a2d
 if [ "$output" != "$expected" ]; then
e10a2d
diff --git a/tests/hyperv/Makefile.am b/tests/hyperv/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..b748df8
e10a2d
--- /dev/null
e10a2d
+++ b/tests/hyperv/Makefile.am
e10a2d
@@ -0,0 +1,28 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-hyperv.sh b/tests/hyperv/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-hyperv.sh
e10a2d
rename to tests/hyperv/test.sh
e10a2d
index 5015cc5..f84edf9 100755
e10a2d
--- a/tests/test-hyperv.sh
e10a2d
+++ b/tests/hyperv/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/hyperv
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="hyperv"
e10a2d
 
e10a2d
 if [ "$output" != "$expected" ]; then
e10a2d
diff --git a/tests/kvm-explicit-cpu/Makefile.am b/tests/kvm-explicit-cpu/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..b748df8
e10a2d
--- /dev/null
e10a2d
+++ b/tests/kvm-explicit-cpu/Makefile.am
e10a2d
@@ -0,0 +1,28 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-kvm-explicit-cpu.sh b/tests/kvm-explicit-cpu/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-kvm-explicit-cpu.sh
e10a2d
rename to tests/kvm-explicit-cpu/test.sh
e10a2d
index 7482b83..ba137c0 100755
e10a2d
--- a/tests/test-kvm-explicit-cpu.sh
e10a2d
+++ b/tests/kvm-explicit-cpu/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/kvm-explicit-cpu
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="kvm"
e10a2d
 
e10a2d
 if [ "$output" != "$expected" ]; then
e10a2d
diff --git a/tests/kvm/Makefile.am b/tests/kvm/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..b748df8
e10a2d
--- /dev/null
e10a2d
+++ b/tests/kvm/Makefile.am
e10a2d
@@ -0,0 +1,28 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-kvm.sh b/tests/kvm/test.sh
e10a2d
similarity index 95%
e10a2d
rename from tests/test-kvm.sh
e10a2d
rename to tests/kvm/test.sh
e10a2d
index 035e244..8315213 100755
e10a2d
--- a/tests/test-kvm.sh
e10a2d
+++ b/tests/kvm/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/kvm
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="kvm"
e10a2d
 
e10a2d
 if [ "$output" != "$expected" ]; then
e10a2d
diff --git a/tests/ldoms/Makefile.am b/tests/ldoms/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..45770aa
e10a2d
--- /dev/null
e10a2d
+++ b/tests/ldoms/Makefile.am
e10a2d
@@ -0,0 +1,28 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	dev/mdesc \
e10a2d
+	proc/cpuinfo \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-ldoms.sh b/tests/ldoms/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-ldoms.sh
e10a2d
rename to tests/ldoms/test.sh
e10a2d
index 6ae5aba..d911f08 100755
e10a2d
--- a/tests/test-ldoms.sh
e10a2d
+++ b/tests/ldoms/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/ldoms
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="ldoms
e10a2d
 ldoms-guest"
e10a2d
 
e10a2d
diff --git a/tests/linux-vserver/Makefile.am b/tests/linux-vserver/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..b748df8
e10a2d
--- /dev/null
e10a2d
+++ b/tests/linux-vserver/Makefile.am
e10a2d
@@ -0,0 +1,28 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-linux-vserver.sh b/tests/linux-vserver/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-linux-vserver.sh
e10a2d
rename to tests/linux-vserver/test.sh
e10a2d
index 7988f81..008e291 100755
e10a2d
--- a/tests/test-linux-vserver.sh
e10a2d
+++ b/tests/linux-vserver/test.sh
e10a2d
@@ -16,9 +16,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/linux-vserver
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="linux_vserver
e10a2d
 linux_vserver-guest"
e10a2d
 
e10a2d
diff --git a/tests/lkvm-arm/Makefile.am b/tests/lkvm-arm/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..5014fd4
e10a2d
--- /dev/null
e10a2d
+++ b/tests/lkvm-arm/Makefile.am
e10a2d
@@ -0,0 +1,29 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/device-tree/compatible \
e10a2d
+	proc/self/status \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-lkvm-arm.sh b/tests/lkvm-arm/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-lkvm-arm.sh
e10a2d
rename to tests/lkvm-arm/test.sh
e10a2d
index bed50ad..251db04 100755
e10a2d
--- a/tests/test-lkvm-arm.sh
e10a2d
+++ b/tests/lkvm-arm/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/lkvm-arm
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="lkvm"
e10a2d
 
e10a2d
 if [ "$output" != "$expected" ]; then
e10a2d
diff --git a/tests/lkvm/Makefile.am b/tests/lkvm/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..b748df8
e10a2d
--- /dev/null
e10a2d
+++ b/tests/lkvm/Makefile.am
e10a2d
@@ -0,0 +1,28 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-lkvm.sh b/tests/lkvm/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-lkvm.sh
e10a2d
rename to tests/lkvm/test.sh
e10a2d
index 6eb326c..79850e0 100755
e10a2d
--- a/tests/test-lkvm.sh
e10a2d
+++ b/tests/lkvm/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/lkvm
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="lkvm"
e10a2d
 
e10a2d
 if [ "$output" != "$expected" ]; then
e10a2d
diff --git a/tests/lx86/Makefile.am b/tests/lx86/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..b748df8
e10a2d
--- /dev/null
e10a2d
+++ b/tests/lx86/Makefile.am
e10a2d
@@ -0,0 +1,28 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-lx86.sh b/tests/lx86/test.sh
e10a2d
similarity index 95%
e10a2d
rename from tests/test-lx86.sh
e10a2d
rename to tests/lx86/test.sh
e10a2d
index 69d08a7..b3b1ccb 100755
e10a2d
--- a/tests/test-lx86.sh
e10a2d
+++ b/tests/lx86/test.sh
e10a2d
@@ -16,9 +16,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/lx86
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="powervm_lx86"
e10a2d
 
e10a2d
 if [ "$output" != "$expected" ]; then
e10a2d
diff --git a/tests/lxc/Makefile.am b/tests/lxc/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..59a2d70
e10a2d
--- /dev/null
e10a2d
+++ b/tests/lxc/Makefile.am
e10a2d
@@ -0,0 +1,29 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/1/environ \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-lxc.sh b/tests/lxc/test.sh
e10a2d
similarity index 95%
e10a2d
rename from tests/test-lxc.sh
e10a2d
rename to tests/lxc/test.sh
e10a2d
index 47a5f2b..c619de9 100755
e10a2d
--- a/tests/test-lxc.sh
e10a2d
+++ b/tests/lxc/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/lxc
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="lxc"
e10a2d
 
e10a2d
 if [ "$output" != "$expected" ]; then
e10a2d
diff --git a/tests/parallels-desktop/Makefile.am b/tests/parallels-desktop/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..b748df8
e10a2d
--- /dev/null
e10a2d
+++ b/tests/parallels-desktop/Makefile.am
e10a2d
@@ -0,0 +1,28 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-parallels-desktop.sh b/tests/parallels-desktop/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-parallels-desktop.sh
e10a2d
rename to tests/parallels-desktop/test.sh
e10a2d
index 20701fe..5585fec 100755
e10a2d
--- a/tests/test-parallels-desktop.sh
e10a2d
+++ b/tests/parallels-desktop/test.sh
e10a2d
@@ -16,9 +16,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/parallels-desktop
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="parallels"
e10a2d
 
e10a2d
 if [ "$output" != "$expected" ]; then
e10a2d
diff --git a/tests/ppc64-baremetal/Makefile.am b/tests/ppc64-baremetal/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..0198c8f
e10a2d
--- /dev/null
e10a2d
+++ b/tests/ppc64-baremetal/Makefile.am
e10a2d
@@ -0,0 +1,27 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-ppc64-baremetal.sh b/tests/ppc64-baremetal/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-ppc64-baremetal.sh
e10a2d
rename to tests/ppc64-baremetal/test.sh
e10a2d
index 9ca3cee..6687ce3 100755
e10a2d
--- a/tests/test-ppc64-baremetal.sh
e10a2d
+++ b/tests/ppc64-baremetal/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/ppc64-baremetal
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected=""
e10a2d
 
e10a2d
 if [ "$output" != "$expected" ]; then
e10a2d
diff --git a/tests/ppc64-kvm/Makefile.am b/tests/ppc64-kvm/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..b748df8
e10a2d
--- /dev/null
e10a2d
+++ b/tests/ppc64-kvm/Makefile.am
e10a2d
@@ -0,0 +1,28 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-ppc64-kvm.sh b/tests/ppc64-kvm/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-ppc64-kvm.sh
e10a2d
rename to tests/ppc64-kvm/test.sh
e10a2d
index c691c96..c0ece85 100755
e10a2d
--- a/tests/test-ppc64-kvm.sh
e10a2d
+++ b/tests/ppc64-kvm/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/ppc64-kvm
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="ibm_power-kvm"
e10a2d
 
e10a2d
 if [ "$output" != "$expected" ]; then
e10a2d
diff --git a/tests/ppc64-lpar-dedicated/Makefile.am b/tests/ppc64-lpar-dedicated/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..bfbe474
e10a2d
--- /dev/null
e10a2d
+++ b/tests/ppc64-lpar-dedicated/Makefile.am
e10a2d
@@ -0,0 +1,28 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/ppc64/lparcfg \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-ppc64-lpar-dedicated.sh b/tests/ppc64-lpar-dedicated/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-ppc64-lpar-dedicated.sh
e10a2d
rename to tests/ppc64-lpar-dedicated/test.sh
e10a2d
index 0316ea2..c51eafc 100755
e10a2d
--- a/tests/test-ppc64-lpar-dedicated.sh
e10a2d
+++ b/tests/ppc64-lpar-dedicated/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/ppc64-lpar-dedicated
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="ibm_power-lpar_dedicated"
e10a2d
 
e10a2d
 if [ "$output" != "$expected" ]; then
e10a2d
diff --git a/tests/ppc64-lpar-shared/Makefile.am b/tests/ppc64-lpar-shared/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..8f1f63f
e10a2d
--- /dev/null
e10a2d
+++ b/tests/ppc64-lpar-shared/Makefile.am
e10a2d
@@ -0,0 +1,29 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	proc/ppc64/lparcfg \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-ppc64-lpar-shared.sh b/tests/ppc64-lpar-shared/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-ppc64-lpar-shared.sh
e10a2d
rename to tests/ppc64-lpar-shared/test.sh
e10a2d
index bbc974a..cfa564e 100755
e10a2d
--- a/tests/test-ppc64-lpar-shared.sh
e10a2d
+++ b/tests/ppc64-lpar-shared/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/ppc64-lpar-shared
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="ibm_power-lpar_shared"
e10a2d
 
e10a2d
 if [ "$output" != "$expected" ]; then
e10a2d
diff --git a/tests/qemu-arm/Makefile.am b/tests/qemu-arm/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..4d8b02d
e10a2d
--- /dev/null
e10a2d
+++ b/tests/qemu-arm/Makefile.am
e10a2d
@@ -0,0 +1,29 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/device-tree/fw-cfg@9020000/compatible \
e10a2d
+	proc/self/status \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-qemu-arm.sh b/tests/qemu-arm/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-qemu-arm.sh
e10a2d
rename to tests/qemu-arm/test.sh
e10a2d
index 58455c8..a6d487e 100755
e10a2d
--- a/tests/test-qemu-arm.sh
e10a2d
+++ b/tests/qemu-arm/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/qemu-arm
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="qemu"
e10a2d
 
e10a2d
 if [ "$output" != "$expected" ]; then
e10a2d
diff --git a/tests/qemu-smbios-kvm/Makefile.am b/tests/qemu-smbios-kvm/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..b748df8
e10a2d
--- /dev/null
e10a2d
+++ b/tests/qemu-smbios-kvm/Makefile.am
e10a2d
@@ -0,0 +1,28 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-qemu-smbios-kvm.sh b/tests/qemu-smbios-kvm/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-qemu-smbios-kvm.sh
e10a2d
rename to tests/qemu-smbios-kvm/test.sh
e10a2d
index f4d8e38..04e291e 100755
e10a2d
--- a/tests/test-qemu-smbios-kvm.sh
e10a2d
+++ b/tests/qemu-smbios-kvm/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/qemu-smbios-kvm
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="kvm"
e10a2d
 
e10a2d
 if [ "$output" != "$expected" ]; then
e10a2d
diff --git a/tests/qemu-smbios/Makefile.am b/tests/qemu-smbios/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..b748df8
e10a2d
--- /dev/null
e10a2d
+++ b/tests/qemu-smbios/Makefile.am
e10a2d
@@ -0,0 +1,28 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-qemu-smbios.sh b/tests/qemu-smbios/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-qemu-smbios.sh
e10a2d
rename to tests/qemu-smbios/test.sh
e10a2d
index 114470a..a6d487e 100755
e10a2d
--- a/tests/test-qemu-smbios.sh
e10a2d
+++ b/tests/qemu-smbios/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/qemu-smbios
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="qemu"
e10a2d
 
e10a2d
 if [ "$output" != "$expected" ]; then
e10a2d
diff --git a/tests/qemu/Makefile.am b/tests/qemu/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..b748df8
e10a2d
--- /dev/null
e10a2d
+++ b/tests/qemu/Makefile.am
e10a2d
@@ -0,0 +1,28 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-qemu.sh b/tests/qemu/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-qemu.sh
e10a2d
rename to tests/qemu/test.sh
e10a2d
index 284fe41..6691307 100755
e10a2d
--- a/tests/test-qemu.sh
e10a2d
+++ b/tests/qemu/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/qemu
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="qemu"
e10a2d
 
e10a2d
 if [ "$output" != "$expected" ]; then
e10a2d
diff --git a/tests/rhel5-xen-dom0/Makefile.am b/tests/rhel5-xen-dom0/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..12e9835
e10a2d
--- /dev/null
e10a2d
+++ b/tests/rhel5-xen-dom0/Makefile.am
e10a2d
@@ -0,0 +1,48 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	proc/xen/balloon \
e10a2d
+	proc/xen/capabilities \
e10a2d
+	proc/xen/privcmd \
e10a2d
+	proc/xen/xenbus \
e10a2d
+	proc/xen/xsd_kva \
e10a2d
+	proc/xen/xsd_port \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper \
e10a2d
+	sys/hypervisor/properties/pagesize \
e10a2d
+	sys/hypervisor/properties/changeset \
e10a2d
+	sys/hypervisor/properties/virtual_start \
e10a2d
+	sys/hypervisor/properties/capabilities \
e10a2d
+	sys/hypervisor/properties/writable_pt \
e10a2d
+	sys/hypervisor/type \
e10a2d
+	sys/hypervisor/vmcoreinfo \
e10a2d
+	sys/hypervisor/version/minor \
e10a2d
+	sys/hypervisor/version/major \
e10a2d
+	sys/hypervisor/version/extra \
e10a2d
+	sys/hypervisor/compilation/compiler \
e10a2d
+	sys/hypervisor/compilation/compiled_by \
e10a2d
+	sys/hypervisor/compilation/compile_date \
e10a2d
+	sys/hypervisor/uuid
e10a2d
diff --git a/tests/test-rhel5-xen-dom0.sh b/tests/rhel5-xen-dom0/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-rhel5-xen-dom0.sh
e10a2d
rename to tests/rhel5-xen-dom0/test.sh
e10a2d
index 6571ecd..0d3297a 100755
e10a2d
--- a/tests/test-rhel5-xen-dom0.sh
e10a2d
+++ b/tests/rhel5-xen-dom0/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/rhel5-xen-dom0
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="xen
e10a2d
 xen-dom0"
e10a2d
 
e10a2d
diff --git a/tests/rhel5-xen-domU-hvm-ia64/Makefile.am b/tests/rhel5-xen-domU-hvm-ia64/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..48d7662
e10a2d
--- /dev/null
e10a2d
+++ b/tests/rhel5-xen-domU-hvm-ia64/Makefile.am
e10a2d
@@ -0,0 +1,33 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper \
e10a2d
+	sys/bus/xen/drivers/vbd/bind \
e10a2d
+	sys/bus/xen/drivers/vbd/unbind \
e10a2d
+	sys/bus/xen/drivers/vif/bind \
e10a2d
+	sys/bus/xen/drivers/vif/unbind \
e10a2d
+	sys/bus/xen/drivers_probe
e10a2d
diff --git a/tests/test-rhel5-xen-domU-hvm-ia64.sh b/tests/rhel5-xen-domU-hvm-ia64/test.sh
e10a2d
similarity index 93%
e10a2d
rename from tests/test-rhel5-xen-domU-hvm-ia64.sh
e10a2d
rename to tests/rhel5-xen-domU-hvm-ia64/test.sh
e10a2d
index 5f29c1b..7f84a5c 100755
e10a2d
--- a/tests/test-rhel5-xen-domU-hvm-ia64.sh
e10a2d
+++ b/tests/rhel5-xen-domU-hvm-ia64/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/rhel5-xen-domU-hvm-ia64
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="xen
e10a2d
 xen-hvm"
e10a2d
 
e10a2d
diff --git a/tests/rhel5-xen-domU-hvm/Makefile.am b/tests/rhel5-xen-domU-hvm/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..b748df8
e10a2d
--- /dev/null
e10a2d
+++ b/tests/rhel5-xen-domU-hvm/Makefile.am
e10a2d
@@ -0,0 +1,28 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-rhel5-xen-domU-hvm.sh b/tests/rhel5-xen-domU-hvm/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-rhel5-xen-domU-hvm.sh
e10a2d
rename to tests/rhel5-xen-domU-hvm/test.sh
e10a2d
index 593fdb7..627de55 100755
e10a2d
--- a/tests/test-rhel5-xen-domU-hvm.sh
e10a2d
+++ b/tests/rhel5-xen-domU-hvm/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/rhel5-xen-domU-hvm
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="xen
e10a2d
 xen-hvm"
e10a2d
 
e10a2d
diff --git a/tests/rhel5-xen-domU-pv/Makefile.am b/tests/rhel5-xen-domU-pv/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..4eeb69b
e10a2d
--- /dev/null
e10a2d
+++ b/tests/rhel5-xen-domU-pv/Makefile.am
e10a2d
@@ -0,0 +1,46 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	proc/xen/balloon \
e10a2d
+	proc/xen/capabilities \
e10a2d
+	proc/xen/privcmd \
e10a2d
+	proc/xen/xenbus \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper \
e10a2d
+	sys/hypervisor/properties/pagesize \
e10a2d
+	sys/hypervisor/properties/changeset \
e10a2d
+	sys/hypervisor/properties/virtual_start \
e10a2d
+	sys/hypervisor/properties/capabilities \
e10a2d
+	sys/hypervisor/properties/writable_pt \
e10a2d
+	sys/hypervisor/type \
e10a2d
+	sys/hypervisor/vmcoreinfo \
e10a2d
+	sys/hypervisor/version/minor \
e10a2d
+	sys/hypervisor/version/major \
e10a2d
+	sys/hypervisor/version/extra \
e10a2d
+	sys/hypervisor/compilation/compiler \
e10a2d
+	sys/hypervisor/compilation/compiled_by \
e10a2d
+	sys/hypervisor/compilation/compile_date \
e10a2d
+	sys/hypervisor/uuid
e10a2d
diff --git a/tests/test-rhel5-xen-domU-pv.sh b/tests/rhel5-xen-domU-pv/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-rhel5-xen-domU-pv.sh
e10a2d
rename to tests/rhel5-xen-domU-pv/test.sh
e10a2d
index 6561605..a3b9472 100755
e10a2d
--- a/tests/test-rhel5-xen-domU-pv.sh
e10a2d
+++ b/tests/rhel5-xen-domU-pv/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/rhel5-xen-domU-pv
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="xen
e10a2d
 xen-domU"
e10a2d
 
e10a2d
diff --git a/tests/rhev/Makefile.am b/tests/rhev/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..b748df8
e10a2d
--- /dev/null
e10a2d
+++ b/tests/rhev/Makefile.am
e10a2d
@@ -0,0 +1,28 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-rhev.sh b/tests/rhev/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-rhev.sh
e10a2d
rename to tests/rhev/test.sh
e10a2d
index 76be547..7d9c22f 100755
e10a2d
--- a/tests/test-rhev.sh
e10a2d
+++ b/tests/rhev/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/rhev
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="rhev
e10a2d
 kvm"
e10a2d
 
e10a2d
diff --git a/tests/vmm/Makefile.am b/tests/vmm/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..0198c8f
e10a2d
--- /dev/null
e10a2d
+++ b/tests/vmm/Makefile.am
e10a2d
@@ -0,0 +1,27 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-vmm.sh b/tests/vmm/test.sh
e10a2d
similarity index 95%
e10a2d
rename from tests/test-vmm.sh
e10a2d
rename to tests/vmm/test.sh
e10a2d
index e1de60a..56c3b0e 100755
e10a2d
--- a/tests/test-vmm.sh
e10a2d
+++ b/tests/vmm/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/vmm
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="vmm"
e10a2d
 
e10a2d
 if [ "$output" != "$expected" ]; then
e10a2d
diff --git a/tests/xen-arm/Makefile.am b/tests/xen-arm/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..acf118a
e10a2d
--- /dev/null
e10a2d
+++ b/tests/xen-arm/Makefile.am
e10a2d
@@ -0,0 +1,29 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/device-tree/hypervisor/compatible \
e10a2d
+	proc/self/status \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-xen-arm.sh b/tests/xen-arm/test.sh
e10a2d
similarity index 94%
e10a2d
rename from tests/test-xen-arm.sh
e10a2d
rename to tests/xen-arm/test.sh
e10a2d
index 209712e..a4c2599 100755
e10a2d
--- a/tests/test-xen-arm.sh
e10a2d
+++ b/tests/xen-arm/test.sh
e10a2d
@@ -15,9 +15,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/xen-arm
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="xen"
e10a2d
 
e10a2d
 if [ "$output" != "$expected" ]; then
e10a2d
diff --git a/tests/zvm/Makefile.am b/tests/zvm/Makefile.am
e10a2d
new file mode 100644
e10a2d
index 0000000..951274b
e10a2d
--- /dev/null
e10a2d
+++ b/tests/zvm/Makefile.am
e10a2d
@@ -0,0 +1,29 @@
e10a2d
+# Makefile for virt-what
e10a2d
+# Copyright (C) 2008-2011 Red Hat Inc.
e10a2d
+#
e10a2d
+# This program is free software; you can redistribute it and/or modify
e10a2d
+# it under the terms of the GNU General Public License as published by
e10a2d
+# the Free Software Foundation; either version 2 of the License, or
e10a2d
+# (at your option) any later version.
e10a2d
+#
e10a2d
+# This program is distributed in the hope that it will be useful,
e10a2d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e10a2d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e10a2d
+# GNU General Public License for more details.
e10a2d
+#
e10a2d
+# You should have received a copy of the GNU General Public License
e10a2d
+# along with this program; if not, write to the Free Software
e10a2d
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
+
e10a2d
+CLEANFILES = *~
e10a2d
+
e10a2d
+TESTS = test.sh
e10a2d
+
e10a2d
+EXTRA_DIST = \
e10a2d
+	test.sh \
e10a2d
+	proc/cpuinfo \
e10a2d
+	proc/self/status \
e10a2d
+	proc/sysinfo \
e10a2d
+	sbin/dmidecode \
e10a2d
+	sbin/uname \
e10a2d
+	sbin/virt-what-cpuid-helper
e10a2d
diff --git a/tests/test-zvm.sh b/tests/zvm/test.sh
e10a2d
similarity index 95%
e10a2d
rename from tests/test-zvm.sh
e10a2d
rename to tests/zvm/test.sh
e10a2d
index 0620db0..a22f311 100755
e10a2d
--- a/tests/test-zvm.sh
e10a2d
+++ b/tests/zvm/test.sh
e10a2d
@@ -16,9 +16,7 @@
e10a2d
 # along with this program; if not, write to the Free Software
e10a2d
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
e10a2d
 
e10a2d
-root=tests/zvm
e10a2d
-
e10a2d
-output="$(./virt-what --test-root=$root 2>&1)"
e10a2d
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
e10a2d
 expected="ibm_systemz
e10a2d
 ibm_systemz-zvm"
e10a2d
 
e10a2d
-- 
e10a2d
2.23.0
e10a2d