How to use xen method in autotest

Best Python code snippet using autotest_python

setup.py

Source:setup.py Github

copy

Full Screen

1from distutils.core import setup, Extension2import os3XEN_ROOT = "../.."4extra_compile_args = [ "-fno-strict-aliasing", "-Werror" ]5PATH_XEN = XEN_ROOT + "/tools/include"6PATH_LIBXC = XEN_ROOT + "/tools/libxc"7PATH_LIBXL = XEN_ROOT + "/tools/libxl"8PATH_XENSTORE = XEN_ROOT + "/tools/xenstore"9xc = Extension("xc",10 extra_compile_args = extra_compile_args,11 include_dirs = [ PATH_XEN, PATH_LIBXC, "xen/lowlevel/xc" ],12 library_dirs = [ PATH_LIBXC ],13 libraries = [ "xenctrl", "xenguest" ],14 depends = [ PATH_LIBXC + "/libxenctrl.so", PATH_LIBXC + "/libxenguest.so" ],15 sources = [ "xen/lowlevel/xc/xc.c" ])16xs = Extension("xs",17 extra_compile_args = extra_compile_args,18 include_dirs = [ PATH_XEN, PATH_XENSTORE, "xen/lowlevel/xs" ],19 library_dirs = [ PATH_XENSTORE ],20 libraries = [ "xenstore" ],21 depends = [ PATH_XENSTORE + "/libxenstore.so" ],22 sources = [ "xen/lowlevel/xs/xs.c" ])23scf = Extension("scf",24 extra_compile_args = extra_compile_args,25 include_dirs = [ "xen/lowlevel/scf" ],26 library_dirs = [ ],27 libraries = [ ],28 depends = [ ],29 sources = [ "xen/lowlevel/scf/scf.c" ])30process = Extension("process",31 extra_compile_args = extra_compile_args,32 include_dirs = [ "xen/lowlevel/process" ],33 library_dirs = [ ],34 libraries = [ "contract" ],35 depends = [ ],36 sources = [ "xen/lowlevel/process/process.c" ])37flask = Extension("flask",38 extra_compile_args = extra_compile_args,39 include_dirs = [ PATH_XEN, PATH_LIBXC, "xen/lowlevel/flask" ],40 library_dirs = [ PATH_LIBXC ],41 libraries = [ "xenctrl" ],42 depends = [ PATH_LIBXC + "/libxenctrl.so" ],43 sources = [ "xen/lowlevel/flask/flask.c" ])44ptsname = Extension("ptsname",45 extra_compile_args = extra_compile_args,46 include_dirs = [ "ptsname" ],47 library_dirs = [ ],48 libraries = [ ],49 depends = [ ],50 sources = [ "ptsname/ptsname.c" ])51checkpoint = Extension("checkpoint",52 extra_compile_args = extra_compile_args,53 include_dirs = [ PATH_XEN, PATH_LIBXC, PATH_XENSTORE ],54 library_dirs = [ PATH_LIBXC, PATH_XENSTORE ],55 libraries = [ "xenctrl", "xenguest", "xenstore", "rt" ],56 depends = [ PATH_LIBXC + "/libxenctrl.so",57 PATH_LIBXC + "/libxenguest.so",58 PATH_XENSTORE + "/libxenstore.so" ],59 sources = [ "xen/lowlevel/checkpoint/checkpoint.c",60 "xen/lowlevel/checkpoint/libcheckpoint.c"])61netlink = Extension("netlink",62 extra_compile_args = extra_compile_args,63 include_dirs = [ ],64 library_dirs = [ ],65 libraries = [ ],66 depends = [ ],67 sources = [ "xen/lowlevel/netlink/netlink.c",68 "xen/lowlevel/netlink/libnetlink.c"])69xl = Extension("xl",70 extra_compile_args = extra_compile_args,71 include_dirs = [ PATH_XEN, PATH_LIBXL, PATH_LIBXC, "xen/lowlevel/xl" ],72 library_dirs = [ PATH_LIBXL ],73 libraries = [ "xenlight" ],74 depends = [ PATH_LIBXL + "/libxenlight.so" ],75 sources = [ "xen/lowlevel/xl/xl.c", "xen/lowlevel/xl/_pyxl_types.c" ])76plat = os.uname()[0]77modules = [ xc, xs, ptsname, flask ]78#modules.extend([ xl ])79if plat == 'SunOS':80 modules.extend([ scf, process ])81if plat == 'Linux':82 modules.extend([ checkpoint, netlink ])83setup(name = 'xen',84 version = '3.0',85 description = 'Xen',86 packages = ['xen',87 'xen.lowlevel',88 'xen.util',89 'xen.util.xsm',90 'xen.util.xsm.dummy',91 'xen.util.xsm.flask',92 'xen.util.xsm.acm',93 'xen.xend',94 'xen.xend.server',95 'xen.xend.xenstore',96 'xen.xm',97 'xen.web',98 'xen.sv',99 'xen.xsview',100 'xen.remus',101 'xen.xend.tests',102 'xen.xend.server.tests',103 'xen.xend.xenstore.tests',104 'xen.xm.tests'105 ],106 ext_package = "xen.lowlevel",107 ext_modules = modules108 )109os.chdir('logging')...

