mirror of
https://github.com/rancher/os.git
synced 2025-09-01 14:48:55 +00:00
add --qind
to scripts/run
and scripts/ssh
also add `--fresh` to `scripts/run` to run with a clean state HDD, make `--qemu` the default in `scripts/run` and `scripts/ssh`
This commit is contained in:
@@ -4,6 +4,9 @@ import subprocess
|
||||
import time
|
||||
|
||||
|
||||
ros_test = 'ros-test'
|
||||
|
||||
|
||||
def iter_lines(s):
|
||||
return it.imap(str.rstrip, iter(s.readline, ''))
|
||||
|
||||
@@ -44,10 +47,8 @@ def rancheros_version(build_conf):
|
||||
|
||||
|
||||
def run_qemu(request, run_args=[]):
|
||||
subprocess.check_call('rm -f ./state/empty-hd.img', shell=True)
|
||||
print('\nrm ./state/*')
|
||||
print('\nStarting QEMU')
|
||||
p = subprocess.Popen(['./scripts/run'] + run_args,
|
||||
p = subprocess.Popen(['./scripts/run', '--qemu', '--no-rebuild', '--fresh'] + run_args,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
|
||||
|
||||
def fin():
|
||||
@@ -59,6 +60,6 @@ def run_qemu(request, run_args=[]):
|
||||
|
||||
|
||||
@pytest.mark.timeout(10)
|
||||
def wait_for_ssh(ssh_command=['./scripts/ssh']):
|
||||
while subprocess.call(ssh_command + ['/bin/true']) != 0:
|
||||
def wait_for_ssh(ssh_command=['./scripts/ssh', '--qemu']):
|
||||
while subprocess.call(ssh_command + ['docker version >/dev/null 2>&1']) != 0:
|
||||
time.sleep(1)
|
||||
|
Reference in New Issue
Block a user