Граф коммитов

1111 Коммитов

Автор SHA1 Сообщение Дата
Jonathan Griffin 0858f44655 Bug 1179292 - Make mozinfo recognize linux64-asan as a distinct platform, r=ahal
--HG--
extra : commitid : 2i02cOq3Jzv
2015-07-16 13:17:56 -07:00
Ehsan Akhgari c66403c220 Bug 1180275 - Part 1: Add a release_build mozinfo variable; r=ted 2015-07-16 14:47:52 -04:00
Ryan VanderMeulen d05bc1e9af Backed out changesets 9a048b598b1e and 56e9597b1257 (bug 1180275) for OSX test_android_eclipse.py failures.
CLOSED TREE
2015-07-15 23:40:06 -04:00
Ehsan Akhgari 29da2a2523 Bug 1180275 - Part 1: Add a release mozinfo variable; r=ted 2015-07-15 19:59:59 -04:00
Peter Elmers f0de749c69 Bug 1183291 - Factor idl-parser into a Python package. r=khuey
Move Python code into an xpidl subdirectory, and include a setup.py to allow
inclusion from pip install or requirements files. Change build directory
variables appropriately.

--HG--
rename : xpcom/idl-parser/Makefile.in => xpcom/idl-parser/xpidl/Makefile.in
rename : xpcom/idl-parser/header.py => xpcom/idl-parser/xpidl/header.py
rename : xpcom/idl-parser/moz.build => xpcom/idl-parser/xpidl/moz.build
rename : xpcom/idl-parser/runtests.py => xpcom/idl-parser/xpidl/runtests.py
rename : xpcom/idl-parser/typelib.py => xpcom/idl-parser/xpidl/typelib.py
rename : xpcom/idl-parser/xpidl.py => xpcom/idl-parser/xpidl/xpidl.py
2015-07-13 13:09:11 -07:00
Carsten "Tomcat" Book 4a67c881e4 merge mozilla-inbound to mozilla-central a=merge 2015-07-13 11:51:14 +02:00
Nick Alexander 5a41a44863 Bug 1182579 - Compute Android version codes in Python. r=gps
I considered three ways to do this:

* one, as a Python script executed with $(shell);
* two, as a Python script that writes an include file for the preprocessor;
* three, as a function exposed to the moz.build sandbox.

I rejected two because it's both tied to the preprocessor, and awkward
to make handle the dependency on the buildid (in a file) and
additional build defines (in config.status).

I rejected three because I know of no precedent for this approach, and
it hides the dependency on the buildid.

One doesn't handle failures in the script gracefully, but neither did
the existing approach.  This patch is at least testable.

--HG--
extra : commitid : 8dfw1ri7qjr
extra : rebase_source : da0e5ec705e0ac4c795bd2d7892f73857a1699ac
2015-07-08 12:43:06 -07:00
Mike Hommey b7e836094e Bug 1181450 - Make GENERATED_FILES more visible during the build by printing their name when they are being generated. r=gps 2015-07-10 09:56:04 +09:00
Julien Pagès ad6287944e Bug 1180813 - Use a cache for BuildConfig to improve mach speed. r=gps 2015-07-07 00:35:00 -04:00
Nicholas Hurley d0164d8d04 Bug 1182301 - Improve 'mach build' notifications. r=gps 2015-07-10 13:36:57 -07:00
Edmund Wong b7aeebe2c4 Bug 1177634 - Ensure EXTERNAL_SOURCE_DIR uses normcase. r=glandium 2015-07-08 08:11:15 +08:00
Mike Hommey 0e0bd7bd5a Bug 1180081 - Properly rebuild gtest/libxul before running gtests. r=gps
And since this does go through plenty of make directories, avoid make printing
many "Entering" and "Leaving" messages.
2015-07-08 07:53:31 +09:00
Ted Mielczarek d47a94a095 bug 1162519 - use winrm for mach clobber on Windows. r=gps
--HG--
extra : commitid : AGLwgeTmbKQ
extra : rebase_source : 9aac8bdcfd685bb8d08f877c256c56ccba98b665
2015-07-01 11:47:03 -04:00
Wes Kocher b877fa7a3a Merge m-c to fx-team, a=merge 2015-06-30 16:58:23 -07:00
Nick Alexander 89b81547b6 No bug - Don't write artifacts twice. r=me
DONTBUILD NPOTB

