зеркало из https://github.com/mozilla/stoneridge.git
Saner handling for unit tests in the runner
This commit is contained in:
Родитель
c198cda4a4
Коммит
709f4b8d19
20
srrunner.py
20
srrunner.py
|
@ -86,17 +86,15 @@ class StoneRidgeRunner(object):
|
|||
|
||||
# Ensure our output directory exists
|
||||
outdir = stoneridge.get_config('run', 'out')
|
||||
if self.unittest:
|
||||
xpcoutdir = os.path.join(outdir, 'xpcoutdir')
|
||||
else:
|
||||
xpcoutdir = stoneridge.get_xpcshell_output_directory()
|
||||
logging.debug('ensuring %s exists' % (xpcoutdir,))
|
||||
try:
|
||||
os.makedirs(xpcoutdir)
|
||||
logging.debug('%s created' % (xpcoutdir,))
|
||||
except OSError:
|
||||
logging.debug('%s already exists' % (xpcoutdir,))
|
||||
pass
|
||||
xpcoutdir = stoneridge.get_xpcshell_output_directory()
|
||||
if not self.unittest:
|
||||
logging.debug('ensuring %s exists' % (xpcoutdir,))
|
||||
try:
|
||||
os.makedirs(xpcoutdir)
|
||||
logging.debug('%s created' % (xpcoutdir,))
|
||||
except OSError:
|
||||
logging.debug('%s already exists' % (xpcoutdir,))
|
||||
pass
|
||||
|
||||
installroot = stoneridge.get_config('stoneridge', 'root')
|
||||
xpcoutleaf = stoneridge.get_config('run', 'xpcoutleaf')
|
||||
|
|
|
@ -160,7 +160,10 @@ def run_xpcshell(args, stdout=subprocess.PIPE):
|
|||
|
||||
bindir = get_config('run', 'bin')
|
||||
if bindir is None:
|
||||
return (None, None)
|
||||
return (None, [])
|
||||
|
||||
if not os.path.exists(bindir):
|
||||
return (None, [])
|
||||
|
||||
if _xpcshell_environ is None:
|
||||
_xpcshell_environ = copy.copy(os.environ)
|
||||
|
|
Загрузка…
Ссылка в новой задаче