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

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