View | Details | Raw Unified
Collapse All | Expand All

(-) tools/python/xen/xm/tests/test_create.py (-8 / +15 lines)
 Lines 850-855    Link Here 
    opts.info("Started domain %s" % (dom))
    opts.info("Started domain %s" % (dom))
    return int(sxp.child_value(dominfo, 'domid'))
    return int(sxp.child_value(dominfo, 'domid'))
def get_xauthority():
    xauth = os.getenv("XAUTHORITY")
    if not xauth:
        home = os.getenv("HOME")
	if not home:
	    import posix, pwd
	    home = pwd.getpwuid(posix.getuid())[5]
	xauth = home + "/.Xauthority"
    return xauth
def parseCommandLine(argv):
def parseCommandLine(argv):
    gopts.reset()
    gopts.reset()
    args = gopts.parse(argv)
    args = gopts.parse(argv)
 Lines 864-877    Link Here 
        gopts.vals.display = os.getenv("DISPLAY")
        gopts.vals.display = os.getenv("DISPLAY")
    if not gopts.vals.xauthority:
    if not gopts.vals.xauthority:
        xauth = os.getenv("XAUTHORITY")
        gopts.vals.xauthority = get_xauthority()
        if not xauth:
            home = os.getenv("HOME")
            if not home:
                import posix, pwd
                home = pwd.getpwuid(posix.getuid())[5]
            xauth = home + "/.Xauthority"
        gopts.vals.xauthority = xauth
    # Process remaining args as config variables.
    # Process remaining args as config variables.
    for arg in args:
    for arg in args:
 Lines 51-56    Link Here 
                 'path'      : '.:/etc/xen',
                 'path'      : '.:/etc/xen',
                 'builder'   : 'linux',
                 'builder'   : 'linux',
                 'nics'      : -1,
                 'nics'      : -1,
                 'xauthority': xen.xm.create.get_xauthority(),
                 })
                 })
 Lines 99-104    Link Here 
                 'interface'   : 'eth0',
                 'interface'   : 'eth0',
                 'path'        : '.:/etc/xen',
                 'path'        : '.:/etc/xen',
                 'builder'     : 'linux',
                 'builder'     : 'linux',
                 'xauthority': xen.xm.create.get_xauthority(),
               })
               })
 Lines 138-143    Link Here 
                 'path'       : '.:/etc/xen',
                 'path'       : '.:/etc/xen',
                 'builder'    : 'linux',
                 'builder'    : 'linux',
                 'nics'       : -1,
                 'nics'       : -1,
                 'xauthority': xen.xm.create.get_xauthority(),
                 })
                 })
            
            
 Lines 188-193    Link Here 
                 'dhcp'        : 'off',
                 'dhcp'        : 'off',
                 'interface'   : 'eth0',
                 'interface'   : 'eth0',
                 'path'        : '.:/etc/xen',
                 'path'        : '.:/etc/xen',
                 'xauthority': xen.xm.create.get_xauthority(),
               })
               })