1 # (C) Copyright IBM Corp. 2006 2 # Author: Paul Larson <pl (at] us.ibm.com> 3 # Description: 4 # Autotest script for running Xen xm-test 5 # This should be run from a Xen domain0 6 import os 7 from autotest_lib.client.bin import test, utils 8 9 10 class xmtest(test.test): 11 version = 1 12 13 def initialize(self): 14 self.job.require_gcc() 15 16 17 # This test expects just the xm-test directory, as a tarball 18 # from the Xen source tree 19 # hg clone http://xenbits.xensource.com/xen-unstable.hg 20 # or wget http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/xen-unstable-src.tgz 21 # cd tools 22 # tar -czf xm-test.tgz xm-test 23 def setup(self, tarball = 'xm-test.tar.bz2'): 24 tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) 25 utils.extract_tarball_to_dir(tarball, self.srcdir) 26 os.chdir(self.srcdir) 27 28 utils.system('./autogen') 29 utils.configure() 30 utils.make('existing') 31 32 33 def execute(self, args = ''): 34 os.chdir(self.srcdir) 35 utils.system('./runtest.sh ' + args) 36 utils.system('mv xmtest.* ' + self.resultsdir) 37