Lines Matching +full:port +full:- +full:def
9 # later. See the COPYING file in the top-level directory.
35 def has_cmd(name, args=None):
39 @skipUnless(*has_cmd('sudo -n', ('sudo', '-n', 'true')))
40 def test_something_that_needs_sudo(self):
50 exitcode = -1
60 def has_cmds(*cmds):
65 @skipUnless(*has_cmds(('cmd1', ('cmd1', '--some-parameter')),
67 def test_something_that_needs_cmd1_and_cmd2(self):
81 def run_cmd(args):
91 def is_readable_executable_file(path):
95 def pick_default_qemu_bin(bin_prefix='qemu-system-', arch=None):
126 def _console_interaction(test, success_message, failure_message,
160 def interrupt_interactive_console_until_pattern(test, success_message,
186 def wait_for_console_pattern(test, success_message, failure_message=None,
199 def exec_command(test, command):
211 def exec_command_and_wait_for_pattern(test, command,
232 def _get_unique_tag_val(self, tag_name):
241 def setUp(self, bin_prefix):
254 def fetch_asset(self, name,
270 def setUp(self):
273 super().setUp('qemu-system-')
282 def require_accelerator(self, accelerator):
304 def require_netdev(self, netdevname):
306 '-M', 'none', '-netdev', 'help'])[0];
310 def _new_vm(self, name, *args):
321 def get_qemu_img(self):
322 self.log.debug('Looking for and selecting a qemu-img binary')
324 # If qemu-img has been built, use it, otherwise the system wide one
326 qemu_img = os.path.join(BUILD_DIR, 'qemu-img')
328 qemu_img = find_command('qemu-img', False)
330 self.cancel('Could not find "qemu-img"')
335 def vm(self):
338 def get_vm(self, *args, name=None):
344 self._vms[name].add_args('-cpu', self.cpu)
349 def set_vm_arg(self, arg, value):
354 :param arg: the QEMU argument, such as "-cpu" in "-cpu host"
356 :param value: the argument value, such as "host" in "-cpu host"
370 def tearDown(self):
380 def ssh_connect(self, username, credential, credential_is_key=True):
382 res = self.vm.cmd('human-monitor-command',
384 port = get_info_usernet_hostfwd_port(res)
385 self.assertIsNotNone(port)
386 self.assertGreater(port, 0)
387 self.log.debug('sshd listening on port: %d', port)
389 self.ssh_session = ssh.Session('127.0.0.1', port=port,
392 self.ssh_session = ssh.Session('127.0.0.1', port=port,
402 def ssh_command(self, command):
418 def ssh_command_output_contains(self, cmd, exp):