From 9368e016cf68b9d53765491f70ebedc27f384fe9 Mon Sep 17 00:00:00 2001 From: Michal Hrusecky Date: Wed, 5 Feb 2014 15:34:21 +0100 Subject: [PATCH] Fix test Included change scarabeus did while playing with test-suite, making sure that all tests (currently just one) passes. --- osc-staging.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/osc-staging.py b/osc-staging.py index 117cdb27..a193d6f0 100644 --- a/osc-staging.py +++ b/osc-staging.py @@ -9,6 +9,9 @@ from osc import cmdln from osc import conf from osc import commandline +from osc.core import * +import osc + OSC_STAGING_VERSION='0.0.1' def _print_version(self): @@ -16,6 +19,20 @@ def _print_version(self): print '%s'%(self.OSC_STAGING_VERSION) quit(0) +def list_staging_projects(apiurl): + """ +list all current running staging projects +""" + projects = [] + + url = makeurl(apiurl, ['search', 'project', 'id?match=starts-with(@name,\'openSUSE:Factory:Staging:\')']) + projxml = http_GET(url) + + root = ET.parse(projxml).getroot() + for val in root.findall('project'): + projects.append(val.get('name')) + return projects + # Get last build results (optionally only for specified repo/arch) # Works even when rebuild is triggered def _get_build_res(opts, prj, repo=None, arch=None):