Full Screen

Full Screen

boot_xen.py

Source:boot_xen.py Github

copy

Full Screen

...27 kernel_sha1 = '4f92bc4b9f88d5ab792fa7a43a68555d344e1b83'28 kernel_path = self.fetch_asset(kernel_url,29 asset_hash=kernel_sha1)30 return kernel_path31 def launch_xen(self, xen_path):32 """33 Launch Xen with a dom0 guest kernel34 """35 self.log.info("launch with xen_path: %s", xen_path)36 kernel_path = self.fetch_guest_kernel()37 self.vm.set_console()38 xen_command_line = self.XEN_COMMON_COMMAND_LINE39 self.vm.add_args('-machine', 'virtualization=on',40 '-m', '768',41 '-kernel', xen_path,42 '-append', xen_command_line,43 '-device',44 'guest-loader,addr=0x47000000,kernel=%s,bootargs=console=hvc0'45 % (kernel_path))46 self.vm.launch()47 console_pattern = 'VFS: Cannot open root device'48 wait_for_console_pattern(self, console_pattern, "Panic on CPU 0:")49class BootXen(BootXenBase):50 def test_arm64_xen_411_and_dom0(self):51 """52 :avocado: tags=arch:aarch6453 :avocado: tags=accel:tcg54 :avocado: tags=cpu:cortex-a5755 :avocado: tags=machine:virt56 """57 # archive of file from https://deb.debian.org/debian/pool/main/x/xen/58 xen_url = ('https://fileserver.linaro.org/s/JSsewXGZ6mqxPr5/'59 'download?path=%2F&files='60 'xen-hypervisor-4.11-arm64_4.11.4%2B37-g3263f257ca-1_arm64.deb')61 xen_sha1 = '034e634d4416adbad1212d59b62bccdcda63e62a'62 xen_deb = self.fetch_asset(xen_url, asset_hash=xen_sha1)63 xen_path = self.extract_from_deb(xen_deb, "/boot/xen-4.11-arm64")64 self.launch_xen(xen_path)65 def test_arm64_xen_414_and_dom0(self):66 """67 :avocado: tags=arch:aarch6468 :avocado: tags=accel:tcg69 :avocado: tags=cpu:cortex-a5770 :avocado: tags=machine:virt71 """72 # archive of file from https://deb.debian.org/debian/pool/main/x/xen/73 xen_url = ('https://fileserver.linaro.org/s/JSsewXGZ6mqxPr5/'74 'download?path=%2F&files='75 'xen-hypervisor-4.14-arm64_4.14.0%2B80-gd101b417b7-1_arm64.deb')76 xen_sha1 = 'b9d209dd689ed2b393e625303a225badefec1160'77 xen_deb = self.fetch_asset(xen_url, asset_hash=xen_sha1)78 xen_path = self.extract_from_deb(xen_deb, "/boot/xen-4.14-arm64")79 self.launch_xen(xen_path)80 def test_arm64_xen_415_and_dom0(self):81 """82 :avocado: tags=arch:aarch6483 :avocado: tags=accel:tcg84 :avocado: tags=cpu:cortex-a5785 :avocado: tags=machine:virt86 """87 xen_url = ('https://fileserver.linaro.org/'88 's/JSsewXGZ6mqxPr5/download'89 '?path=%2F&files=xen-upstream-4.15-unstable.deb')90 xen_sha1 = 'fc191172b85cf355abb95d275a24cc0f6d6579d8'91 xen_deb = self.fetch_asset(xen_url, asset_hash=xen_sha1)92 xen_path = self.extract_from_deb(xen_deb, "/boot/xen-4.15-unstable")...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run autotest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful