Home | History | Annotate | Download | only in samples
      1 AUTHOR = "Autotest Team <autotest (a] test.kernel.org>"
      2 TIME = 'MEDIUM'
      3 NAME = "Sample - Xen Build"
      4 TEST_TYPE = "client"
      5 TEST_CLASS = "Kernel"
      6 
      7 DOC = """
      8 this is a sample job to build xen and kernel with xen patches.
      9 The xen unstable tarball comes with scripts that will automatically
     10 patch a linux kernel, however, in some cases, PPC for example, the
     11 kernel is built from a seperate source.  The xen class supports
     12 defining your own kernel job, and handing that to the xen job.  If
     13 no kernel job is specified, it will create one using the kernel source
     14 that the xen tarball uses.
     15 """
     16 
     17 def step_init():
     18     xensrc = 'http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/xen-unstable-src.tgz'
     19     # Uncomment the lines below if you want to build an alternate kernel
     20     #testkernel = job.kernel('/usr/local/src/linux-2.6.18.tar.bz2')
     21     #testkernel.config('http://mbligh.org/config/opteron2')
     22     #testxen = job.xen(xensrc, kjob = testkernel)
     23     testxen = job.xen(xensrc)
     24     testxen.build()
     25     testxen.install(tag='autotest', prefix='/tmp/xen')
     26     # Uncomment the line below if you want to boot your newly built kernel
     27     testxen.boot()
     28 
     29 
     30 def step_test():
     31     job.run_test('sleeptest')
     32