1
0
mirror of https://github.com/rancher/os.git synced 2025-09-06 01:01:43 +00:00

Fix installer build

This commit is contained in:
Ivan Mikushin
2016-06-13 16:33:07 -07:00
parent 07d475cecb
commit a640bdb758
8 changed files with 27 additions and 26 deletions

View File

@@ -9,10 +9,12 @@ import pytest
ros_test = 'ros-test'
arch = os.environ.get('ARCH', 'amd64')
version = os.environ.get('VERSION')
suffix = os.environ.get('SUFFIX')
suffix = ''
if arch != 'amd64':
suffix = '_' + arch
if version is None or version == '' or suffix is None:
raise RuntimeError("Could not get VERSION or SUFFIX from environment")
def iter_lines(s):
@@ -46,16 +48,6 @@ def with_effect(p):
return effect
def rancheros_version(build_conf):
with open(build_conf) as f:
for v in it.ifilter(non_empty,
it.imap(parse_value('VERSION'),
it.ifilter(non_empty,
it.imap(strip_comment('#'), iter_lines(f))))):
return v
raise RuntimeError("Could not parse RancherOS version")
def run_qemu(request, run_args=[]):
print('\nStarting QEMU')
p = subprocess.Popen(['./scripts/run', '--qemu', '--no-rebuild', '--no-rm-usr', '--fresh'] + run_args,