Properly set the Config call.
This commit is contained in:
parent
9e00ba4e37
commit
c96ba25075
@ -25,6 +25,7 @@ from osc import cmdln
|
|||||||
# Expand sys.path to search modules inside the pluging directory
|
# Expand sys.path to search modules inside the pluging directory
|
||||||
PLUGINDIR = os.path.dirname(os.path.realpath(__file__.replace('.pyc', '.py')))
|
PLUGINDIR = os.path.dirname(os.path.realpath(__file__.replace('.pyc', '.py')))
|
||||||
sys.path.append(PLUGINDIR)
|
sys.path.append(PLUGINDIR)
|
||||||
|
from osclib.conf import Config
|
||||||
from osclib.stagingapi import StagingAPI
|
from osclib.stagingapi import StagingAPI
|
||||||
|
|
||||||
|
|
||||||
@ -375,6 +376,7 @@ def do_check_source(self, subcmd, opts, *args):
|
|||||||
self._devel_projects = {}
|
self._devel_projects = {}
|
||||||
opts.apiurl = self.get_api_url()
|
opts.apiurl = self.get_api_url()
|
||||||
|
|
||||||
|
Config('openSUSE:%s' % opts.project)
|
||||||
self.api = StagingAPI(opts.apiurl, 'openSUSE:%s' % opts.project)
|
self.api = StagingAPI(opts.apiurl, 'openSUSE:%s' % opts.project)
|
||||||
|
|
||||||
if len(args) and args[0] == 'skip':
|
if len(args) and args[0] == 'skip':
|
||||||
|
@ -22,7 +22,7 @@ import osc
|
|||||||
# Expand sys.path to search modules inside the pluging directory
|
# Expand sys.path to search modules inside the pluging directory
|
||||||
PLUGINDIR = os.path.expanduser(os.path.dirname(os.path.realpath(__file__)))
|
PLUGINDIR = os.path.expanduser(os.path.dirname(os.path.realpath(__file__)))
|
||||||
sys.path.append(PLUGINDIR)
|
sys.path.append(PLUGINDIR)
|
||||||
|
from osclib.conf import Config
|
||||||
from osclib.stagingapi import StagingAPI
|
from osclib.stagingapi import StagingAPI
|
||||||
|
|
||||||
|
|
||||||
@ -38,6 +38,7 @@ class ToTestBase(object):
|
|||||||
def __init__(self, project, dryrun):
|
def __init__(self, project, dryrun):
|
||||||
self.project = project
|
self.project = project
|
||||||
self.dryrun = dryrun
|
self.dryrun = dryrun
|
||||||
|
Config('openSUSE:%s' % project)
|
||||||
self.api = StagingAPI(osc.conf.config['apiurl'], project='openSUSE:%s' % project)
|
self.api = StagingAPI(osc.conf.config['apiurl'], project='openSUSE:%s' % project)
|
||||||
self.known_failures = self.known_failures_from_dashboard(project)
|
self.known_failures = self.known_failures_from_dashboard(project)
|
||||||
|
|
||||||
@ -350,6 +351,7 @@ class ToTestBase(object):
|
|||||||
known_failures.append(line.strip())
|
known_failures.append(line.strip())
|
||||||
return known_failures
|
return known_failures
|
||||||
|
|
||||||
|
|
||||||
class ToTestFactory(ToTestBase):
|
class ToTestFactory(ToTestBase):
|
||||||
main_products = ['_product:openSUSE-dvd5-dvd-i586',
|
main_products = ['_product:openSUSE-dvd5-dvd-i586',
|
||||||
'_product:openSUSE-dvd5-dvd-x86_64',
|
'_product:openSUSE-dvd5-dvd-x86_64',
|
||||||
@ -378,6 +380,7 @@ class ToTestFactory(ToTestBase):
|
|||||||
return result.group(1)
|
return result.group(1)
|
||||||
raise Exception("can't find factory version")
|
raise Exception("can't find factory version")
|
||||||
|
|
||||||
|
|
||||||
class ToTest132(ToTestBase):
|
class ToTest132(ToTestBase):
|
||||||
main_products = ['_product:openSUSE-dvd5-dvd-i586',
|
main_products = ['_product:openSUSE-dvd5-dvd-i586',
|
||||||
'_product:openSUSE-dvd5-dvd-x86_64',
|
'_product:openSUSE-dvd5-dvd-x86_64',
|
||||||
@ -418,7 +421,7 @@ if __name__ == '__main__':
|
|||||||
parser.print_help()
|
parser.print_help()
|
||||||
exit(-1)
|
exit(-1)
|
||||||
|
|
||||||
osc.conf.get_config()
|
#osc.conf.get_config()
|
||||||
#osc.conf.config['debug'] = True
|
#osc.conf.config['debug'] = True
|
||||||
|
|
||||||
totest = totest_class[args.project](args.project, args.dryrun)
|
totest = totest_class[args.project](args.project, args.dryrun)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user