mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
c0ffcde3a8
- Bug 1243546 - Add mach command for external-media-tests - r=gps (8c74584251) - Bug 1239987 - Remove marionette-transport dependency from build environment; r=gps (b5e6166e61) - Bug 1250748 - Remove the 20s countdown timer from mach first run; r=chmanchester (8755a9b3e0) - Bug 1238996 - Release marionette-driver 1.2, marionette-transport 1.1, and marionette-client 2.1; r=automatedtester (746bc487a4) - Bug 1243739 - Bump versions of marionette-driver, marionette-client and marionette-transport. r=ato (c87d6e57f8) - Bug 1243739: Update marionette-driver dependecy for marionette-transport. r=ato (582a2f8d8e) - Bug 1239987 - Merge marionette-transport into marionette-driver; r=automatedtester (254ed0727c) - Bug 1239330 - Support AddonManager.installTemporaryAddon() in marionette_driver.addons, r=ato (1f132b1cb3) - Bug 1230622 - Docs: Suggest people use wptserve instead of mozhttpd. r=jgraham (8b1c669740) - Bug 1174497 - [mozprofile] bump version and release to pypi; r=wlach (0360927850) - Bug 1014760 - Version bump mozbase modules that depend on mozlog 3.0, r=me (d16b10a25f) - Bug 1189858 - [mozprofile] remove the manifest parser required dependency. r=ahal (b181c379ce) - Bug 1189858 - fix typos in pip extra dependency declaration (587697be0d) - Bug 1199115 - Release mozprofile 0.27. r=jgraham DONTBUILD (a1e1452486) - Bug 1233534 - [mozprofile] bump version to 0.28. r=ahal (6e17f001dd) - Bug 1256401 - Part 2: Remove references to b2gdroid. r=fabrice (1486bf8669) - Bug 1112920 - Assert against pending exceptions in AutoJSAPI::InitInternal. v1 r=luke,r=smaug (fa9b99c835) - Fix the asset for bug 1112920 to not touch uninitialized memory. Totally my fault, since I moved it above the mCx assignment, and now we have a CLOSED TREE. (f404994a66) - Logging patch for bug 1256008. r=khuey (dcb846a987) - Bug 1255817 part 1. Make AutoJSAPI always take ownership of error reporting. r=bholley (638b9ca3fe) - Bug 1257306. Simplify the implementation of AutoSafeJSContext (and therefore AutoJSContext, since AutoSafeJSContext will no longer be an AutoJSContext). r=bholley (58b655ad7a) - Bug 1245951 - "Unused method in WebSocket". r=smaug (b2f8937893) - Bug 1227136 - crash in mozilla::net::WebSocketChannel::StartWebsocketData, r=bagder, r=baku (5249e56b52) - Bug 1252751 - Improve the security model between webSocket and sandboxed iframe, r=smaug (9a6c0be275) - Bug 1250234. Make WebSocket::CreateAndDispatchMessageEvent properly report JS exceptions it might be producing. r=khuey (eaae502684) - Bug 1255840. Get rid of the AutoJSAPI usage in IDBFactory. r=khuey (d0a965d1aa) - Bug 1151112 - 'Sending message that cannot be cloned. Are you trying to send an XPCOM object?' seen when unlocking phone. r=ferjm (7ba4294750) - Bug 1253834 - add AllChildrenIterator::Get(), r=bz (5c1ab2f7f2) - Bug 1249443 - add AllChildrenIterator::GetPreviousChild, r=bz (812f61db28) - Bug 1249443 - add AllChildrenIterator::Phase, r=bz (9106ec6dbb) - Bug 1095236 - Simplify browser_test_new_window_from_content.js to use BrowserTestUtils. r=mrbkap (b8fcea4ad1) - Bug 1095236 - Test that windows opened from content with dialog=1 still open. r=mrbkap. (db67a80e2b) - Bug 1210482 - regression tests for 1194897 in which window.[location|menu|personal|status|tool]bar.visible broke for e10s, we're testing these behave appropiately both in content and chrome. r=mconley (a17099181c) - Bug 1251897 - DocAccessible constructor doesn't have to take root element as an argument, r=davidb (77ef52ac2a)
225 lines
7.5 KiB
Python
225 lines
7.5 KiB
Python
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
from __future__ import print_function, unicode_literals
|
|
|
|
import os
|
|
import platform
|
|
import sys
|
|
import time
|
|
|
|
|
|
STATE_DIR_FIRST_RUN = '''
|
|
mach and the build system store shared state in a common directory on the
|
|
filesystem. The following directory will be created:
|
|
|
|
{userdir}
|
|
|
|
If you would like to use a different directory, hit CTRL+c and set the
|
|
MOZBUILD_STATE_PATH environment variable to the directory you would like to
|
|
use and re-run mach. For this change to take effect forever, you'll likely
|
|
want to export this environment variable from your shell's init scripts.
|
|
|
|
Press ENTER/RETURN to continue or CTRL+c to abort.
|
|
'''.lstrip()
|
|
|
|
|
|
# TODO Bug 794506 Integrate with the in-tree virtualenv configuration.
|
|
SEARCH_PATHS = [
|
|
'python/mach',
|
|
'python/mozboot',
|
|
'python/mozbuild',
|
|
'python/mozversioncontrol',
|
|
'python/blessings',
|
|
'python/configobj',
|
|
'python/jsmin',
|
|
'python/psutil',
|
|
'python/which',
|
|
'python/pystache',
|
|
'python/pyyaml/lib',
|
|
'build',
|
|
'build/pymake',
|
|
'config',
|
|
'dom/bindings',
|
|
'dom/bindings/parser',
|
|
'dom/media/test/external',
|
|
'layout/tools/reftest',
|
|
'other-licenses/ply',
|
|
'testing',
|
|
'testing/firefox-ui/harness',
|
|
'testing/firefox-ui/tests',
|
|
'testing/luciddream',
|
|
'testing/marionette/client',
|
|
'testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py',
|
|
'testing/marionette/driver',
|
|
'testing/mozbase/mozcrash',
|
|
'testing/mozbase/mozdebug',
|
|
'testing/mozbase/mozdevice',
|
|
'testing/mozbase/mozfile',
|
|
'testing/mozbase/mozhttpd',
|
|
'testing/mozbase/mozinfo',
|
|
'testing/mozbase/mozinstall',
|
|
'testing/mozbase/mozleak',
|
|
'testing/mozbase/mozlog',
|
|
'testing/mozbase/moznetwork',
|
|
'testing/mozbase/mozprocess',
|
|
'testing/mozbase/mozprofile',
|
|
'testing/mozbase/mozrunner',
|
|
'testing/mozbase/mozsystemmonitor',
|
|
'testing/mozbase/mozscreenshot',
|
|
'testing/mozbase/moztest',
|
|
'testing/mozbase/mozversion',
|
|
'testing/mozbase/manifestparser',
|
|
'testing/puppeteer/firefox',
|
|
'testing/taskcluster',
|
|
'testing/tools/autotry',
|
|
'testing/web-platform',
|
|
'testing/web-platform/harness',
|
|
'testing/web-platform/tests/tools/wptserve',
|
|
'testing/xpcshell',
|
|
'xpcom/idl-parser',
|
|
]
|
|
|
|
# Individual files providing mach commands.
|
|
MACH_MODULES = [
|
|
'build/valgrind/mach_commands.py',
|
|
'dom/bindings/mach_commands.py',
|
|
'dom/media/test/external/mach_commands.py',
|
|
'layout/tools/reftest/mach_commands.py',
|
|
'python/mach_commands.py',
|
|
'python/mach/mach/commands/commandinfo.py',
|
|
'python/mozboot/mozboot/mach_commands.py',
|
|
'python/mozbuild/mozbuild/mach_commands.py',
|
|
'python/mozbuild/mozbuild/backend/mach_commands.py',
|
|
'python/mozbuild/mozbuild/compilation/codecomplete.py',
|
|
'python/mozbuild/mozbuild/frontend/mach_commands.py',
|
|
'services/common/tests/mach_commands.py',
|
|
'testing/firefox-ui/mach_commands.py',
|
|
'testing/luciddream/mach_commands.py',
|
|
'testing/mach_commands.py',
|
|
'testing/taskcluster/mach_commands.py',
|
|
'testing/marionette/mach_commands.py',
|
|
'testing/mochitest/mach_commands.py',
|
|
'testing/xpcshell/mach_commands.py',
|
|
'testing/talos/mach_commands.py',
|
|
'testing/web-platform/mach_commands.py',
|
|
'testing/xpcshell/mach_commands.py',
|
|
'tools/docs/mach_commands.py',
|
|
'tools/mercurial/mach_commands.py',
|
|
'tools/mach_commands.py',
|
|
'tools/power/mach_commands.py',
|
|
]
|
|
|
|
|
|
CATEGORIES = {
|
|
'build': {
|
|
'short': 'Build Commands',
|
|
'long': 'Interact with the build system',
|
|
'priority': 80,
|
|
},
|
|
'post-build': {
|
|
'short': 'Post-build Commands',
|
|
'long': 'Common actions performed after completing a build.',
|
|
'priority': 70,
|
|
},
|
|
'testing': {
|
|
'short': 'Testing',
|
|
'long': 'Run tests.',
|
|
'priority': 60,
|
|
},
|
|
'ci': {
|
|
'short': 'CI',
|
|
'long': 'Taskcluster commands',
|
|
'priority': 59
|
|
},
|
|
'devenv': {
|
|
'short': 'Development Environment',
|
|
'long': 'Set up and configure your development environment.',
|
|
'priority': 50,
|
|
},
|
|
'build-dev': {
|
|
'short': 'Low-level Build System Interaction',
|
|
'long': 'Interact with specific parts of the build system.',
|
|
'priority': 20,
|
|
},
|
|
'misc': {
|
|
'short': 'Potpourri',
|
|
'long': 'Potent potables and assorted snacks.',
|
|
'priority': 10,
|
|
},
|
|
'disabled': {
|
|
'short': 'Disabled',
|
|
'long': 'The disabled commands are hidden by default. Use -v to display them. These commands are unavailable for your current context, run "mach <command>" to see why.',
|
|
'priority': 0,
|
|
}
|
|
}
|
|
|
|
|
|
def bootstrap(topsrcdir, mozilla_dir=None):
|
|
if mozilla_dir is None:
|
|
mozilla_dir = topsrcdir
|
|
|
|
# Ensure we are running Python 2.7+. We put this check here so we generate a
|
|
# user-friendly error message rather than a cryptic stack trace on module
|
|
# import.
|
|
if sys.version_info[0] != 2 or sys.version_info[1] < 7:
|
|
print('Python 2.7 or above (but not Python 3) is required to run mach.')
|
|
print('You are running Python', platform.python_version())
|
|
sys.exit(1)
|
|
|
|
# Global build system and mach state is stored in a central directory. By
|
|
# default, this is ~/.mozbuild. However, it can be defined via an
|
|
# environment variable. We detect first run (by lack of this directory
|
|
# existing) and notify the user that it will be created. The logic for
|
|
# creation is much simpler for the "advanced" environment variable use
|
|
# case. For default behavior, we educate users and give them an opportunity
|
|
# to react. We always exit after creating the directory because users don't
|
|
# like surprises.
|
|
try:
|
|
import mach.main
|
|
except ImportError:
|
|
sys.path[0:0] = [os.path.join(mozilla_dir, path) for path in SEARCH_PATHS]
|
|
import mach.main
|
|
|
|
def populate_context(context, key=None):
|
|
if key is None:
|
|
return
|
|
if key == 'state_dir':
|
|
state_user_dir = os.path.expanduser('~/.mozbuild')
|
|
state_env_dir = os.environ.get('MOZBUILD_STATE_PATH', None)
|
|
if state_env_dir:
|
|
if not os.path.exists(state_env_dir):
|
|
print('Creating global state directory from environment variable: %s'
|
|
% state_env_dir)
|
|
os.makedirs(state_env_dir, mode=0o770)
|
|
state_dir = state_env_dir
|
|
else:
|
|
if not os.path.exists(state_user_dir):
|
|
print(STATE_DIR_FIRST_RUN.format(userdir=state_user_dir))
|
|
try:
|
|
sys.stdin.readline()
|
|
except KeyboardInterrupt:
|
|
sys.exit(1)
|
|
|
|
print('\nCreating default state directory: %s' % state_user_dir)
|
|
os.makedirs(state_user_dir, mode=0o770)
|
|
state_dir = state_user_dir
|
|
|
|
return state_dir
|
|
if key == 'topdir':
|
|
return topsrcdir
|
|
raise AttributeError(key)
|
|
|
|
mach = mach.main.Mach(os.getcwd())
|
|
mach.populate_context_handler = populate_context
|
|
|
|
for category, meta in CATEGORIES.items():
|
|
mach.define_category(category, meta['short'], meta['long'],
|
|
meta['priority'])
|
|
|
|
for path in MACH_MODULES:
|
|
mach.load_commands_from_file(os.path.join(mozilla_dir, path))
|
|
|
|
return mach
|