This was just an oversight during the initial landing, leading to two
copies of artifact libraries being appended to the same destination
file.

--HG--
extra : commitid : JvvZDrjUOQZ
extra : rebase_source : f48c1a9d4b506b6ed931043aeeaca437418ea9c3
extra : histedit_source : 3dbfd049039c0adc595c1abb0df3dca3af9db207
2015-06-30 16:19:51 -07:00
Andrew McCreight 1f8cde6f73 Bug 1058178, part 1 - Implement DMD heap scanning mode. r=njn
This implements a new "scan" mode for DMD that records the address
and contents of every live unsampled block in the DMD log. This
enables the low-level analysis of references from one block to
another, which can help leak investigations.
2015-06-30 11:54:15 -07:00
Gregory Szorc d34ee1a5dc Bug 1176642 - Import proper mozinfo package; r=me
bf34d16b6ab2 added absolute_import to this file. When changed, "import
mozinfo" stopped picking up mozbuild.mozinfo and started importing
mozinfo instead.

Use relative imports to force mozbuild.mozinfo to be picked up.

--HG--
extra : commitid : 4GC5lJWrBFq
extra : rebase_source : c91674b16f29dadf8dcda460787ea94654f2864a
2015-06-25 16:11:22 -07:00
Gregory Szorc 2237a97c63 Bug 1176642 - Use absolute_import in mozbuild; r=glandium
--HG--
extra : commitid : C634LBkrODe
extra : rebase_source : 839e3ccac3fe3c3dcb58288289fad1b25d92078e
2015-06-21 18:37:18 -07:00
Gregory Szorc c83528e0f4 Bug 1176642 - Use absolute_import in mozpack; r=glandium
--HG--
extra : commitid : Au8BOB8l869
extra : rebase_source : 2acf6d1df5b8d15261873f67a8b95ee018df3d0c
2015-06-25 12:13:55 -07:00
Gregory Szorc b5f03038db Bug 1176642 - Defer import Eclipse backend modules; r=glandium
This import brought in significant parts of the mozbuild package. Moving
it to a deferred import reduces the total number of Python modules
imported during mach dispatch by 43.

--HG--
extra : commitid : GdXsF7agvCT
extra : rebase_source : 586f1960c8e7eb400f61467045b064167784f68b
2015-06-25 12:11:12 -07:00
Gregory Szorc 3e949ee8fe Bug 1176642 - Use absolute_import in mach_commands.py files; r=glandium
This removes ambiguity as to which modules are being imported, making
import slightly faster as Python doesn't need to test so many
directories for file presence.

All files should already be using absolute imports because mach command
modules aren't imported to the package they belong to: they instead
belong to the "mach" package. So relative imports shouldn't have been
used.

--HG--
extra : commitid : 6tFME1KKfTD
extra : rebase_source : 78728f82f5487281620e00c2a8004cd5e1968087
2015-06-21 17:39:09 -07:00
Gregory Szorc a19bee3a08 Bug 1176642 - Remove unused imports; r=glandium
--HG--
extra : commitid : IZ7JkH4GKW4
extra : rebase_source : 4c3301c5c353be8afed407df4a003a9cac4583e8
2015-06-25 12:16:38 -07:00
Nick Alexander 0a6017a1af Bug 1162191 - Add |mach artifact| for installing downloaded Fennec binaries. r=gps
DONTBUILD ON A CLOSED TREE: Android-only and the build changes are cosmetic.

Very much a first cut, but I'd like to get some Fennec early adopters testing.

This adds:

* |mach artifact install| to fetch and install Fennec binaries;
* |mach artifact last| to print details about what was last installed;
* |mach artifact {print,clear}-caches|, for debugging.

This code is exposed as a new mozbuild.artifacts Python but it's not
particularly general.  My intention was to get things out of the mach command
more than produce a general artifact fetching API.  We can leave that bike
shed to Bug 1124378.

