Commit Graph

1438 Commits

Author SHA1 Message Date
Nick Alexander
c147a5966a Bug 1191051 - Use full 40 character hashes in |mach artifact|. r=gps
DONTBUILD NPOTB on a CLOSED TREE
2015-08-04 13:32:00 -07:00
Nick Alexander
a2f081b3db Bug 1189459 - Allow generating geckoview AAR files when MOZ_APP_NAME is not 'fennec'. r=gps
This just allows a little versatility for consumers such as b2gdroid,
which are Fennec-like but don't have MOZ_APP_NAME=fennec.

I elected to pass appname as a parameter rather than modify the
existing distdir because I expect to want to differentiate, in some
way, the output AAR files based on the underlying name.  That is, in
future we might generate geckoview-fennec-VERSION.aar and
geckolibs-b2gdroid-VERSION.aar, or stuff the name into the Ivy version
information, or...

This also fixes a typo in one of the JarFinder instantiations.
2015-07-30 11:50:44 -07:00
Dustin J. Mitchell
8181ae8adc Bug 1188551: treat assertion failures as bad mozconfig; r=mshal 2015-07-29 14:14:05 -04:00
Vladimir Vukicevic
e2e8e0edb8 Bug 1157420, mach should generate VS2013 project files and use a better dir structure; r=froydnj 2015-07-20 16:21:15 -04:00
Mike Hommey
10f84c0f96 Bug 1187245 - Make .mozconfig.mk environment variables available to mach valgrind-test. r=gps 2015-07-28 08:19:14 +09:00
Mitchell Field
8420f62df2 Bug 1126228 - Directory (--directory) argument for |mach warnings-list| and |mach warnings-summary|. r=gps 2015-01-27 21:13:28 +11:00
Mike Hommey
d3c39c2edd Bug 1186229 - Enable Gtk+3 builds by default. r=gps
Note Gtk+3 builds need both Gtk+2 *and* Gtk+3.
2015-07-23 10:24:31 +09:00
Mike Hommey
ee3e2620b4 Bug 1185671 - Use BytesIO instead of StringIO as backing store for FileAvoidWrite, and handle writing unicode to it explicitly. r=gps 2015-07-23 09:37:33 +09:00
Ben Hearsum
33b60710f7 bug 1185530: mach boostrap should ensure that gnutar is installed. r=gps 2015-07-20 14:26:58 -04:00
Supradeep T R
2c430cadf5 Bug 1184780 - Use command help instead of main help; r=gps 2015-07-17 13:42:12 -07:00
Gregory Szorc
1fc86840a0 Bug 1184030 - Avoid implicit unicode <-> str conversion; r=smacleod
CalledProcessError.output and subprocess.check_output's return value
are str types. This file uses unicode_literals. If we do something
like `if 'foo' in e.output`, there will be a mix of str and unicode
types and Python will do implicit conversion. If the strings aren't
ASCII, we'll likely encounter a UnicodeDecodeError.

Use b'' literals around all strings to prevent this coercion from
occurring.
2015-07-17 11:25:49 -07:00
Jonathan Griffin
c5804d74fa Bug 1179292 - Make mozinfo recognize linux64-asan as a distinct platform, r=ahal 2015-07-16 13:17:56 -07:00
Ehsan Akhgari
7e09aaf6ad Bug 1180275 - Part 1: Add a release_build mozinfo variable; r=ted 2015-07-16 14:47:52 -04:00
Ryan VanderMeulen
48250e1441 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
0f501040df Bug 1180275 - Part 1: Add a release mozinfo variable; r=ted 2015-07-15 19:59:59 -04:00
Peter Elmers
9295a3b690 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.
2015-07-13 13:09:11 -07:00
Gregory Szorc
ddced68da0 Bug 1182677 - Support calling a function during mach command dispatch; r=smacleod
This will give us the ability to execute custom code at command dispatch
time. We can use this for global tests before dispatch.
2015-07-14 13:46:33 -07:00
Supradeep T R
295ebcdb19 Bug 1175968 - Honor '-h' or '--help' only if it appears before '--'; r=gps 2015-07-13 16:58:54 -07:00
Carsten "Tomcat" Book
108daa6a0d merge mozilla-inbound to mozilla-central a=merge 2015-07-13 11:51:14 +02:00
Nick Alexander
7f1fa40c31 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.
2015-07-08 12:43:06 -07:00
Mike Hommey
5051e091d5 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
dd122adc64 Bug 1180813 - Use a cache for BuildConfig to improve mach speed. r=gps 2015-07-07 00:35:00 -04:00
Nicholas Hurley
80e5c040df Bug 1182301 - Improve 'mach build' notifications. r=gps 2015-07-10 13:36:57 -07:00
Edmund Wong
634f0b9b95 Bug 1177634 - Ensure EXTERNAL_SOURCE_DIR uses normcase. r=glandium 2015-07-08 08:11:15 +08:00
Mike Hommey
af6d313286 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
Ehsan Akhgari
56c86d3dac Bug 1179488 - Accept any arguments passed to deprecated commands; r=gps
Without this, we throw UnrecognizedArgumentError when running commands
such as `./mach mochitest-plain test`, which causes an error message
such as the below to be emitted:

It looks like you passed an unrecognized argument into mach.

The mochitest-plain command does not accept the arguments: test

This patch will fix the above command to instead print the corresponding
deprecation message.
2015-07-06 18:08:48 -04:00
Nick Alexander
33c8e4a2bb Bug 1177933 - Add |mach eslint| command. r=mcomella,dmose
DONTBUILD NPOTB
2015-07-02 12:18:52 -07:00
Ted Mielczarek
5c7ace67e9 bug 1162519 - use winrm for mach clobber on Windows. r=gps 2015-07-01 11:47:03 -04:00
Wes Kocher
5785e7b90a Merge m-c to fx-team, a=merge 2015-06-30 16:58:23 -07:00
Nick Alexander
6943c5562c 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.
2015-06-30 16:19:51 -07:00
Andrew McCreight
acec07a044 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
Carsten "Tomcat" Book
427dea87a1 merge mozilla-inbound to mozilla-central a=merge 2015-06-26 13:19:12 +02:00
Gregory Szorc
1928f6fd58 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.
2015-06-25 16:11:22 -07:00
Andrew Halberstadt
e0c4a7112d Bug 1177476 - Fix require_conditions regression in mach, r=gps
This is a regression from bug 1176620 that results in all Firefox mach commands showing up in the help for B2G, even though they don't work there.
2015-06-25 15:44:11 -04:00
Gregory Szorc
4634d90063 Bug 1176642 - Use absolute_import in mozbuild; r=glandium 2015-06-21 18:37:18 -07:00
Gregory Szorc
c9e17a6c77 Bug 1176642 - Use absolute_import in mozpack; r=glandium 2015-06-25 12:13:55 -07:00
Gregory Szorc
f9d09584a6 Bug 1176642 - Defer import of glob; r=glandium
This was the only import of glob from all mach_commands.py files. Kill
it.

With this commit, there are no modules imported by a single
mach_commands.py outside of testing/web-platform/mach_commands.py.
2015-06-25 12:11:55 -07:00
Gregory Szorc
8b13b23660 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.
2015-06-25 12:11:12 -07:00
Gregory Szorc
4f2fb895aa 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.
2015-06-21 17:39:09 -07:00
Gregory Szorc
88efe94ba4 Bug 1176642 - Remove unused imports; r=glandium 2015-06-25 12:16:38 -07:00
Nick Alexander
e1553da827 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.)
2015-06-24 23:12:00 -07:00
Gregory Szorc
fbe10e8cee Bug 1176620 - Eliminate MethodHandler; r=ahal
This type is now redundant with our new rich type for capturing all mach
command metadata. Eliminate it and using _MachCommand instead.
2015-06-21 13:17:51 -07:00
Gregory Szorc
310c610f0c Bug 1176620 - Pass fewer arguments into MethodHandler; r=ahal
Simplify construction of mach's MethodHandler instances by by passing in
our new rich type that holds all command metadata.

While we are here, kill the docstring argument, as it can be computed
easily inside MethodHandler.__init__.
2015-06-21 13:07:33 -07:00
Gregory Szorc
200b01fe75 Bug 1176620 - Refactor how mach command metadata is stored; r=ahal
Up to this point, mach command metadata has been stored in tuples.
Initially, things weren't so bad. But they have evolved into tuples with
many elements. Adding new attributes is cumbersome. Let's restructure
the code to capture metadata in a dedicated class.

Before, there existed a separate attribute on the @Command or
@SubCommand decorated method for each mach decorator: @Command,
@CommandArgument, @CommandArgumentGroup. With the magic of __ior__,
we can now capture all metadata on a single type. This simplies
processing, as we now only look at a single attribute on methods:
_mach_command.

Before, we used separate attributes to distinguish between mach commands
and mach sub-commands. Now that we have a type that can hold all data,
we combine things into the _mach_command attribute and look for the
presence of the "subcommand" attribute on this type to identify
sub-commands.
2015-06-21 12:59:29 -07:00
Gregory Szorc
64fe2724f7 Bug 1176620 - Use absolute_import in mach; r=ahal
To help ensure Python 3 compatibility.
2015-06-21 11:56:05 -07:00
Birunthan Mohanathas
4601154750 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
f72c8fd75e 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.
2015-06-12 09:44:14 -07:00
Gregory Szorc
7c538ef094 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.
2015-06-12 09:37:54 -07:00
Wes Kocher
bfea5e9dd0 Merge inbound to central, a=merge 2015-06-11 17:02:47 -07:00
Gregory Szorc
816e97a198 Bug 1168466 - Bump minimum Mercurial version in bootstrapper; r=me
This should have been done in 4c757e339f81.

DONTBUILD (NPOTB)
2015-06-10 15:38:46 -07:00