Add PowerPC:ToTest
Signed-off-by: Dinar Valeev <dvaleev@suse.com>
This commit is contained in:
parent
d0df8ef5e6
commit
97d8130e84
@ -47,6 +47,9 @@ class ToTestBase(object):
|
||||
def iso_prefix(self):
|
||||
return self.project
|
||||
|
||||
def arch(self):
|
||||
return self.arch
|
||||
|
||||
def binaries_of_product(self, project, product):
|
||||
url = self.api.makeurl(['build', project, 'images', 'local', product])
|
||||
try:
|
||||
@ -65,8 +68,8 @@ class ToTestBase(object):
|
||||
"""Return the current snapshot in :ToTest"""
|
||||
|
||||
# for now we hardcode all kind of things
|
||||
for binary in self.binaries_of_product('openSUSE:%s:ToTest' % self.project, '_product:openSUSE-cd-mini-i586'):
|
||||
result = re.match(r'openSUSE-%s-NET-i586-Snapshot(.*)-Media.iso' % self.iso_prefix(),
|
||||
for binary in self.binaries_of_product('openSUSE:%s:ToTest' % self.project, '_product:openSUSE-cd-mini-%s' % self.arch()):
|
||||
result = re.match(r'openSUSE-%s-NET-.*-Snapshot(.*)-Media.iso' % self.iso_prefix(),
|
||||
binary)
|
||||
if result:
|
||||
return result.group(1)
|
||||
@ -241,24 +244,18 @@ class ToTestBase(object):
|
||||
if not self.all_repos_done('openSUSE:%s' % self.project):
|
||||
return False
|
||||
|
||||
for product in ['_product:openSUSE-ftp-ftp-i586_x86_64',
|
||||
'_product:openSUSE-Addon-NonOss-ftp-ftp-i586_x86_64'] + self.main_products:
|
||||
for product in self.ftp_products + self.main_products:
|
||||
if not self.package_ok('openSUSE:%s' % self.project, product, 'images', 'local'):
|
||||
return False
|
||||
|
||||
if self.arch == "x86_64":
|
||||
|
||||
if not self.all_repos_done('openSUSE:%s:Live' % self.project):
|
||||
return False
|
||||
|
||||
for product in ['kiwi-image-livecd-kde.i586',
|
||||
'kiwi-image-livecd-gnome.i586',
|
||||
'kiwi-image-livecd-x11']:
|
||||
if not self.package_ok('openSUSE:%s:Live' % self.project, product, 'standard', 'i586'):
|
||||
return False
|
||||
|
||||
for product in ['kiwi-image-livecd-kde.x86_64',
|
||||
'kiwi-image-livecd-gnome.x86_64',
|
||||
'kiwi-image-livecd-x11']:
|
||||
if not self.package_ok('openSUSE:%s:Live' % self.project, product, 'standard', 'x86_64'):
|
||||
for arch in ['i586', 'x86_64' ]:
|
||||
for product in self.livecd_products:
|
||||
if not self.package_ok('openSUSE:%s:Live' % self.project, product, 'standard', '%s' % arch):
|
||||
return False
|
||||
|
||||
return True
|
||||
@ -278,13 +275,11 @@ class ToTestBase(object):
|
||||
print 'Updating snapshot %s' % snapshot
|
||||
self.api.switch_flag_in_prj('openSUSE:%s:ToTest' % self.project, flag='publish', state='disable')
|
||||
|
||||
self.release_package('openSUSE:%s' % self.project, '_product:openSUSE-ftp-ftp-i586_x86_64')
|
||||
self.release_package('openSUSE:%s' % self.project, '_product:openSUSE-Addon-NonOss-ftp-ftp-i586_x86_64')
|
||||
for cd in ['kiwi-image-livecd-kde.i586',
|
||||
'kiwi-image-livecd-kde.x86_64',
|
||||
'kiwi-image-livecd-gnome.i586',
|
||||
'kiwi-image-livecd-gnome.x86_64',
|
||||
'kiwi-image-livecd-x11']:
|
||||
for product in self.ftp_products:
|
||||
self.release_package('openSUSE:%s' % self.project, '%s' % product)
|
||||
|
||||
if self.arch == "x86_64":
|
||||
for cd in self.livecd_products:
|
||||
self.release_package('openSUSE:%s:Live' % self.project, cd, set_release='Snapshot%s' % snapshot)
|
||||
|
||||
for cd in self.main_products:
|
||||
@ -342,7 +337,12 @@ class ToTestBase(object):
|
||||
|
||||
def known_failures_from_dashboard(self, project):
|
||||
known_failures = []
|
||||
url = self.api.makeurl(['source', 'openSUSE:%s:Staging' % self.project, 'dashboard', 'known_failures'])
|
||||
if self.project == "Factory:PowerPC":
|
||||
project = "Factory"
|
||||
else:
|
||||
project = self.project
|
||||
|
||||
url = self.api.makeurl(['source', 'openSUSE:%s:Staging' % project, 'dashboard', 'known_failures'])
|
||||
f = self.api.retried_GET(url)
|
||||
for line in f:
|
||||
if not line[0] == '#':
|
||||
@ -356,6 +356,13 @@ class ToTestFactory(ToTestBase):
|
||||
'_product:openSUSE-cd-mini-i586',
|
||||
'_product:openSUSE-cd-mini-x86_64']
|
||||
|
||||
ftp_products = ['_product:openSUSE-ftp-ftp-i586_x86_64',
|
||||
'_product:openSUSE-Addon-NonOss-ftp-ftp-i586_x86_64']
|
||||
|
||||
livecd_products = ['kiwi-image-livecd-kde',
|
||||
'kiwi-image-livecd-gnome',
|
||||
'kiwi-image-livecd-x11']
|
||||
|
||||
def __init__(self, project, dryrun):
|
||||
ToTestBase.__init__(self, project, dryrun)
|
||||
|
||||
@ -365,6 +372,9 @@ class ToTestFactory(ToTestBase):
|
||||
def iso_prefix(self):
|
||||
return 'Tumbleweed'
|
||||
|
||||
def arch(self):
|
||||
return 'x86_64'
|
||||
|
||||
# for Factory we check the version of the release package
|
||||
def current_version(self):
|
||||
url = self.api.makeurl(['build', 'openSUSE:%s' % self.project, 'standard', 'x86_64',
|
||||
@ -378,6 +388,39 @@ class ToTestFactory(ToTestBase):
|
||||
return result.group(1)
|
||||
raise Exception("can't find factory version")
|
||||
|
||||
class ToTestFactoryPowerPC(ToTestBase):
|
||||
main_products = ['_product:openSUSE-dvd5-BE-ppc64',
|
||||
'_product:openSUSE-dvd5-LE-ppc64le',
|
||||
'_product:openSUSE-cd-mini-ppc64',
|
||||
'_product:openSUSE-cd-mini-ppc64le']
|
||||
|
||||
ftp_products = [ '_product:openSUSE-ftp-ftp-ppc_ppc64_ppc64le' ]
|
||||
|
||||
def __init__(self, project, dryrun):
|
||||
ToTestBase.__init__(self, project, dryrun)
|
||||
|
||||
def openqa_version(self):
|
||||
return 'Tumbleweed'
|
||||
|
||||
def arch(self):
|
||||
return 'ppc64le'
|
||||
|
||||
def iso_prefix(self):
|
||||
return 'Tumbleweed'
|
||||
|
||||
# for Factory we check the version of the release package
|
||||
def current_version(self):
|
||||
url = self.api.makeurl(['build', 'openSUSE:%s' % self.project, 'standard', 'ppc64le',
|
||||
'_product:openSUSE-release'])
|
||||
f = self.api.retried_GET(url)
|
||||
root = ET.parse(f).getroot()
|
||||
for binary in root.findall('binary'):
|
||||
binary = binary.get('filename', '')
|
||||
result = re.match(r'.*-([^-]*)-[^-]*.src.rpm', binary)
|
||||
if result:
|
||||
return result.group(1)
|
||||
raise Exception("can't find factory powerpc version")
|
||||
|
||||
|
||||
class ToTest132(ToTestBase):
|
||||
main_products = [
|
||||
@ -411,6 +454,7 @@ if __name__ == '__main__':
|
||||
|
||||
totest_class = {
|
||||
'Factory': ToTestFactory,
|
||||
'Factory:PowerPC': ToTestFactoryPowerPC,
|
||||
'13.2': ToTest132,
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user