I've been testing this with --disable-compile-environment and it works well
locally, although there's no reason a knowledgeable developer couldn't use
this in conjunction with a fully-built tree.  (I don't know when such a
situation would arise, but I know of no technical impediment.)

--HG--
extra : commitid : 1T28aVfArqF
extra : rebase_source : b8c11244de8be0a14d605853f30cd47312d0a4ba
extra : histedit_source : 78a224501cd3cf0f86707c9c9549b61b4b248ba7
2015-06-24 23:12:00 -07:00
Birunthan Mohanathas 0a800b87f2 Bug 1174524 - Make objdir path comparison case-insensitive on Windows. r=mshal
os.path.realpath already implies os.path.normpath, so this just changes
normpath to normcase.
2015-06-16 08:24:29 -07:00
Gregory Szorc df52729835 Bug 1171105 - Ability to aggregate metadata from Files instances; r=glandium
We want this logic to live next to where metadata types are defined so
downstream consumers of Files-based metadata don't have to reinvent the
wheel.

The work in this commit will be used to enable auto filing bugs during
pushes to MozReview.

--HG--
extra : commitid : F55RzhDCVmR
extra : rebase_source : 1fe1a03f8d592c60d2ed8d760fd62c7bc60421a5
2015-06-12 09:44:14 -07:00
Gregory Szorc f15e40e75d Bug 1172645 - Make mozbuild's setup.py work; r=glandium
This file hasn't been updated in ages and the current configuration
doesn't produce working packages. Change that.

--HG--
extra : commitid : AfiwohniLPq
extra : rebase_source : 70786c7bd9e37c9acc9b38f54c956fec424cfcf5
extra : amend_source : e4e3752dc97b934456b973736ef55633366c8ee6
2015-06-12 09:37:54 -07:00
Gregory Szorc 67e6a15a08 Bug 1173633 - Print docstrings of mach command handlers in help output; r=ahal
`mach help <command>` currently only displays a brief description of the
command along with its arguments. Sometimes more detailed help text is
needed.

With this commit, the docstrings of mach command handlers will appear in
the output of `mach help <command>` if they are defined.

I've implemented basic docstrings for the three flavors of mach commands
(normal command, main subcommand, subcommand) to demonstate things work.

My hope is others will start to fill in docstrings once this feature
lands so the output for `mach help` can serve as a better learning guide
for new contributors.

--HG--
extra : commitid : Hx6ZkHDxbCK
extra : rebase_source : 01ced5a044442e370a45cd3fb245ac6283316925
extra : amend_source : fceb771e0e1ffa4e6f3f1b7c22eae6e25cf82034
2015-06-11 08:32:02 -07:00
Gregory Szorc 013f437636 Bug 1168607 - Add a native Mercurial finder; r=glandium
The hglib Mercurial finder was nice. But it is somewhat slow, as it
involves a separate Mercurial process.

This commit introduces a native Mercurial finder that speaks directly
to a Mercurial repository instance. It is significantly faster.

The new code is isolated to its own file because it imports Mercurial
code, which is GPL.

--HG--
extra : commitid : 8CzDFt3lQmx
extra : rebase_source : 1540ad20d795086926b316612062e2a1f10c4958
2015-06-09 13:49:45 -07:00
Gregory Szorc d5d6c72dd3 Bug 1168607 - Make `mach file-info` work with Mercurial repos; r=glandium
This commit adds support for specifying a Mercurial revision with `mach
file-info`. Aside from being a potentially useful feature, it proves
that MercurialRevisionFinder works with BuildReader.

--HG--
extra : commitid : 7143XT9ENqb
extra : rebase_source : d8c0c98d536d07db76653b648fd4b7d74d8f43ae
2015-06-09 13:43:22 -07:00
Gregory Szorc ba5d71304d Bug 1168607 - Add mode to MercurialFileFinder to support non-relative paths; r=glandium
The moz.build reader uses absolute paths when referencing moz.build
files. *Finder classes expect paths to be relative to a base. When we
switched the reader to use *Finder instances for I/O, we simply provided
a default FileFinder based at the filesystem root. This was quick and
easy. Things worked.

