ia64/xen-unstable

changeset 11957:e6b48aabee3e

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>
author Ewan Mellor <ewan@xensource.com>
date Tue Oct 24 14:47:17 2006 +0100 (2006-10-24)
parents 63d01f8f2a4d
children 2c29a2e42937
files tools/xm-test/README tools/xm-test/configure.ac tools/xm-test/ramdisk/Makefile.am tools/xm-test/ramdisk/README-XenSource-initrd-1.0-img tools/xm-test/runtest.sh
line diff
     1.1 --- a/tools/xm-test/README	Tue Oct 24 14:46:23 2006 +0100
     1.2 +++ b/tools/xm-test/README	Tue Oct 24 14:47:17 2006 +0100
     1.3 @@ -45,7 +45,7 @@ special files, this process must be done
     1.4  NB: If you have the initrd.img from another installation of xm-test,
     1.5  you can copy it into the ramdisk directory to eliminate the need to
     1.6  rebuild it.  If you do this, there is no need to run 'make' again.
     1.7 -Simply copy the initrd-X.Y.img file into ramdisk/ and then run:
     1.8 +Simply copy the initrd-X.Y-ARCH.img file into ramdisk/ and then run:
     1.9  
    1.10     # make existing
    1.11  
    1.12 @@ -53,7 +53,7 @@ Or, you can run:
    1.13     # INITRD="http://url.of.initrd.repo/" make existing
    1.14  
    1.15  You do not need to include the name of the image itself in the url, 
    1.16 -however, an initrd with the right name (initrd.X.Y.img) and version 
    1.17 +however, an initrd with the right name (initrd.X.Y-ARCH.img) and version 
    1.18  number must exist at that location.  The script will determine which 
    1.19  version of the initrd it needs and try to download the right file from 
    1.20  that location.
     2.1 --- a/tools/xm-test/configure.ac	Tue Oct 24 14:46:23 2006 +0100
     2.2 +++ b/tools/xm-test/configure.ac	Tue Oct 24 14:47:17 2006 +0100
     2.3 @@ -1,9 +1,11 @@
     2.4  # xm-test configure.ac input script
     2.5  
     2.6  # Basic header information
     2.7 -AC_INIT([xm-test], [0.8.0])
     2.8 +AC_INIT([xm-test], [1.0.0])
     2.9  AM_INIT_AUTOMAKE([1.7 foreign])
    2.10  
    2.11 +MK=''; AC_SUBST(MK)
    2.12 +
    2.13  # Check for dependencies
    2.14  AC_PROG_CC
    2.15  #AC_PROG_INSTALL
     3.1 --- a/tools/xm-test/ramdisk/Makefile.am	Tue Oct 24 14:46:23 2006 +0100
     3.2 +++ b/tools/xm-test/ramdisk/Makefile.am	Tue Oct 24 14:47:17 2006 +0100
     3.3 @@ -1,19 +1,39 @@
     3.4 +#
     3.5 +# make existing:
     3.6 +#
     3.7 +#   Download a pre-built ramdisk.
     3.8 +#     INITRD = <Directory to download ramdisk from>
     3.9 +#
    3.10 +# make initrd:
    3.11 +#
    3.12 +#   Make a ramdisk from scratch.
    3.13 +#     BR_URL = <The URL of the Buildroot source code>
    3.14 +#     BR_SNAPSHOT = 1  Set BR_URL to the upstream Buildroot daily snapshot.
    3.15 +#     BR_ARCH = <The build architecture for the initrd>
    3.16 +#
    3.17 +
    3.18  INITRD ?= http://xm-test.xensource.com/ramdisks
    3.19  
    3.20 +BR_ARCH ?= $(shell uname -m | sed -e s/i.86/i386/ -e 's/ppc\(64\)*/powerpc/')
    3.21 +
    3.22 +@MK@ifdef BR_SNAPSHOT
    3.23 +  BR_URL = http://buildroot.uclibc.org/downloads/snapshots/buildroot-snapshot.tar.bz2
    3.24 +@MK@else
    3.25 +  BR_URL ?= http://xm-test.xensource.com/ramdisks/buildroot-20061023.tar.bz2
    3.26 +@MK@endif
    3.27 +BR_TAR = $(notdir $(BR_URL))
    3.28 +
    3.29 +BR_SRC = buildroot
    3.30 +BR_IMG = $(BR_SRC)/rootfs.$(BR_ARCH).ext2
    3.31 +
    3.32 +BR_ROOT = build_$(BR_ARCH)/root
    3.33 +
    3.34  EXTRA_DIST = skel configs patches
    3.35  
    3.36 -BR_TAR = buildroot-20060606.tar.bz2
    3.37 -BR_URL = http://buildroot.uclibc.org/downloads/snapshots/$(BR_TAR)
    3.38 -#BR_URL = http://buildroot.uclibc.org/downloads/snapshots/buildroot-snapshot.tar.bz2
    3.39 -BR_SRC = buildroot
    3.40 -BR_IMG = $(BR_SRC)/rootfs.i386.ext2
    3.41 -
    3.42 -BR_ROOT = build_i386/root
    3.43 -
    3.44  HVM_SCRIPT = bin/create_disk_image
    3.45  
    3.46  XMTEST_MAJ_VER = $(shell echo @PACKAGE_VERSION@ | perl -pe 's/(\d+)\.(\d+)\.\d+/\1.\2/')
    3.47 -XMTEST_VER_IMG = initrd-$(XMTEST_MAJ_VER).img
    3.48 +XMTEST_VER_IMG = initrd-$(XMTEST_MAJ_VER)-$(BR_ARCH).img
    3.49  
    3.50  EXTRA_ROOT_DIRS = sys
    3.51  
    3.52 @@ -42,7 +62,7 @@ endif
    3.53  	(cd skel; mkdir -p $(EXTRA_ROOT_DIRS); tar cf - .) \
    3.54  		| (cd $(BR_SRC)/$(BR_ROOT); tar xvf -)
    3.55  	cd $(BR_SRC) && make
    3.56 -	cp $(BR_IMG) initrd-$(XMTEST_MAJ_VER).img
    3.57 +	cp $(BR_IMG) $(XMTEST_VER_IMG)
    3.58  
    3.59  initrd.img: $(XMTEST_VER_IMG)
    3.60  	ln -sf $(XMTEST_VER_IMG) initrd.img
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/tools/xm-test/ramdisk/README-XenSource-initrd-1.0-img	Tue Oct 24 14:47:17 2006 +0100
     4.3 @@ -0,0 +1,45 @@
     4.4 +XenSource xm-test 1.0 initrds
     4.5 +=============================
     4.6 +
     4.7 +http://xm-test.xensource.com/ramdisks/initrd-1.0-i386.img and
     4.8 +http://xm-test.xensource.com/ramdisks/initrd-1.0-powerpc.img are initrds
     4.9 +suitable for use with Xen's xm-test regression testing suite.  They has been
    4.10 +built and provided by XenSource, for the convenience of Xen users.  xm-test
    4.11 +initrds may be mixed across minor xm-test versions, but not across major
    4.12 +versions; this initrd is suitable for all 1.0.x versions of xm-test (as
    4.13 +shipped with Xen 3.0.4 and the unstable tree leading up to that release).
    4.14 +
    4.15 +In order to use one of these initrds, run "./autogen; ./configure; make
    4.16 +existing" inside the xm-test directory, and the appropriate initrd for your
    4.17 +architecture will be downloaded automatically.  Alternatively, if you have
    4.18 +already downloaded that file, place it into the xm-test/ramdisk directory and
    4.19 +run the same command.  In either case, runtest.sh can then be used as normal.
    4.20 +See xm-test/README for more details.
    4.21 +
    4.22 +These initrds were built using the infrastructure provided by xm-test.  Each
    4.23 +is a full guest operating system and filesystem, and as such includes a large
    4.24 +number of pieces of software.  The source code for the majority of these are
    4.25 +included in full inside the file
    4.26 +http://xm-test.xensource.com/ramdisks/<INITRD>-buildroot.tar.bz2, where
    4.27 +<INITRD> is either initrd-1.0-i386 or initrd-1.0-powerpc as appropriate, or
    4.28 +alongside this file.  Copyright statements and licences are contained therein.
    4.29 +The remaining source code is included in the Xen distribution, at
    4.30 +http://www.xensource.com/xen/downloads/archives.html.  The configurations used
    4.31 +for BusyBox, uClibc, and Buildroot are available as
    4.32 +http://xm-test.xensource.com/ramdisks/<INITRD>-busybox-config,
    4.33 +http://xm-test.xensource.com/ramdisks/<INITRD>-uClibc-config, and
    4.34 +http://xm-test.xensource.com/ramdisks/<INITRD>-buildroot-config respectively,
    4.35 +or alongside this file.
    4.36 +
    4.37 +XenSource and the Xen contributors are grateful to the authors of these
    4.38 +software packages for their contributions to free and open-source software.
    4.39 +
    4.40 +
    4.41 +Buildroot and BusyBox are Copyright (c) Erik Andersen <andersen@codepoet.org>.
    4.42 +BusyBox is licensed under the GNU General Public License (GPL).  A copy of
    4.43 +this license is available in the file GPL-2,
    4.44 +http://xm-test.xensource.com/ramdisks/GPL-2, or alongside this file.
    4.45 +
    4.46 +uClibc is licensed under the GNU Lesser General Public License (LGPL).  A copy
    4.47 +of this license is available in the file
    4.48 +http://xm-test.xensource.com/ramdisks/LGPL-2, or alongside this file.
     5.1 --- a/tools/xm-test/runtest.sh	Tue Oct 24 14:46:23 2006 +0100
     5.2 +++ b/tools/xm-test/runtest.sh	Tue Oct 24 14:47:17 2006 +0100
     5.3 @@ -76,9 +76,11 @@ runnable_tests() {
     5.4      # using the right version
     5.5      realrd=$(readlink ramdisk/initrd.img)
     5.6      eval $(./lib/XmTestReport/xmtest.py)
     5.7 -    rrdver="initrd-${XM_TEST_MAJ}.${XM_TEST_MIN}.img"
     5.8 +    ARCH=$(uname -m | sed -e s/i.86/i386/ -e 's/ppc\(64\)*/powerpc/')
     5.9 +    rrdver="initrd-${XM_TEST_MAJ}.${XM_TEST_MIN}-${ARCH}.img"
    5.10      if [ "$realrd" != "$rrdver" ]; then
    5.11 -	echo "Error: ramdisk/initrd.img is from an old version"
    5.12 +	echo "Error: ramdisk/initrd.img is from an old version, or is not for this "
    5.13 +        echo "architecture ($ARCH)."
    5.14  	echo "You need to build a ramdisk from at least ${XM_TEST_MAJ}.${XM_TEST_MIN}"
    5.15  	exit 1
    5.16      fi