aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xm-test
diff options
context:
space:
mode:
authorEwan Mellor <ewan@xensource.com>2006-10-24 14:47:17 +0100
committerEwan Mellor <ewan@xensource.com>2006-10-24 14:47:17 +0100
commitd2e25ca823455d96c44b144ca9b7c4513259f096 (patch)
tree56871ab480bc1e80f366182b573416a39fe1f2cf /tools/xm-test
parent84673101106dbf613a51138ed05872f0b75c4487 (diff)
downloadxen-d2e25ca823455d96c44b144ca9b7c4513259f096.tar.gz
xen-d2e25ca823455d96c44b144ca9b7c4513259f096.tar.bz2
xen-d2e25ca823455d96c44b144ca9b7c4513259f096.zip
Added multiarch support to xm-test. Bumped version number to xm-test 1.0.
New README for public ramdisks. Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools/xm-test')
-rw-r--r--tools/xm-test/README4
-rw-r--r--tools/xm-test/configure.ac4
-rw-r--r--tools/xm-test/ramdisk/Makefile.am36
-rw-r--r--tools/xm-test/ramdisk/README-XenSource-initrd-1.0-img45
-rwxr-xr-xtools/xm-test/runtest.sh6
5 files changed, 82 insertions, 13 deletions
diff --git a/tools/xm-test/README b/tools/xm-test/README
index 22a07c4012..9157f7681d 100644
--- a/tools/xm-test/README
+++ b/tools/xm-test/README
@@ -45,7 +45,7 @@ special files, this process must be done as root:
NB: If you have the initrd.img from another installation of xm-test,
you can copy it into the ramdisk directory to eliminate the need to
rebuild it. If you do this, there is no need to run 'make' again.
-Simply copy the initrd-X.Y.img file into ramdisk/ and then run:
+Simply copy the initrd-X.Y-ARCH.img file into ramdisk/ and then run:
# make existing
@@ -53,7 +53,7 @@ Or, you can run:
# INITRD="http://url.of.initrd.repo/" make existing
You do not need to include the name of the image itself in the url,
-however, an initrd with the right name (initrd.X.Y.img) and version
+however, an initrd with the right name (initrd.X.Y-ARCH.img) and version
number must exist at that location. The script will determine which
version of the initrd it needs and try to download the right file from
that location.
diff --git a/tools/xm-test/configure.ac b/tools/xm-test/configure.ac
index 10091cc964..7eeeb76eab 100644
--- a/tools/xm-test/configure.ac
+++ b/tools/xm-test/configure.ac
@@ -1,9 +1,11 @@
# xm-test configure.ac input script
# Basic header information
-AC_INIT([xm-test], [0.8.0])
+AC_INIT([xm-test], [1.0.0])
AM_INIT_AUTOMAKE([1.7 foreign])
+MK=''; AC_SUBST(MK)
+
# Check for dependencies
AC_PROG_CC
#AC_PROG_INSTALL
diff --git a/tools/xm-test/ramdisk/Makefile.am b/tools/xm-test/ramdisk/Makefile.am
index b5aca14d85..dd7f5ec058 100644
--- a/tools/xm-test/ramdisk/Makefile.am
+++ b/tools/xm-test/ramdisk/Makefile.am
@@ -1,19 +1,39 @@
+#
+# make existing:
+#
+# Download a pre-built ramdisk.
+# INITRD = <Directory to download ramdisk from>
+#
+# make initrd:
+#
+# Make a ramdisk from scratch.
+# BR_URL = <The URL of the Buildroot source code>
+# BR_SNAPSHOT = 1 Set BR_URL to the upstream Buildroot daily snapshot.
+# BR_ARCH = <The build architecture for the initrd>
+#
+
INITRD ?= http://xm-test.xensource.com/ramdisks
-EXTRA_DIST = skel configs patches
+BR_ARCH ?= $(shell uname -m | sed -e s/i.86/i386/ -e 's/ppc\(64\)*/powerpc/')
+
+@MK@ifdef BR_SNAPSHOT
+ BR_URL = http://buildroot.uclibc.org/downloads/snapshots/buildroot-snapshot.tar.bz2
+@MK@else
+ BR_URL ?= http://xm-test.xensource.com/ramdisks/buildroot-20061023.tar.bz2
+@MK@endif
+BR_TAR = $(notdir $(BR_URL))
-BR_TAR = buildroot-20060606.tar.bz2
-BR_URL = http://buildroot.uclibc.org/downloads/snapshots/$(BR_TAR)
-#BR_URL = http://buildroot.uclibc.org/downloads/snapshots/buildroot-snapshot.tar.bz2
BR_SRC = buildroot
-BR_IMG = $(BR_SRC)/rootfs.i386.ext2
+BR_IMG = $(BR_SRC)/rootfs.$(BR_ARCH).ext2
-BR_ROOT = build_i386/root
+BR_ROOT = build_$(BR_ARCH)/root
+
+EXTRA_DIST = skel configs patches
HVM_SCRIPT = bin/create_disk_image
XMTEST_MAJ_VER = $(shell echo @PACKAGE_VERSION@ | perl -pe 's/(\d+)\.(\d+)\.\d+/\1.\2/')
-XMTEST_VER_IMG = initrd-$(XMTEST_MAJ_VER).img
+XMTEST_VER_IMG = initrd-$(XMTEST_MAJ_VER)-$(BR_ARCH).img
EXTRA_ROOT_DIRS = sys
@@ -42,7 +62,7 @@ $(XMTEST_VER_IMG): $(BR_IMG)
(cd skel; mkdir -p $(EXTRA_ROOT_DIRS); tar cf - .) \
| (cd $(BR_SRC)/$(BR_ROOT); tar xvf -)
cd $(BR_SRC) && make
- cp $(BR_IMG) initrd-$(XMTEST_MAJ_VER).img
+ cp $(BR_IMG) $(XMTEST_VER_IMG)
initrd.img: $(XMTEST_VER_IMG)
ln -sf $(XMTEST_VER_IMG) initrd.img
diff --git a/tools/xm-test/ramdisk/README-XenSource-initrd-1.0-img b/tools/xm-test/ramdisk/README-XenSource-initrd-1.0-img
new file mode 100644
index 0000000000..a77476a4a6
--- /dev/null
+++ b/tools/xm-test/ramdisk/README-XenSource-initrd-1.0-img
@@ -0,0 +1,45 @@
+XenSource xm-test 1.0 initrds
+=============================
+
+http://xm-test.xensource.com/ramdisks/initrd-1.0-i386.img and
+http://xm-test.xensource.com/ramdisks/initrd-1.0-powerpc.img are initrds
+suitable for use with Xen's xm-test regression testing suite. They has been
+built and provided by XenSource, for the convenience of Xen users. xm-test
+initrds may be mixed across minor xm-test versions, but not across major
+versions; this initrd is suitable for all 1.0.x versions of xm-test (as
+shipped with Xen 3.0.4 and the unstable tree leading up to that release).
+
+In order to use one of these initrds, run "./autogen; ./configure; make
+existing" inside the xm-test directory, and the appropriate initrd for your
+architecture will be downloaded automatically. Alternatively, if you have
+already downloaded that file, place it into the xm-test/ramdisk directory and
+run the same command. In either case, runtest.sh can then be used as normal.
+See xm-test/README for more details.
+
+These initrds were built using the infrastructure provided by xm-test. Each
+is a full guest operating system and filesystem, and as such includes a large
+number of pieces of software. The source code for the majority of these are
+included in full inside the file
+http://xm-test.xensource.com/ramdisks/<INITRD>-buildroot.tar.bz2, where
+<INITRD> is either initrd-1.0-i386 or initrd-1.0-powerpc as appropriate, or
+alongside this file. Copyright statements and licences are contained therein.
+The remaining source code is included in the Xen distribution, at
+http://www.xensource.com/xen/downloads/archives.html. The configurations used
+for BusyBox, uClibc, and Buildroot are available as
+http://xm-test.xensource.com/ramdisks/<INITRD>-busybox-config,
+http://xm-test.xensource.com/ramdisks/<INITRD>-uClibc-config, and
+http://xm-test.xensource.com/ramdisks/<INITRD>-buildroot-config respectively,
+or alongside this file.
+
+XenSource and the Xen contributors are grateful to the authors of these
+software packages for their contributions to free and open-source software.
+
+
+Buildroot and BusyBox are Copyright (c) Erik Andersen <andersen@codepoet.org>.
+BusyBox is licensed under the GNU General Public License (GPL). A copy of
+this license is available in the file GPL-2,
+http://xm-test.xensource.com/ramdisks/GPL-2, or alongside this file.
+
+uClibc is licensed under the GNU Lesser General Public License (LGPL). A copy
+of this license is available in the file
+http://xm-test.xensource.com/ramdisks/LGPL-2, or alongside this file.
diff --git a/tools/xm-test/runtest.sh b/tools/xm-test/runtest.sh
index 2bcc46110f..623598cd20 100755
--- a/tools/xm-test/runtest.sh
+++ b/tools/xm-test/runtest.sh
@@ -76,9 +76,11 @@ runnable_tests() {
# using the right version
realrd=$(readlink ramdisk/initrd.img)
eval $(./lib/XmTestReport/xmtest.py)
- rrdver="initrd-${XM_TEST_MAJ}.${XM_TEST_MIN}.img"
+ ARCH=$(uname -m | sed -e s/i.86/i386/ -e 's/ppc\(64\)*/powerpc/')
+ rrdver="initrd-${XM_TEST_MAJ}.${XM_TEST_MIN}-${ARCH}.img"
if [ "$realrd" != "$rrdver" ]; then
- echo "Error: ramdisk/initrd.img is from an old version"
+ echo "Error: ramdisk/initrd.img is from an old version, or is not for this "
+ echo "architecture ($ARCH)."
echo "You need to build a ramdisk from at least ${XM_TEST_MAJ}.${XM_TEST_MIN}"
exit 1
fi