Unfortunately, that solution isn't ideal because not all *Finder
instances can accept absolute paths like that. The
MercurialRevisionFinder is one of them.

Changing the moz.build reader to talk in terms of relative paths is a
lot of work. While this would be ideal, it is significantly easier to
defer the problem until later and hack up MercurialRevisionFinder to
accept absolute paths. This commit does exactly that.

Bug 1171069 has been filed to track converting BuildReader to relative
paths.

--HG--
extra : commitid : 2JmzOBldBLy
extra : rebase_source : a8af6ce88dd9e2b98f131c92b45c3ece852e13d2
2015-06-08 09:33:46 -07:00
Gregory Szorc 4f13520461 Bug 1168607 - Implement a finder that reads from a Mercurial repo; r=glandium
Now that moz.build files use finders for I/O, we can start reading
moz.build data from other sources.

Version control is essentially a filesystem. We implement a finder
that speaks to Mercurial to obtain file data. It is able to obtain
file data from a specific revision in the repository.

We use the hglib package (which uses the Mercurial command server) for
speaking with Mercurial. This adds overhead compared to consuming the
raw Mercurial APIs. However, it also avoids GPL side-effects of
importing Mercurial's Python modules.

Testing shows that performance is good but not great. A follow-up
commit will introduce a GPL licensed Mercurial finder. For now, get
the base functionality in place.

--HG--
extra : commitid : BkwaQOW9MiR
extra : rebase_source : 915d6015317ccc79c228a76eed861d9f43e2fd17
2015-06-09 13:39:01 -07:00
Gregory Szorc 8ce366a5f7 Bug 1168607 - Use mozpack Finders for reading moz.build files; r=glandium
Sometimes moz.build data may not come from the local filesystem. To
support defining moz.build data in other backing stores, we switch
moz.build reading to use mozpack's *Finder classes for I/O.

The use of a FileFinder bound to / is sub-optimal. We should ideally
be creating a finder bound to topsrcdir. However, doing this would
require refactoring a lot of path handling in the reader, as that code
makes many assumptions that paths are absolute. This would be excellent
follow-up work.

While I was here, I cleaned up some linter warnings for unused imports.

On my machine, this commit results in a slight slowdown of moz.build
reading. Before, `mach build-backend` was consistently reporting 1.99s
for reading 2,572 moz.build files. After, it is consistently reporting
2.07s, an increase of 4%. This is likely due to a) function call
overhead b) the cost of instantiating a few thousand File instances
c) FileFinder performing an os.path.exists() before returning File
instances. I believe the regression is tolerable.

--HG--
extra : commitid : 1WDcrSU3SQD
extra : rebase_source : a23aa5a4063c6f7080ee00b6f0fe0ee532da3ce7
2015-06-09 18:16:35 -07:00
Gregory Szorc 4bee702035 Bug 1168607 - Add a read() method to File; r=glandium
Passing raw file handles around is a bit dangerous because it could lead
to leaking file descriptors. Add a read() method that handles the simple
case of obtaining the full contents of a File instance.

This should ideally be a method on BaseFile. But this would require
extra work and isn't needed. So we've deferred it until bug 1170329.

--HG--
extra : commitid : 82qw76XmpjC
extra : rebase_source : 422b16c5a3b1577f080097925aeaeb560aa3e798
2015-06-02 09:37:45 -07:00
Gregory Szorc ab11dfb209 Bug 1168607 - Add get method to finders; r=glandium
Today, the *Finder classes are optimized for doing matching and
returning multiple results. However, sometimes only looking for a
single file is wanted.

This commit implements the "get" method on all the *Finder classes.
It returns a BaseFile or None.

FileFinder._find_file has been refactored into FileFinder.get
to avoid code duplication.

--HG--
extra : commitid : K9It2ZJ3Rbo
extra : rebase_source : a56f8f70aa1902d26373a7196eae2847cce653d3
2015-06-04 11:24:03 -07:00
Mike Hommey 0a4831d945 Bug 1172800 - Create actual functions to execute moz.build templates. r=gps
The current mode of execution of templates doesn't allow them to more advanced
control flow, like returning early, returning or yielding values, because that
mode of execution is equivalent to running the code at the top level of a .py
file.

