mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 11:58:55 +00:00
Bug 1556311 - Fix the error "ImportError: no module named ini" while running raptor tests. r=sparky
Differential Revision: https://phabricator.services.mozilla.com/D33457 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
223721a61e
commit
b7ec43643f
@ -28,12 +28,6 @@ from mozrunner import runners
|
||||
# need this so raptor imports work both from /raptor and via mach
|
||||
here = os.path.abspath(os.path.dirname(__file__))
|
||||
paths = [here]
|
||||
if os.environ.get('SCRIPTSPATH') is not None:
|
||||
# in production it is env SCRIPTS_PATH
|
||||
paths.append(os.environ['SCRIPTSPATH'])
|
||||
else:
|
||||
# locally it's in source tree
|
||||
paths.append(os.path.join(here, '..', '..', 'mozharness'))
|
||||
|
||||
webext_dir = os.path.join(here, '..', 'webext')
|
||||
paths.append(webext_dir)
|
||||
|
@ -15,22 +15,11 @@ from mozlog import get_proxy_logger, get_default_logger
|
||||
LOG = get_proxy_logger(component="raptor-utils")
|
||||
here = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if os.environ.get('SCRIPTSPATH', None) is not None:
|
||||
# in production it is env SCRIPTS_PATH
|
||||
mozharness_dir = os.environ['SCRIPTSPATH']
|
||||
else:
|
||||
# locally it's in source tree
|
||||
mozharness_dir = os.path.join(here, '../../mozharness')
|
||||
sys.path.insert(0, mozharness_dir)
|
||||
|
||||
external_tools_path = os.environ.get('EXTERNALTOOLSPATH', None)
|
||||
|
||||
if external_tools_path is not None:
|
||||
# running in production via mozharness
|
||||
TOOLTOOL_PATH = os.path.join(external_tools_path, 'tooltool.py')
|
||||
else:
|
||||
# running locally via mach
|
||||
TOOLTOOL_PATH = os.path.join(mozharness_dir, 'external_tools', 'tooltool.py')
|
||||
|
||||
|
||||
def transform_platform(str_to_transform, config_platform, config_processor=None):
|
||||
|
@ -2,7 +2,6 @@ from __future__ import absolute_import
|
||||
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
|
||||
@ -10,13 +9,6 @@ from argparse import Namespace
|
||||
|
||||
# need this so raptor imports work both from /raptor and via mach
|
||||
here = os.path.abspath(os.path.dirname(__file__))
|
||||
if os.environ.get('SCRIPTSPATH') is not None:
|
||||
# in production it is env SCRIPTS_PATH
|
||||
mozharness_dir = os.environ['SCRIPTSPATH']
|
||||
else:
|
||||
# locally it's in source tree
|
||||
mozharness_dir = os.path.join(here, '../../mozharness')
|
||||
sys.path.insert(0, mozharness_dir)
|
||||
|
||||
from raptor.raptor import RaptorDesktopFirefox
|
||||
|
||||
|
@ -8,13 +8,6 @@ import sys
|
||||
|
||||
# need this so raptor imports work both from /raptor and via mach
|
||||
here = os.path.abspath(os.path.dirname(__file__))
|
||||
if os.environ.get('SCRIPTSPATH', None) is not None:
|
||||
# in production it is env SCRIPTS_PATH
|
||||
mozharness_dir = os.environ['SCRIPTSPATH']
|
||||
else:
|
||||
# locally it's in source tree
|
||||
mozharness_dir = os.path.join(here, '../../mozharness')
|
||||
sys.path.insert(1, mozharness_dir)
|
||||
|
||||
raptor_dir = os.path.join(os.path.dirname(here), 'raptor')
|
||||
sys.path.insert(0, raptor_dir)
|
||||
|
@ -14,13 +14,6 @@ from mozrunner.errors import RunnerNotStartedError
|
||||
|
||||
# need this so raptor imports work both from /raptor and via mach
|
||||
here = os.path.abspath(os.path.dirname(__file__))
|
||||
if os.environ.get('SCRIPTSPATH', None) is not None:
|
||||
# in production it is env SCRIPTS_PATH
|
||||
mozharness_dir = os.environ['SCRIPTSPATH']
|
||||
else:
|
||||
# locally it's in source tree
|
||||
mozharness_dir = os.path.join(here, '../../mozharness')
|
||||
sys.path.insert(0, mozharness_dir)
|
||||
|
||||
from raptor.raptor import RaptorDesktopFirefox, RaptorDesktopChrome, RaptorAndroid
|
||||
|
||||
|
@ -7,13 +7,6 @@ import sys
|
||||
|
||||
# need this so raptor imports work both from /raptor and via mach
|
||||
here = os.path.abspath(os.path.dirname(__file__))
|
||||
if os.environ.get('SCRIPTSPATH', None) is not None:
|
||||
# in production it is env SCRIPTS_PATH
|
||||
mozharness_dir = os.environ['SCRIPTSPATH']
|
||||
else:
|
||||
# locally it's in source tree
|
||||
mozharness_dir = os.path.join(here, '../../mozharness')
|
||||
sys.path.insert(1, mozharness_dir)
|
||||
|
||||
raptor_dir = os.path.join(os.path.dirname(here), 'raptor')
|
||||
sys.path.insert(0, raptor_dir)
|
||||
|
Loading…
x
Reference in New Issue
Block a user