Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

merge default -> production

--HG--
branch : production
  • Loading branch information...
commit aa6070d87a574a14ece5d2e915e9ab08c05db6c6 2 parents 4bc4347 + f72a34a
@escapewindow escapewindow authored
View
1  configs/b2g/emulator_automation_config.py
@@ -14,6 +14,7 @@
},
"find_links": ["http://puppetagain.pub.build.mozilla.org/data/python/packages"],
+ "pip_index": False,
"buildbot_json_path": "buildprops.json",
View
1  configs/b2g/panda_releng.py
@@ -8,6 +8,7 @@
'virtualenv': ['/tools/buildbot/bin/python', '/tools/misc-python/virtualenv.py'],
},
"find_links": ["http://puppetagain.pub.build.mozilla.org/data/python/packages"],
+ "pip_index": False,
"buildbot_json_path": "buildprops.json",
"test_type": "b2g-wifi-qemu-carrier-sdcard-camera-antenna-xfail+panda",
"mobile_imaging_format": "http://mobile-imaging-%03i.p%i.releng.scl1.mozilla.com",
View
1  configs/jetperf/prod_config.py
@@ -10,6 +10,7 @@
},
"find_links": ["http://puppetagain.pub.build.mozilla.org/data/python/packages"],
+ "pip_index": False,
"default_actions": [
'clobber',
View
1  configs/jetperf/windows_config.py
@@ -14,6 +14,7 @@
},
"find_links": ["http://puppetagain.pub.build.mozilla.org/data/python/packages"],
+ "pip_index": False,
"default_actions": [
'clobber',
View
1  configs/marionette/automation_emulator_config.py
@@ -14,6 +14,7 @@
},
"find_links": ["http://puppetagain.pub.build.mozilla.org/data/python/packages"],
+ "pip_index": False,
"buildbot_json_path": "buildprops.json",
View
1  configs/marionette/prod_config.py
@@ -12,6 +12,7 @@
},
"find_links": ["http://puppetagain.pub.build.mozilla.org/data/python/packages"],
+ "pip_index": False,
"buildbot_json_path": "buildprops.json",
View
1  configs/marionette/windows_config.py
@@ -14,6 +14,7 @@
},
"find_links": ["http://puppetagain.pub.build.mozilla.org/data/python/packages"],
+ "pip_index": False,
"buildbot_json_path": "buildprops.json",
View
1  configs/talos/linux_config.py
@@ -11,6 +11,7 @@
"virtualenv_path": VENV_PATH,
"pypi_url": "http://puppetagain.pub.build.mozilla.org/data/python/packages/",
"find_links": ["http://puppetagain.pub.build.mozilla.org/data/python/packages/"],
+ "pip_index": False,
"use_talos_json": True,
"exes": {
'python': PYTHON,
View
1  configs/talos/mac_config.py
@@ -21,6 +21,7 @@
"virtualenv_path": VENV_PATH,
"pypi_url": "http://puppetagain.pub.build.mozilla.org/data/python/packages/",
"find_links": ["http://puppetagain.pub.build.mozilla.org/data/python/packages/"],
+ "pip_index": False,
"use_talos_json": True,
"exes": {
'python': PYTHON,
View
1  configs/talos/windows_config.py
@@ -13,6 +13,7 @@
"virtualenv_python_dll": PYTHON_DLL,
"pypi_url": "http://puppetagain.pub.build.mozilla.org/data/python/packages/",
"find_links": ["http://puppetagain.pub.build.mozilla.org/data/python/packages/"],
+ "pip_index": False,
"distribute_url": "http://puppetagain.pub.build.mozilla.org/data/python/packages/distribute-0.6.26.tar.gz",
"pip_url": "http://puppetagain.pub.build.mozilla.org/data/python/packages/pip-0.8.2.tar.gz",
"use_talos_json": True,
View
74 mozharness/base/python.py
@@ -13,32 +13,41 @@
from mozharness.base.log import WARNING, FATAL
# Virtualenv {{{1
-virtualenv_config_options = [[
- ["--venv-path", "--virtualenv-path"],
- {"action": "store",
- "dest": "virtualenv_path",
- "default": "venv",
- "help": "Specify the path to the virtualenv top level directory"
- }
-],
-[["--virtualenv"],
- {"action": "store",
- "dest": "virtualenv",
- "help": "Specify the virtualenv executable to use"
- }
-],
-[["--pypi-url"],
- {"action": "store",
- "dest": "pypi_url",
- "help": "Base URL of Python Package Index (default http://pypi.python.org/simple/)"
- }
-],
-[["--find-links"],
-{"action": "extend",
- "dest": "find_links",
- "help": "URL to look for packages at"
-}
-]]
+virtualenv_config_options = [
+ [["--venv-path", "--virtualenv-path"], {
+ "action": "store",
+ "dest": "virtualenv_path",
+ "default": "venv",
+ "help": "Specify the path to the virtualenv top level directory"
+ }],
+ [["--virtualenv"], {
+ "action": "store",
+ "dest": "virtualenv",
+ "help": "Specify the virtualenv executable to use"
+ }],
+ [["--pypi-url"], {
+ "action": "store",
+ "dest": "pypi_url",
+ "help": "Base URL of Python Package Index (default http://pypi.python.org/simple/)"
+ }],
+ [["--find-links"], {
+ "action": "extend",
+ "dest": "find_links",
+ "help": "URL to look for packages at"
+ }],
+ [["--pip-index"], {
+ "action": "store_true",
+ "default": True,
+ "dest": "pip_index",
+ "help": "Use pip indexes (default)"
+ }],
+ [["--no-pip-index"], {
+ "action": "store_false",
+ "dest": "pip_index",
+ "help": "Don't use pip indexes"
+ }],
+]
+
class VirtualenvMixin(object):
'''BaseScript mixin, designed to create and use virtualenvs.
@@ -85,11 +94,11 @@ def query_python_site_packages_path(self):
python = self.query_python_path()
self.site_packages_path = self.get_output_from_command(
[python, '-c',
- 'from distutils.sysconfig import get_python_lib; ' + \
+ 'from distutils.sysconfig import get_python_lib; ' +
'print(get_python_lib())'])
return self.site_packages_path
- def package_versions(self, pip_freeze_output=None, error_level=WARNING):
+ def package_versions(self, pip_freeze_output=None, error_level=WARNING, log_output=False):
"""
reads packages from `pip freeze` output and returns a dict of
{package_name: 'version'}
@@ -120,6 +129,11 @@ def package_versions(self, pip_freeze_output=None, error_level=WARNING):
package, version = line.split('==', 1)
packages[package] = version
+ if log_output:
+ self.info("Current package versions:")
+ for package in packages:
+ self.info(" %s == %s" % (package, packages[package]))
+
return packages
def is_python_package_installed(self, package_name, error_level=WARNING):
@@ -194,6 +208,9 @@ def install_module(self, module=None, module_url=None, install_method=None,
for link in c.get('find_links', []):
command.extend(["--find-links", link])
+ if not c["pip_index"]:
+ command += ['--no-index']
+
# module_url can be None if only specifying requirements files
if module_url:
command += [module_url]
@@ -298,6 +315,7 @@ def create_virtualenv(self, modules=(), requirements=()):
requirements=requirements)
self.info("Done creating virtualenv %s." % venv_path)
+ self.package_versions(log_output=True)
# __main__ {{{1
View
18 mozharness/mozilla/testing/device.py
@@ -496,8 +496,9 @@ def cleanup_device(self, reboot=False):
dm = self.query_devicemanager()
if dm.dirExists(dev_root):
self.info("Removing dev_root %s..." % dev_root)
- status = dm.removeDir(dev_root)
- if not status:
+ try:
+ dm.removeDir(dev_root)
+ except self.DMError:
self.add_device_flag(DEVICE_CANT_REMOVE_DEVROOT)
self.fatal("Can't remove dev_root!")
if c.get("enable_automation"):
@@ -569,8 +570,8 @@ def install_app(self, file_path):
dm.pushFile(file_path, target)
# TODO screen resolution
# TODO do something with status?
- status = dm.installApp(target)
- if status is None:
+ try:
+ dm.installApp(target)
self.info('-'*42)
self.info("Sleeping for 90 seconds...")
time.sleep(90)
@@ -583,16 +584,17 @@ def install_app(self, file_path):
except Exception, e:
self.info("Exception hit while trying to run logcat: %s" % str(e))
self.fatal("Remote Device Error: can't run logcat")
- else:
- self.fatal("Remote Device Error: updateApp() call failed - exiting")
+ except self.DMError:
+ self.fatal("Remote Device Error: installApp() call failed - exiting")
def reboot_device(self):
dm = self.query_devicemanager()
# logcat?
self.info("Rebooting device...")
- status = dm.reboot()
- if status is None:
+ try:
+ dm.reboot()
+ except self.DMError:
self.add_device_flag(DEVICE_NOT_REBOOTED)
self.fatal("Can't reboot device!")
self.wait_for_device()
Please sign in to comment.
Something went wrong with that request. Please try again.