Making the templates executed through a function call, although trickier,
allows those control flows, which will be useful for template as context
managers.
2015-06-10 09:33:22 +09:00
Mike Hommey e7ceb2bd70 Bug 1172800 - Avoid using inspect.getsourcelines() and inspect.getfile(). r=gps
inspect.getsourcelines() and inspect.getfile() involve I/O out of our control.
Our use of those functions, however, doesn't require all their smarts. In fact,
we only use them on function objects, for which we can just do the work
ourselves without involving inspect functions that trigger I/O.
2015-06-10 09:33:21 +09:00
Mike Hommey 17363f4d4e Bug 1172800 - Move moz.build template handling in a separate class. r=gps
This will make subsequent refactorings a bit more intelligible.
2015-06-10 09:33:20 +09:00
Mike Hommey 0d786e2057 Bug 1172800 - Fixup after bug 991983. r=gps 2015-06-10 09:33:19 +09:00
Mike Hommey ad90bd664a Bug 985857 - Automatically log mach output and add a command to display it. r=gps 2015-06-10 09:33:19 +09:00
Jonathan Griffin eaaad653b6 Bug 1170632 - Fix platform_guess for osx; add pgo runtimes for mbc, r=ahal 2015-06-05 16:29:18 -07:00
Gijs Kruitbosch 015c8609b5 Bug 1150417 - use theme manifest for overrides, r=glandium,dao
--HG--
extra : commitid : 7Ip6kOB2BdY
extra : histedit_source : ada1cc46a63d0b7b2b26cd55f6085bd65be5d70d
2015-06-05 12:48:34 +01:00
Nathan Froyd fc6a141ee0 Bug 1170691 - part 1 - add the generating script's directory to sys.path in file_generate.py; r=glandium
The old way of writing scripts for generated files would invoke the script thusly:

    python script.py arg1...

Invoking the script this way means that the script's directory is
automatically added to sys.path, and importing modules from that
directory is easy.  Let's make it equally easy in the new world for
GENERATED_FILES, too.
2015-06-02 16:00:48 -04:00
James Graham d27ca37fce Bug 1169410 Add support for web-platform-tests to |mach test| r=gps
--HG--
extra : rebase_source : 9a1fb715e0844a61c47a1de53f8a4a54ff2e05f0
extra : amend_source : 8fb1e54b76ae543fa2b01002c2d300334dc051be
2015-05-28 20:27:23 +01:00
Mike Hommey 79ea9f2368 Bug 1170431 part 0 - Use the *Path classes for GENERATED_FILES scripts and inputs. r=gps 2015-06-03 07:10:12 +09:00
Andrew Halberstadt 7aa80fb529 Bug 1164597 - Consolidate all mochitest mach commands into single |mach mochitest|, r=chmanchester
--HG--
extra : rebase_source : 0a0d8a454df10ae9df9678c98e11b5eaf8249f51
2015-05-05 16:41:59 -04:00
Mike Hommey 5b9df4e5b5 Bug 991983 - Add a deprecation hint for GENERATED_SOURCES. r=gps 2015-05-28 07:39:05 +09:00
Mike Hommey 9b83baa130 Bug 991983 - Make TEST_HARNESS_FILES use the *Path classes instead of a separate set of methods to resolve paths. r=gps 2015-05-28 07:34:16 +09:00
Mike Hommey 806e0220a2 Bug 991983 - Use objdir-relative SOURCES instead of GENERATED_SOURCES. r=gps 2015-05-28 07:34:16 +09:00
Mike Hommey ea7750bcb1 Bug 991983 - Define SOURCES as SourcePath. r=gps 2015-05-28 07:34:15 +09:00
Mike Hommey f8b674d9a9 Bug 991983 - Refactor SourcePath handling for moz.build, add new classes and extensive tests. r=gps
Add generic support for different forms of paths in moz.build:
  '/topsrcdir/relative/paths'
  'srcdir/relative/paths'
  '!/topobjdir/relative/paths'
  '!objdir/relative/paths'

This drops the use of UserString for performance reasons, which required
going around with a meta class.
2015-05-28 07:34:14 +09:00