1AUTHOR = "Autotest Team <autotest@test.kernel.org>" 2TIME = 'MEDIUM' 3NAME = "Sample - Xen Build" 4TEST_TYPE = "client" 5TEST_CLASS = "Kernel" 6 7DOC = """ 8this is a sample job to build xen and kernel with xen patches. 9The xen unstable tarball comes with scripts that will automatically 10patch a linux kernel, however, in some cases, PPC for example, the 11kernel is built from a seperate source. The xen class supports 12defining your own kernel job, and handing that to the xen job. If 13no kernel job is specified, it will create one using the kernel source 14that the xen tarball uses. 15""" 16 17def 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 30def step_test(): 31 job.run_test('sleeptest') 32