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