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

2275 Коммитов

Автор SHA1 Сообщение Дата
Mike Hommey a3cf230161 Bug 1266343 - Change ConfigureSandbox._apply_imports such that it becomes easy to override imports in unit tests. r=chmanchester 2016-04-22 09:03:28 +09:00
Mike Hommey 24ce400759 Bug 1266343 - Avoid _apply_imports happening twice for the same function. r=chmanchester 2016-04-22 09:03:26 +09:00
Mike Hommey 24fc0c73b9 Bug 1266343 - Use mozbuild.util.exec_ in the various configure tests. r=chmanchester
Because some older python 2.7 versions throw bogus errors when using the
exec statement as a function, use the function we added in bug 1264831
everywhere we use exec in the various configure tests. It doesn't take
much to trigger them, and the following changes ends up doing exactly
that.
2016-04-22 09:03:24 +09:00
Nathan Froyd 82c6f5d7a7 Bug 1163224 - add build system support for multiple Rust crates; r=glandium
Our current build system support for Rust compiles any Rust crate into a
so-called staticlib, which is a static library (.a file) that includes
the Rust runtime. That staticlib is then linked into libxul. For
supporting multiple crates, this approach breaks down, as linking
multiple copies of the Rust runtime is going to fail.

For supporting multiple crates, the approach taken here is to compile
each crate into a so-called rlib, which is essentially a staticlib
without the Rust runtime linked in. The build system takes note of
every crate destined for linking with libxul (treating them like static
libraries generated from C/C++ files), and generates a super-crate,
whimsically named "rul", that is compiled as a staticlib (so as to
include the Rust runtime) and then linked into libxul. Thus only one
copy of the Rust runtime is included, and the Rust compiler can take
care of any inter-crate dependencies.

This patch currently only supports Rust code in shared libraries, not in
binaries.
2016-04-21 09:54:01 -04:00
Carsten "Tomcat" Book 9eb45808ae merge mozilla-inbound to mozilla-central a=merge 2016-04-20 11:50:29 +02:00
Mike Hommey 66ab5aca5c Bug 1264482 - Use the EnumString type for the different values we get out of split_triplet. r=ted 2016-04-19 15:09:37 +09:00
Mike Hommey 3b84e5ed68 Bug 1264482 - Use the EnumString type for the compiler type. r=ted 2016-04-19 15:09:37 +09:00
Mike Hommey f586735fa8 Bug 1264482 - Add an enumeration-like string type with a limited set of possible values. r=ted 2016-04-19 15:09:37 +09:00
Mike Hommey fb65986e09 Bug 1264482 - Fake an arbitrary __name__ in sandboxed global. r=ted 2016-04-19 15:09:37 +09:00
Mike Hommey 0037774d91 Bug 1265063 - Fix the shell quoting regexp to properly match backslashes. r=gps 2016-04-19 15:09:37 +09:00
Bob Silverberg d0c0684cc7 Bug 1263637 - Fix eslint 2 warnings for WebExtensions code. r=kmag
MozReview-Commit-ID: CNLX3xjIoNV

--HG--
extra : transplant_source : T%82%29%1A%0C.%D6%859%EF%F7c%99%84_%BF%90%1C%FCJ
2016-04-18 09:08:05 -04:00
Maja Frydrychowicz 0c371cb3e0 Bug 1261412 - Add mach python-test option to collect tests based on path alone; r=gps
MozReview-Commit-ID: 4rsG6sMPqpv

--HG--
extra : rebase_source : 4ef7599a8d6b60a6a81baf62564eebd92df7a585
2016-04-18 10:21:56 -04:00
Maja Frydrychowicz 50c8a09f37 Bug 1261412 - Relax test output requirement in mach python-test; r=gps
This accounts for default unittest and pytest output formatting,
in addition to mozunit.

MozReview-Commit-ID: 749CD0xQezX

--HG--
extra : rebase_source : 7a451c61d1ec41303b859b8fff4ec3dd2f84064c
2016-04-14 13:06:47 -04:00
Maja Frydrychowicz 6c05aa2a36 Bug 1261412 - Report when mach python-test collects no tests; r=gps
MozReview-Commit-ID: GDlshUUjO7C

--HG--
extra : rebase_source : 21c028d6e77b4ee6eeb9e0040d1d6ea19f79d7f8
2016-03-22 18:53:57 -04:00
Chris Manchester 108befa0c5 Bug 1264703 - Follow up: don't print unhandled BUILDSTATUS messages when running |./mach configure| r=gps
DONTBUILD

MozReview-Commit-ID: BzUnpqreYSb
2016-04-15 17:38:41 -07:00
Chris Manchester 7bc7322566 Bug 1264697 - Change the format of all-tests.json to reduce redundant data. r=gps
The format provided to the build system by the manifest parser is highly redundant:
every test lists all variables for that test, and many tests use a large
support-files entry in DEFAULT that ends up in individual test objects. This
patch stores these DEFAULTS per-manifest rather than per-test to save disk
space, resulting in about a ~22mb smaller all-tests.json file. The
in-memory representation of tests is not changed by this patch, as the defaults
are again propagated to individual tests as all-tests.json is read by the test
resolver.

MozReview-Commit-ID: CEJaevfS5s7
2016-04-15 17:20:04 -07:00
Chris Manchester 73cdc0519a Bug 1264817 - Traverse nspr and icu during disable compile environment builds now that we aren't using their build systems. r=glandium
This also allows us to use the in-tree icu data file for artifact builds.

MozReview-Commit-ID: 4FWd7PV4ONC
2016-04-15 09:17:40 -07:00
Mike Hommey 45128858a8 Bug 1264831 - Defer applying @imports until the function is actually called. r=gps 2016-04-15 18:56:08 +09:00
Mike Hommey 1537683537 Bug 1264831 - Work around issues with the exec statement in older python 2.7 versions. r=gps 2016-04-15 18:56:08 +09:00
Mike Hommey 1cc2a86d6d Bug 1264831 - Try to detect decorators declared in the sandbox and add some automatic @wraps. r=gps 2016-04-15 18:56:08 +09:00
Mike Hommey 5ac7830115 Bug 1264831 - Add a few presumably harmless builtins to the sandbox. r=gps
as well as os.path.normcase.
2016-04-15 18:56:08 +09:00
Mike Hommey f3054520af Bug 1260327 - Expose a MOZ_CONFIGURE_OPTIONS variable containing configure options. r=chmanchester 2016-04-15 08:14:05 +09:00
Mike Hommey e1dc6088a2 Bug 1260327 - Remove the --recheck option of config.status. r=chmanchester
With mozconfigs injecting options, it never really worked as intended.
2016-04-15 08:14:05 +09:00
Mike Hommey 9bb5221e5e Bug 1257448 - Don't emit an error on unknown implied options when their resolved value is None. r=nalexander
imply_option has no effect when the resolved value is None, so the same
logic can be applied when checking for unknown implied options.

This allows to imply options that may not always exist (because they are
in a configure file that is optionally included).

Ideally, it would be better not to do this, but until we have something
better than optionally included configure files for
--disable-compile-environment, this is a necessary evil.
2016-04-15 08:14:05 +09:00
Chris Manchester 6a21a3345a Bug 1256979 - Move MOZ_CHROME_FILE_FORMAT to Python configure. r=glandium
The config variable is re-named to avoid confusion, because it is not set by
--enable-chrome-format.

MozReview-Commit-ID: 37gvjGGSkRc
2016-04-14 12:26:38 -07:00
Mike Hommey 3098248f0e Bug 1256571 - Change the execution model of python configure. r=chmanchester
So far, everything was essentially executed at "declaration". This
made the sandbox code simpler, but to improve on the tooling around
python configure (for tests and introspection), we need to have more
flexibility, which executing everything at declaration doesn't give.

With this change, only @depends functions depending on --help, as
well as templates, are executed at the moment the moz.configure
files are included in the sandbox. The remainder is executed at the
end.
2016-04-14 07:29:42 +09:00
Mike Hommey f7fa631d45 Bug 1256571 - Allow ConfigureSandbox.run to not include a given file. r=chmanchester 2016-04-14 07:29:42 +09:00
Mike Hommey 9da99bc058 Bug 1256571 - Rename ConfigureSandbox.exec_file to include_file. r=chmanchester 2016-04-14 07:29:42 +09:00
Mike Hommey 6f3578276f Bug 1256571 - Move applying implied options to ConfigureSandbox._value_for(). r=chmanchester 2016-04-14 07:29:42 +09:00
Mike Hommey ee283cf2ee Bug 1256571 - Move running @depends functions to ConfigureSandbox._value_for(). r=chmanchester 2016-04-14 07:29:42 +09:00
Mike Hommey 5527cfee67 Bug 1256571 - Move Options handling to ConfigureSandbox._value_for(). r=chmanchester 2016-04-14 07:29:42 +09:00
Mike Hommey f4f04ae1c2 Bug 1256571 - Ensure consistent values for variables in closures. r=chmanchester 2016-04-14 07:29:42 +09:00
Mike Hommey dd20a01b39 Bug 1256571 - Delay resolving the reason for an implied option. r=chmanchester 2016-04-14 07:29:42 +09:00
Mike Hommey 56bbf297c7 Bug 1256571 - Add a generic method to get the results of Options and DependsFunctions. r=chmanchester
instead of manually reading the member variable containing the results.
2016-04-14 07:29:42 +09:00
Mike Hommey a1c0231f85 Bug 1256571 - Move resolving @depends dependencies to just before running the decorated function. r=chmanchester 2016-04-14 07:29:42 +09:00
Andrew Halberstadt e34562488e Bug 1255450 - mach settings documentation fix, DONTBUILD, r=me
MozReview-Commit-ID: AQ3w2oCPQeN

--HG--
extra : topic : bar
extra : rebase_source : 2e0de1688fca11bd62c88bd66ef9cf9ad97206f8
extra : amend_source : 45c025594d645a9252989c8f13387de05e49d4dd
2016-04-12 21:03:36 -04:00
Mike Hommey 6684d3c1ee Bug 1259382 - Make mozbuild.shellutil.quote more useful for e.g. creating printable command lines. r=ted 2016-04-13 17:11:36 +09:00
Mike Hommey 36a7c444e8 Bug 1263296 - Work around getpreferredencoding inconsistencies. r=gps
Whether it uses locale._parse_localename or nl_langinfo makes it have completely
different results in weird and/or widespread locale settings (LC_ALL=UTF-8 or
LC_ALL=C).
2016-04-13 06:54:22 +09:00
Mike Hommey 45c833afcb Bug 1254374 - Add various failure tests to test_configure.py. r=nalexander
At the same time, improve some of the failures handling paths.
2016-04-13 06:54:22 +09:00
Mike Hommey 5311ba292c Bug 1254374 - Add exception message checks to test_options.py. r=nalexander 2016-04-13 06:54:22 +09:00
Mike Hommey 77a8fe8505 Bug 1254374 - Remove TestConfigure.get_result. r=nalexander 2016-04-13 06:54:22 +09:00
Mike Hommey 03fcfe8491 Bug 1254374 - Remove the old TestConfigure.test_imports test. r=nalexander
It now duplicates the test added in bug 1256573, which is actually better.
2016-04-13 06:54:22 +09:00
Mike Shal 15969d8d22 Bug 1245701 - Allow absolute paths with wildcards in FINAL_TARGET_FILES; r=glandium
MozReview-Commit-ID: AnD0NeQrIpD

--HG--
extra : rebase_source : 0ddb0ecb7c44659493fe29d0523a4ddc721befe4
2016-04-05 17:40:31 -04:00
Andrew Halberstadt 683014d78f Bug 1255450 - [mach] Create setting for defining command aliases, r=gps
These config options can be defined in ~/.mozbuild/machrc or topsrcdir/machrc.
Aliases work similar to the identically named option in an hgrc.

For example:

[alias]
browser-test = mochitest -f browser
mochitest = mochitest -f plain


MozReview-Commit-ID: CnOocEslRUI

--HG--
extra : rebase_source : 2a6fa154aca7fea8f159ed840728951a37bc52ec
2016-03-23 17:34:35 -04:00
Andrew Halberstadt fbc37fe116 Bug 1255450 - [mach] Enable runtime configuration files, r=gps
Runtime configs have been implemented for awhile, but disabled. This patch
enables configuration. Config files will be loaded in the following order
(later files override earlier ones):

1a. $MACHRC
1b. $MOZBUILD_STATE_PATH/machrc (if $MACHRC is unset)
2. topsrcdir/machrc
3. CLI via --settings

Note: .machrc may be used instead of machrc if desired.

MozReview-Commit-ID: IntONAZLGML

--HG--
extra : rebase_source : ff79b129eaea7cca5064d30fa6ddc76fceb9669b
2016-03-28 11:18:24 -04:00
Andrew Halberstadt e0018e5245 Bug 1255450 - [mach] Simplify managing of locale documentation for settings, r=gps
This adds a |mach settings locale-gen| subcommand to automatically generate locale
specific documentation for settings. It also refactors |mach settings-create| to
|mach settings| and moves |mach settings| to |mach settings -l|. Finally it performs
some misc cleanup mostly related to locales.

MozReview-Commit-ID: 1VWLcb9ehAH

--HG--
extra : rebase_source : 8f580217123d79e66323ca4be948a3297ae4ced3
2016-03-23 17:49:15 -04:00
Andrew Halberstadt c105e8a3b4 Bug 1255450 - [mach] Implement 'wildcard' settings for enabling sections with user-defined options, r=gps
Some sections should support user-defined options. For example, in an [alias] section, the option names
are not well-defined, rather specified by the user. This patch allows user-defined option names for any
section that has a 'section.*' option defined. Even with 'section.*', option types are still well-defined.

MozReview-Commit-ID: L34W9v9Fy28

--HG--
extra : rebase_source : 9333f552edead9bf1cf464e28ef8fbbb9bed5597
2016-03-28 10:52:16 -04:00
Andrew Halberstadt 5167efa8e4 Bug 1255450 - [mach] Replace ConfigProvider class with config_settings attribute, r=gps
Defining settings was a little complicated. First it required overriding a '_register_settings'
method, and then it required making N calls to a second 'register_setting' method within that.

This patch simplifies the process of defining settings by only requiring a
'config_settings' attribute. This attribute should be a list of tuples:

[
  ('<section>.<option>', '<type>', <default>, set(<choices)),
]

`default` and `choices` are optional. Alternatively, 'config_settings' can be a callable
that returns a list of tuples in the same format. This still allows for greater flexibility
for more advanced cases.

MozReview-Commit-ID: F4DTTNJdJsa

--HG--
extra : rebase_source : e3dd455ba559cd3992c9c1b3eaf021c9e0707cc1
2016-03-21 17:55:41 -04:00
Chris Pearce 0bc89f86e9 Bug 1263506 - Ensure MOZ_GMP_PATH in gtests always has native dir separators. r=glandium
Without this, the GeckoMediaPlugin gtests fail, as the GMP stack is unable to
load GMPs from disk.

MozReview-Commit-ID: GGXdm2L5IF9
2016-04-12 16:12:19 +12:00
Chris Manchester 13b3496e7a Bug 1263436 - Show artifact build download progress by default. r=nalexander
MozReview-Commit-ID: 2kdEx87MRQm

--HG--
extra : rebase_source : 24490750a953dc9596118475d298a2115d66b3ad
2016-04-11 16:39:11 -07:00
Andreas Farre dc5d8fed7a Bug 1254313 - Log less when running mach run --debug within emacs. r=gps
Check if the INSIDE_EMACS environment variable is set and change the
log level to WARNING to not confuse the emacs/mi with logging messages.

MozReview-Commit-ID: 5AWZ6swGJsE

--HG--
extra : transplant_source : b%24%8Ff6%968%8A%02%E2%07%DD%C6Y9E%CB%7C.%E4
2016-04-11 11:20:52 -04:00
Chris Manchester 52083635d3 Bug 1261456 - Combine support-files listed in [DEFAULT] with any listed per-test rather than overriding. r=gps
This requires a change to how we process test manifests in the build system:
now, whenever we see a support file mentioned in a manifest, we require that
file isn't already in that test's support files, but if we see a support file
that was already seen in some other test, the entry is ignored, but it is not
an error. As a result of this change, several duplicate support-files entries
needed to be removed.

MozReview-Commit-ID: G0juyxzcaB8

--HG--
rename : testing/mozbase/manifestparser/tests/test_default_skipif.py => testing/mozbase/manifestparser/tests/test_default_overrides.py
2016-04-11 11:21:20 -07:00
Sebastian Hengst 364386e3cf Backed out changeset cb4b18566f30 and 7c4d19e3376f (bug 1163224) for build bustage. r=backout on a CLOSED TREE 2016-04-11 19:43:04 +02:00
Andrew Halberstadt 3098112a41 Bug 1262495 - [mach] Allow running root commands that have subcommands on their own, r=gps
For example, say there is a command 'foo' that has a subcommand 'bar'. Prior to this, it was not
possible to run:
./mach foo

as its own independent command. The above would instead print the subcommand help for 'bar'.

MozReview-Commit-ID: JU4dXoxnCyu

--HG--
extra : rebase_source : bb15532ad39456b270071bc60d7b15e15af04e48
2016-04-06 11:41:13 -04:00
Nathan Froyd 45af5cd66c Bug 1163224 - add build system support for multiple Rust crates; r=glandium
Our current build system support for Rust compiles any Rust crate into a
so-called staticlib, which is a static library (.a file) that includes
the Rust runtime.  That staticlib is then linked into libxul.  For
supporting multiple crates, this approach breaks down, as linking
multiple copies of the Rust runtime is going to fail.

For supporting multiple crates, the approach taken here is to compile
each crate into a so-called rlib, which is essentially a staticlib
without the Rust runtime linked in.  The build system takes note of
every crate destined for linking with libxul (treating them like static
libraries generated from C/C++ files), and generates a super-crate,
whimsically named "rul", that is compiled as a staticlib (so as to
include the Rust runtime) and then linked into libxul.  Thus only one
copy of the Rust runtime is included, and the Rust compiler can take
care of any inter-crate dependencies.

This patch currently only supports Rust code in shared libraries, not in
binaries.  The handling for the rul crate is placed in the common
backend, with a special hook for derived backends to handle shared
library objects.
2016-04-11 11:05:44 -05:00
Wes Kocher dfc7e5253f Merge m-c to inbound, a=merge
MozReview-Commit-ID: 9YZdlIARozU
2016-04-08 16:47:03 -07:00
Dave Townsend 66e6b814ee Bug 1257246: Update the version of eslint that mach installs. r=gps
MozReview-Commit-ID: mcb4QwtM96

--HG--
extra : rebase_source : 710a89b734eaae190584a6d9a34335b9c22039a3
extra : histedit_source : 64fc37853702895e49a4aaf3a441ddacf211a203
2016-03-17 10:58:12 -07:00
Dave Townsend f2c61524b0 Bug 1262978: Run npm to get the path to installed binaries if eslint can't otherwise be found. r=gps
MozReview-Commit-ID: HFWID6QhpS2

--HG--
extra : rebase_source : bed90ecf7b59b348ec5047c9ac9e8cc31a2aa193
extra : amend_source : 97f81e0bb34098c1aaad1b2ad4355d3f0ad6f72c
2016-04-07 13:18:40 -07:00
George Wright e75c590407 Revert "Bug 1114647 - Rename "plugin-container" to "firefox-webcontent" and create a new executable target for Win32 called "firefox-plugin-container" r=ted,jhamer" because of widespread breakage due to whitelisted executable names in third parties
This reverts commit a94b5f861bd0d25043a3bb7a0c3128acf8c0b93a.


--HG--
rename : ipc/contentproc/firefox-webcontent.cpp => ipc/contentproc/plugin-container.cpp
2016-04-08 13:34:40 -04:00
Ryan VanderMeulen 76ab6cf240 Bug 1262207 - Add a nightly_build entry to mozinfo. r=ahal
--HG--
extra : rebase_source : 5ce90a4c5ac0dd6efe8eeca61a4ec2b90fe9b569
2016-04-06 12:04:29 -04:00
Mike Shal a1f020d488 Bug 1261283 - allow GENERATED_FILES to write to multiple outputs; r=glandium
MozReview-Commit-ID: DbBoZZnasTo
2016-04-01 10:38:22 -04:00
Mike Hommey c0808e5f6d Bug 1262087 - Make the @checking callback not alter the behavior for bools. r=chmanchester 2016-04-06 07:25:26 +09:00
Mike Hommey 6878c848b4 Bug 1262087 - Use textwrap.dedent in test_checks_configure.py. r=chmanchester 2016-04-06 07:25:15 +09:00
Chris Manchester b5ce5e9f35 Bug 1262231 - Fix handling of ICU for artifact builds. r=nalexander
The data file is required as of bug 1239083.

MozReview-Commit-ID: XhETIoUYH8

--HG--
extra : rebase_source : 2d1200a72dadb3e0e8211fa58d3f07bc2453061f
2016-04-05 13:00:21 -07:00
Mike Hommey c977f50c17 Bug 1261018 - Make log.queue_debug output debug log when receiving an exception. r=ted 2016-04-05 07:16:44 +09:00
Mike Hommey 8155d8f286 Bug 1261235 - Handle non-ascii in configure logging. r=ted
When reading config.log, with old-configure output, we may get non-ascii
strings, but that currently fails because we're using plain open() to
read it. So use encoded_open() instead (which does the same job for
other files in the same script).

Because the build system can be encapsulated in mach, python configure
can have a pipe as stdout/stderr, and in that case, sys.stdout/stderr
have an ascii encoding, failing to print out anything that doesn't
fit in ascii, consequently failing to print the things we've read from
config.log. So reopen stdout and stderr with the right encoding in
the configure output handler.
2016-04-05 07:16:44 +09:00
Chris Manchester a7138cfc10 Bug 1242051 - Install test files to the objdir lazily rather than with each invocation of mach. r=gps
This moves test installation for test files out of the monolithic install
manifest for $objdir/_tests, and determines the test and support files
to install based on the object derived from all-tests.json. Additionally,
the files resulting from TEST_HARNESS_FILES are installed, as some tests
will depend on them.

As a result, the time to install tests when invoking the test runner will
scale with the number of tests requested to run rather than the entire set
of tests in the tree, resulting in significantly less overhead.

MozReview-Commit-ID: LeIrUVh1yD4
2016-04-04 14:56:52 -07:00
Chris Manchester fc15bfd0ee Bug 1242051 - Extract support files processing from the emitter. r=gps
This extracts the logic from the emitter that handles support files in ini
manifests to a seperate function in testing.py, so that this logic can be
re-used to determine how to install all the files necessary to run a particular
test fon the corresponding object in all-tests.json.

MozReview-Commit-ID: GSEhEGm09IL
2016-04-04 14:56:52 -07:00
Nick Alexander bc6d047594 Bug 1261438 - Generalize Android artifact package names. r=chmanchester
DONTBUILD NPOTB

If the target triple is noisy, let's just accept -arm and -i386
instead of being strict.  We can be more strict when things have
settled.

MozReview-Commit-ID: FDNJ3TuY51d

--HG--
extra : rebase_source : 3db70abe6818fbe0360406f20de899867232df02
extra : amend_source : d324c229b1713adb844407078d6cc4d00d84b56d
2016-04-01 14:28:42 -07:00
Nathan Froyd 276caac476 Bug 1260749 - quiet unpacking of Android SDK and NDK downloads; r=nalexander
We send the output to /dev/null or equivalent, but there's no need to
generate a bunch of extraneous output and consume cycles unnecessarily.
2016-03-30 10:46:14 -04:00
Wes Kocher 56b7127be0 Merge fx-team to central, a=merge
MozReview-Commit-ID: 8rupfWq5Wa6
2016-04-01 15:43:36 -07:00
Mike Shal 2176c3ac7f Bug 1259806 - Remove toolkit/components/ctypes/tests/Makefile.in; r=ted
MozReview-Commit-ID: EVCZVXukFQf
2016-03-25 14:25:17 -04:00
Carsten "Tomcat" Book e873a45f68 Merge mozilla-central to fx-team 2016-04-01 11:49:37 +02:00
Mike Hommey ad20b091b6 Bug 1260624 - Add support for simple comparisons of ReadOnlyNamespaces. r=ted 2016-04-01 09:43:26 +09:00
George Wright 5c454494ce Bug 1114647 - Rename "plugin-container" to "firefox-webcontent" and create a new executable target for Win32 called "firefox-plugin-container" r=ted,jhamer
--HG--
rename : ipc/app/module.ver => ipc/app/plugin-container/module.ver
rename : ipc/contentproc/plugin-container.cpp => ipc/contentproc/firefox-webcontent.cpp
2016-04-01 02:12:59 -04:00
Nick Alexander 9ab9fa5451 Bug 1260241 - Implement Fennec packaging in Python. r=glandium
A few notes:

* This doesn't accommodate general OMNIJAR_NAME definitions.  The
  current name (assets/omni.ja) is baked into the product in a few
  places, and is very unlikely to change, so we just error out if this
  isn't true.

* This makes the package-manifest.in file authoritative for what goes
  into assets/, libs/, and the APK root.  Previously,
  package-manifest.in wrote into assets/ and libs/ but
  upload-files-APK.mk also had a convoluted DIST_FILES filtering
  process to work through before a file actually made it into the APK.

* This is intentional about repackaging.  It simplifies the repackage
  step rather than trying to make unpackage-then-repackage the same as
  just package.  I pretty much never get repackaging correct the first
  time; this should help.  (I've manually tested it.)

* The ALREADY_SZIPPED during repackaging is subsumed by the previous
  check if UNPACKAGE is set.  The custom linker expects stored, not
  deflated, libraries, so there's some small legwork to accommodate
  that in mozjar.

MozReview-Commit-ID: JvVtIUSX685

--HG--
extra : rebase_source : fd8a9cfe3dc364d23b1065995db599f99e676e38
2016-03-28 20:01:07 -07:00
Nick Alexander 45f7d697fc Bug 1260241 - Pre: Add compress option to Jarrer.add. r=glandium
MozReview-Commit-ID: FWXeBOi9FTY

--HG--
extra : rebase_source : 290bb95e0d9133094c4bf4b99f04ccd3c598c6d8
2016-03-28 19:02:05 -07:00
Mike Hommey f6cb862439 Fixup test_check_configure after bug 1260066 on a CLOSED TREE. r=me 2016-03-30 08:36:32 +09:00
Mike Hommey 9d9550f0f5 Fixup bug 1256573 to work on buggy older python on a CLOSED TREE. r=me 2016-03-30 08:15:44 +09:00
Mike Hommey f1ed025e8b Bug 1260066 - Don't allow to use sandbox primitives from anywhere but global scope and templates. r=nalexander
The initial goal of templates was to provide a way to write shorter
constructs for some generic tasks during configure. But the limitations
of the sandbox and the properties of templates made them used for more
general functions.

Consequently, this led to templates having to be available from
anywhere, which, in turn, led to difficult to introspect constructs.
With bug 1257823, we've made almost everything use set_config and
similar functions from the global scope, but we don't enforce that
those primitives are only used at the global scope.

This change does that: it enforces that primitives are only used at
the global scope. Or in templates.

Now, since templates were used for other purposes than generic uses
of other primitives, we now allow non-template functions to be declared.
Those can be used everywhere, but don't have access to the sandbox
primitives.
2016-03-30 07:08:00 +09:00
Mike Hommey 2a7c335181 Bug 1256573 - Remove the @advanced primitive. r=nalexander 2016-03-30 07:07:55 +09:00
Mike Hommey 9877dc7b96 Bug 1256573 - Switch configure tests to use @imports instead of @advanced. r=nalexander 2016-03-30 07:07:52 +09:00
Mike Hommey abc3477a74 Bug 1256573 - Add a new @imports primitive that allows to import modules into the decorated functions. r=nalexander
Currently, we have @advanced, that gives the decorated functions access
to all the builtins and consequently, to the import statement.
That is a quite broad approach and doesn't allow to easily introspect
what functions are importing which modules.

This change introduces a new decorator that allows to import modules one
by one into the decorated functions.

Note: by the end of the change series, @advanced will be gone.
2016-03-30 07:07:50 +09:00
Mike Hommey 0ea59bc1a8 Bug 1256573 - Add missing primitives to the ConfigureSandbox documentation. r=nalexander
Not directly related, but since this bug is about to add another primitive...
2016-03-30 07:07:48 +09:00
Mike Hommey 943acf7e2b Bug 1259351 - Properly sandbox functions that are decorated with templates. r=nalexander 2016-03-30 07:07:47 +09:00
Mike Hommey 6eee113ee8 Bug 1259960 - Make check_prog more flexible about the list of programs it will check. r=chmanchester 2016-03-30 07:07:42 +09:00
Mike Hommey 028ebf69ff Bug 1259960 - Make check_prog more flexible about the input it receives. r=chmanchester 2016-03-30 07:07:40 +09:00
Mike Hommey 18a002cd83 Bug 1259960 - Allow to pass a string to check_prog to describe what is being looked for. r=chmanchester
So far, we've been using the lowercase of the variable name, but it's
not enough for some special cases. Those special cases could do their
own business, but then, they'd have to duplicate 90% of check_prog,
which is less desirable.
2016-03-30 07:07:38 +09:00
Mike Hommey 29c3394b1b Bug 1259960 - s/DummyFunction/DependsFunction/. r=chmanchester
While DummyFunction is descriptive of what the instances are (and they
can't even be called), the various uses of isintance(obj, DummyFunction)
are kind of confusing, especially when they are in moz.configure land
(and this bug is about to add another one).
2016-03-30 07:07:37 +09:00
Mike Hommey cbf367717b Bug 1257516 - Make check_prog opt-in to the queued debug log messages. r=ted 2016-03-30 07:07:13 +09:00
Mike Hommey 97ea49f191 Bug 1257516 - Allow to assign Exceptions in the global scope. r=ted
But do not advertise it too much.
2016-03-30 07:06:26 +09:00
Mike Hommey c7b519d6df Bug 1257516 - Make the ConfigureOutputHandler keep some debug messages to print out when an error occurs. r=ted
The feature is made opt-in by using a context manager.
2016-03-30 07:06:20 +09:00
Mike Hommey a2c9191daf Bug 1257516 - Add a unit test for check_prog(). r=ted
At the same time, shell quote the result it prints if it needs to be.
2016-03-30 07:00:22 +09:00
Mike Hommey 0e183bb384 Bug 1257516 - Allow the log_handle given to the virtualenv manager to be a file-like object. r=ted
subprocess functions doesn't directly take file-like objects, so add a
minimalistic wrapper to do the right thing instead of subprocess.call
when given a file-like object.
2016-03-30 07:00:12 +09:00
Mike Hommey ba80937ba0 Bug 1257516 - Send the debug output from our logger to config.log. r=ted
And since the file is also used for old-configure, close our handle on
the file before spawning old-configure, and make old-configure append
there instead of truncating the file.
2016-03-30 07:00:07 +09:00
Mike Hommey 47d916d8f0 Bug 1257516 - Expose a sandboxed logger to moz.configure and use it. r=ted
This removes the warn() function and makes the die() function use the logger
instead of print.
2016-03-30 07:00:03 +09:00
Mike Hommey c15e6d00c5 Bug 1257516 - Initialize a logger for the ConfigureSandbox, and use it for the help. r=ted 2016-03-30 06:59:59 +09:00
Mike Hommey e22a5082f7 Bug 1257516 - Add a file-like class that sends writes to a callback. r=ted 2016-03-30 06:59:37 +09:00
Mike Hommey cf67fa8b15 Bug 1257516 - Add a logging handler class to print out configure output on stdout/stderr. r=ted 2016-03-30 06:58:09 +09:00
Nicholas Nethercote 0f418f3874 Bug 1253512 (part 1) - Overhaul DMD's "sampling". r=erahm.
DMD currently uses a very hacky form of "sampling" by default to avoid
recording stack traces for all blocks. This makes DMD run faster than when it
records all stack traces.

This patch changes the sampling method used; in fact, it avoids "sampling" at
all. The existence of all heap blocks is now recorded exactly, but by default
we only record an allocation stack for each heap block if a Bernoulli trial
succeeds. This choice works well because getting the stack trace is ~100x
slower than recording the block's existence.

Overall, this approach is simpler and it also gives better output -- the choice
of which blocks to record allocation stacks for is mathematically sound, no
stack trace gets blamed for allocations it didn't do, and block counts and
sizes are now always exact.

Other specific things changed.

- All notion of sampling is removed from the various data structures.

- The --sample-below option is removed in favour of --stacks={partial,full}.

- The format of the JSON output file has changed.

- The names of various test files have changed to reflect concept changes.

--HG--
rename : memory/replace/dmd/test/full-empty-cumulative-expected.txt => memory/replace/dmd/test/complete-empty-cumulative-expected.txt
rename : memory/replace/dmd/test/full-empty-dark-matter-expected.txt => memory/replace/dmd/test/complete-empty-dark-matter-expected.txt
rename : memory/replace/dmd/test/full-empty-live-expected.txt => memory/replace/dmd/test/complete-empty-live-expected.txt
rename : memory/replace/dmd/test/full-unsampled1-dark-matter-expected.txt => memory/replace/dmd/test/complete-full1-dark-matter-expected.txt
rename : memory/replace/dmd/test/full-unsampled1-live-expected.txt => memory/replace/dmd/test/complete-full1-live-expected.txt
rename : memory/replace/dmd/test/full-unsampled2-cumulative-expected.txt => memory/replace/dmd/test/complete-full2-cumulative-expected.txt
rename : memory/replace/dmd/test/full-unsampled2-dark-matter-expected.txt => memory/replace/dmd/test/complete-full2-dark-matter-expected.txt
rename : memory/replace/dmd/test/full-sampled-live-expected.txt => memory/replace/dmd/test/complete-partial-live-expected.txt
extra : rebase_source : 47d287405dc5e9075f08addaba49e879c2c6e23f
2016-02-24 14:42:22 +11:00
Mike Hommey 272cfa7a49 Bug 1259683 - Don't make imply_option() do anything when --help is on the command line. r=nalexander
This also adds the same tests that exist for set_config and set_define
and that would have caught the `configure --help` breakage this change
fixes.
2016-03-26 10:34:29 +09:00
Mike Hommey 2651933d3a Bug 1259683 - Forgotten change to test_configure.py before landing bug 1257823. r=nalexander
This was suggested during review, and was applied to 2 of the 3 patches
where this applied, and the imply_option tests were left out. This fixes
it.
2016-03-26 10:34:29 +09:00
Mike Hommey 7ff92bc0ec Bug 1259683 - Miscellaneous small cleanups in the mozbuild.configure module. r=nalexander
This is not related to the bug, but are drive-by cleanups.
2016-03-26 10:34:29 +09:00
Mike Shal d4bd3eb4ca Bug 1252931 - Add support for generic OBJDIR_FILES and OBJDIR_PP_FILES; r=gps
MozReview-Commit-ID: 6H435DeMHie
2016-03-17 09:13:36 -04:00
aleth 6da499d398 Bug 1259174 - Fix absolute paths in TEST_HARNESS_FILES. r=mshal
--HG--
extra : amend_source : 73b8a4ad68d24ff5f04c17d95423565070aac04b
2016-03-23 22:44:12 +01:00
Gregory Szorc 4a5c6aaf2d Bug 1259551 - Add --no-download to virtualenv.py invocation; r=ted
Before, virtualenv.py may have attempted to use 3rd party
(untrusted) pip indices when installing wheels for pip,
setuptools, and wheel. These dependencies are vendored in
the tree for a reason. So don't let virtualenv contact the
outside world.

MozReview-Commit-ID: 6BCU0WegJO1

--HG--
extra : rebase_source : 6231235486e8cfa784e67e8b18004dd63d8aaf36
2016-03-24 12:34:47 -07:00
Gregory Szorc 4262e28d06 Bug 1259551 - Upgrade vendored virtualenv to 15.0.1; r=ted
While we're addressing virtualenv foo, let's ensure we are running
the latest version. This also pulls in newer versions of pip (8.1.1),
setuptools (20.3), and wheel (0.29.0).

MozReview-Commit-ID: G5uSy66Kd6u

--HG--
extra : rebase_source : 804f230adcf77335c79a93537d9623ac3836d9bf
2016-03-24 12:21:55 -07:00
Mike Hommey 6a8ed3e4a8 Bug 1257823 - Move imply_option() to the global scope. r=nalexander
Like set_config and set_define, we move imply_option to the global
scope.
2016-03-24 09:04:28 +09:00
Mike Hommey 92c7aa3e65 Bug 1257823 - Keep track of the dependencies of @depends functions. r=nalexander
@depends functions are declared like the following:

  @depends('--option', other_function, '--other-option', ...)
  def ...

To simplify some of the processing related to those arguments it's
passed, keep a tuple of Option and DummyFunction objects corresponding
to those arguments.
2016-03-24 09:04:28 +09:00
Mike Hommey e5cde501da Bug 1257823 - Move set_define() to the global scope. r=nalexander
For the same reasons as set_config is being moved to the global scope,
we're moving set_define to the global scope here. An additional change
is that set_define is now part of the sandbox itself instead of being
defined within the sandbox, which makes it share the implementation
details with set_config.
2016-03-24 09:04:28 +09:00
Mike Hommey 7cd6c430c1 Bug 1257823 - Move set_config() to the global scope. r=nalexander
The way set_config is set currently makes it difficult to introspect
moz.configure files to know what configuration items are being set,
because they're hidden in the control flow of functions.

This makes some of the moz.configure more convoluted, but this is why
there are templates, and we can improve the recurring cases afterwards.
2016-03-24 09:04:28 +09:00
Mike Hommey 8e6cfd60f3 Bug 1257823 - Split ConfigureSandbox._db. r=nalexander
Currently, ConfigureSandbox._db stores two different kind of
information. This split those in two different instance variables
instead, making things clearer.
2016-03-24 09:04:28 +09:00
Mike Hommey ed5e2c39f5 Bug 1257823 - Move set_define() to the sandbox. r=nalexander
In order to make the transition to global set_define easier, move its
current definition from inside the sandbox to the sandbox itself.
2016-03-24 09:04:28 +09:00
Mike Hommey a8db2a2c62 Bug 1258619 - Properly sandbox functions inside a template. r=chmanchester
The way functions are being sandboxed in moz.configure land is that
their global namespace is being replaced with a limited and identifiable
dict. And we avoid re-wrapping a function that already received this
treatment.

The problem is that template functions have their global namespace
replaced, and any function that is defined within the template inherits
that global namespace. So when it comes time to wrap those functions
defined in templates with e.g. depends, we detect that they're already
wrapped although they are not, because we look if their global namespace
is of the recognizable type we use when replacing it.

So instead of looking at the global namespace type, keep track of all
functions that are wrapped.
2016-03-23 13:24:54 +09:00
Timothy Guan-tin Chien ebce64ec9e Bug 1257783 - mach-bootstrap: ask git user to clone hg.mozilla.org with git-cinnabar. r=gps
MozReview-Commit-ID: 8lkPECJCpEz

--HG--
extra : rebase_source : 835b76638071d8410ac0ed22709092e31cb8bb4f
2016-03-22 11:05:50 +08:00
Mike Hommey 68c5ab1790 Bug 1258615 - Remove the "magic" that sets a result from set_config() in @depends functions. r=chmanchester
Currently, if a @depends function doesn't have a return statement or
return None, a result is automatically set from all the set_config()
called from the function.

As we're going to move set_config to the global namespace, and as this
feature is only used once, and it's only used for something that was
written before ReadOnlyNamespace was exposed to the sandbox, we can
"safely" get rid of it.
2016-03-23 06:51:10 +09:00
Gregory Szorc 79ad6e2449 Bug 1258574 - Allow JARReader to read data already in memory; r=glandium
This will be needed to teach artifact builds to extract files from
omni.ja files whose content is loaded into memory (from a tar
archive).

MozReview-Commit-ID: LH2HkKx5Zj3

--HG--
extra : rebase_source : 7f6b176f0ef9fc87889151d1d02da62de8a455d8
extra : source : 266928b5a7615fa054c70adf0f649cbb3f085e8d
2016-03-21 16:36:22 -07:00
Ted Mielczarek 5986418419 bug 1257607 - Add Version type to moz.configure. r=glandium
This change adds a `Version` type to moz.configure which is a small
wrapper around `distutils.version.Version`. It's suitable for wrapping
version numbers in configure checks and doing equality or greater-than
less-than comparisons in a sensible way.

MozReview-Commit-ID: BOL6yvemulG

--HG--
extra : rebase_source : 3b463eac0499086f8acffda0d01418b6ab17f3d6
extra : amend_source : aebd6e40c408d9f868623b2f53fcdf7455e2fff5
2016-03-17 11:52:18 -04:00
Ted Mielczarek 8f2baa8e8b bug 1257542 - check_prog template should sanity check that progs is not a string. r=glandium
In Python parens around an expression without a trailing comma is not a tuple,
so ('foo') == 'foo'. This is really easy to screw up with check_progs, which
coerces progs to a list and would give you ['f','o','o'] in this case. This
patch enforces that the progs argument is a tuple or list and errors if it
is not.

MozReview-Commit-ID: 7BJZuF9B8D5

--HG--
extra : rebase_source : 5db9a6b4bb9ef7195c2513407810093bff5e9174
extra : amend_source : f67ab46c2ac00a2a95cfc67e9763ac12b690ac14
2016-03-17 11:04:12 -04:00
Carsten "Tomcat" Book f298917442 merge mozilla-inbound to mozilla-central a=merge 2016-03-17 11:00:17 +01:00
Richard Newman 89a12baeec Bug 1220184 - Eliminate Gingerbread compatibility. r=froydnj, r=nalexander
MozReview-Commit-ID: E5Ng6Y0IEU9

--HG--
extra : rebase_source : c65fae2ceaf486e536ea617e7912b3e8d97be755
extra : amend_source : cfd90e7b157a23fbe7a07e384d4702dadb603835
2016-02-24 09:25:14 -08:00
Mike Hommey c15884c85a Backout changeset 37f3e53ede1f (bug 1257049) because of bustage. 2016-03-16 11:22:43 +09:00
Mike Hommey 2891514755 Bug 1257049 - Stop spawning a separate process for config.status from configure.py. r=gps 2016-03-16 10:55:10 +09:00
Mike Shal 4c30a996ad Bug 1256033 - Allow GENERATED_FILES scripts to depend on other generated files; r=glandium
If we add an ObjDirPath as an input to a GENERATED_FILES script, we
should run it in the misc tier to ensure the dependent files are created
beforehand. We need to use Path objects instead of raw filenames in the
GeneratedFile object so the recursive make backend can distinguish
between source and objdir files.


MozReview-Commit-ID: 9thHTi75zdI
2016-03-11 19:25:24 -05:00
Mike Hommey 4ed6eca117 Bug 1257136 - Allow to pass configure options from mach configure. r=gps 2016-03-17 07:21:37 +09:00
Mike Hommey bc3a6199df Bug 1257104 - Allow options with choices and possibly no given values. r=ted
While rare, this is something we support for e.g. --enable-eme, where it
can be either given with no values, "adobe", some future other EME GMP
adapter names, or a combination of them.
2016-03-17 07:21:37 +09:00
Ted Mielczarek 7b1faa29bc bug 1255479 - make `mach python-tests` use TestResolver for discovery, make `mach test` work for python tests. r=nalexander
MozReview-Commit-ID: CK2Vh6gdnb0

--HG--
extra : rebase_source : 2b1b05224ade41ad500dc66116beb3b091db9cde
extra : amend_source : 349f7cc876383d873acb1c73c0118d394f39284d
extra : histedit_source : 6d1d44188bb3a4fc69da2900e8118ce2a88a5fd7
2016-03-10 12:30:10 -05:00
Ted Mielczarek d74aee95c9 bug 1255479 - add PYTHON_UNIT_TESTS to all-tests.json. r=nalexander
MozReview-Commit-ID: HJ6ohvEOgdX

--HG--
extra : rebase_source : c41a3ee2a78df27cb7bd71c7a9a7b6991461aaa1
extra : amend_source : c3379ade5a92924f76a1f262e33c7d60bd76bbcb
extra : histedit_source : 87fdbd85f3e5ccdeee9c3c9b5c7afc21da5e7827%2C215cb1cdd4185d1fa3c47cc7858fe309db11058a
2016-03-10 15:42:27 -05:00
Gregory Szorc 062d2e4c6b Bug 1253436 - Write out a machine readable file with binaries metadata; r=glandium
This will make it easier for binaries only archive generation to consult
the list of binaries that are relevant to packaging.

This does overlap somewhat with compile databases. Perhaps someday the
logic could converge.

While I was here, I cleaned up writing of the all-tests.json file to
avoid an intermediate string variable.

This patch adds to_dict methods on some frontend data types. There is
room to improve the serialization of these types. For example, we could
use __slots__ to drive the default formatter. We could also leverage a
custom JSONEncoder class that knows how to call to_dict() on instances.
In the spirit of perfect is the enemy of done, I think this should be
deferred to a follow-up bug.

MozReview-Commit-ID: XVnKB1MNqu

--HG--
extra : source : 4167dfdf10457360c9c94ee6e55b03ef1b92c16d
extra : histedit_source : 2f3f10bbb8ef9da8c57b0d85cbf4ea80242eff1a%2C1a5654253181d75eecd5dfaca2c87e353f8126cd
2016-03-14 21:06:57 -07:00
Gregory Szorc 17a8e3c459 Bug 1253436 - Add __repr__ to BaseLibrary and BaseProgram; r=glandium
Now when we print instances in a debugger, we'll see something like:

<StaticLibrary: other-licenses/snappy/libother-licenses_snappy.a>
<StaticLibrary: toolkit/library/StaticXULComponentsEnd/libStaticXULComponentsEnd.a>
<SharedLibrary: toolkit/library/XUL>
<StaticLibrary: toolkit/library/libxul_s.a>
<HostProgram: config/nsinstall_real>
<Program: memory/replace/logalloc/replay/logalloc-replay>
<SimpleProgram: mfbt/tests/TestArrayUtils>

... instead of the the class name and memory address.

MozReview-Commit-ID: 8zdrM6KfP8U

--HG--
extra : source : 84849ad026c9ba1bbf71c93172b0a03440e51bec
2016-03-11 11:22:48 -08:00
Gregory Szorc 6bc67323f6 Bug 1253436 - Remove unused imports; r=glandium
MozReview-Commit-ID: 494hmTwyldH

--HG--
extra : source : c4a868c76959d3a2e13af6ca5adb0d629dcb2b34
2016-03-11 11:22:28 -08:00
Phil Ringnalda d5bd282a1b Back out 3 changesets (bug 1253436) for build bustage on a CLOSED TREE
Backed out changeset 4167dfdf1045 (bug 1253436)
Backed out changeset 84849ad026c9 (bug 1253436)
Backed out changeset c4a868c76959 (bug 1253436)
2016-03-14 20:22:29 -07:00
Gregory Szorc b7a0aef870 Bug 1253436 - Write out a machine readable file with binaries metadata; r=glandium
This will make it easier for binaries only archive generation to consult
the list of binaries that are relevant to packaging.

This does overlap somewhat with compile databases. Perhaps someday the
logic could converge.

While I was here, I cleaned up writing of the all-tests.json file to
avoid an intermediate string variable.

This patch adds to_dict methods on some frontend data types. There is
room to improve the serialization of these types. For example, we could
use __slots__ to drive the default formatter. We could also leverage a
custom JSONEncoder class that knows how to call to_dict() on instances.
In the spirit of perfect is the enemy of done, I think this should be
deferred to a follow-up bug.

MozReview-Commit-ID: XVnKB1MNqu

--HG--
extra : rebase_source : 376c93467dde3450c7c21cff918cb34913a3c5fe
2016-03-14 19:31:35 -07:00
Gregory Szorc cd4ba92951 Bug 1253436 - Add __repr__ to BaseLibrary and BaseProgram; r=glandium
Now when we print instances in a debugger, we'll see something like:

<StaticLibrary: other-licenses/snappy/libother-licenses_snappy.a>
<StaticLibrary: toolkit/library/StaticXULComponentsEnd/libStaticXULComponentsEnd.a>
<SharedLibrary: toolkit/library/XUL>
<StaticLibrary: toolkit/library/libxul_s.a>
<HostProgram: config/nsinstall_real>
<Program: memory/replace/logalloc/replay/logalloc-replay>
<SimpleProgram: mfbt/tests/TestArrayUtils>

... instead of the the class name and memory address.

MozReview-Commit-ID: 8zdrM6KfP8U

--HG--
extra : rebase_source : 7f964ad44a0061674f77d5716a6769a4aedb9e6c
2016-03-11 11:22:48 -08:00
Gregory Szorc 7b3913cab5 Bug 1253436 - Remove unused imports; r=glandium
MozReview-Commit-ID: 494hmTwyldH

--HG--
extra : rebase_source : 998f2b447df9ba023d0b12d4d70563e76e3bf0f7
2016-03-11 11:22:28 -08:00
Gregory Szorc c64c49d5ba Bug 1255963 - Detect warnings without space after line number; r=glandium
I'm not sure when this changed, but at least Visual Studio 2015
doesn't always emit a space between the line number and the ": warning"
text in cl.exe output.

Making the space optional in the regular expression enables one a
VS2015 build to capture 375 warnings instead of 17. We still fail to
capture some warnings (notably generic warnings about bad command
arguments and linker warnings). But that can be dealt with later.

MozReview-Commit-ID: q402CxTrQK

--HG--
extra : rebase_source : 6376a65b8d8145d68bad9b795b6abd6f4becefbd
2016-03-11 22:04:38 -08:00
Chris Manchester 87b3022311 Bug 1255585 - Prevent Python executable mis-match from constantly clobbering the virtualenv on OS X. r=gps
Virtualenv will sometimes find a different executable from its sys.executable on OS X,
causing a check in the build system comparing filesizes between sys.executable and virtualenv
python to fail, resulting in clobbering and re-building the virtualenv every time the virtualenv
is activated, causing the build backend and more to be re-built.

Instead of checking file sizes directly, this commit causes us to record the size and version of the
Python executable that created the virtualenv. If the Python executable checked is not the virtualenv
Python, or we have a different version than was used to create the virtualenv, then the virtualenv is
considered to be out of date.


MozReview-Commit-ID: KmrVfQCtbS3

--HG--
extra : rebase_source : d2b87325e10da6dfcd74f8b0d2ef7c0efb71595b
2016-03-11 12:24:10 -08:00
Ted Mielczarek a673bd63e2 bug 1248020 - add USE_YASM to moz.build. r=mshal
MozReview-Commit-ID: Liw4RGOXiVf

--HG--
extra : rebase_source : 1fa28bafd7cec69dd82f7f3ef0cea9f52593983a
extra : amend_source : 5d9185ff8a5562b2565cc5558127548fa7b9fb1f
extra : histedit_source : cafda3835897efec5519c2326c88e7f85ae4aad8%2Caf73cf11903c5d7baf38953503e3839873be3c68
2016-03-09 11:07:35 -05:00
Ryan VanderMeulen 3297186541 Backed out changeset 2ed1a0e47b18 (bug 1255585) for Windows build bustage.
CLOSED TREE
2016-03-11 21:40:08 -05:00
Chris Manchester ff0e9aac74 Bug 1255585 - Prevent Python executable mis-match from constantly clobbering the virtualenv on OS X. r=gps
Virtualenv will sometimes find a different executable from its sys.executable on OS X,
causing a check in the build system comparing filesizes between sys.executable and virtualenv
python to fail, resulting in clobbering and re-building the virtualenv every time the virtualenv
is activated, causing the build backend and more to be re-built.

Instead of checking file sizes directly, this commit causes us to record the size and path to the Python
executable that created the virtualenv. If the Python executable checked is not the virtualenv
Python, or the python that was used to create the interpreter, then the virtualenv is considered
to be out of date.


MozReview-Commit-ID: KmrVfQCtbS3
2016-03-11 12:24:10 -08:00
Steve Fink 094469068b Bug 991343 - Suppress time output when running inside emacs, r=gps
Because I Care.

MozReview-Commit-ID: 9An5QwxnBpU

--HG--
extra : amend_source : 1c9f689d8aecb41debc0a657455c3c53ec219fa1
2016-03-11 16:51:24 -08:00
Mike Hommey 0c528f1ec6 Bug 1255433 - Read mozconfig as mbcs on Windows. r=gps
When writing e.g. Japanese text files on Windows, the text is encoded in
mbcs. So if a mozconfig is edited this way, and contains non ascii
characters, they won't be utf-8 as we're currently trying to decode
them, but mbcs.
2016-03-12 09:16:57 +09:00
Andrew Halberstadt 7a0cb68d63 Bug 1255470 - [mach] don't raise if a subcommand exists and but wasn't found in args, r=gps
This is currently preventing a command from having both args and subcommands at the same
time.

MozReview-Commit-ID: 66frAqamGjv

--HG--
extra : rebase_source : 3bbd1cb508e5aab7ba7f9936c0c486ed8f626fe9
2016-03-10 11:51:43 -05:00
Andrew Halberstadt 67699efe5c Bug 1255467 - Ability for a mach command to dispatch to another's subcommand, r=gps
MozReview-Commit-ID: CN8kJU0NrL0

--HG--
extra : rebase_source : 673041aaeaa48cb32c68955e0448737e1ebbc459
2016-03-10 11:45:39 -05:00
Jeff Walden c3119c2802 Bug 1254908 - ./mach bootstrap doesn't work on CentOS/Fedora when it attempts to upgrade Mercurial. r=gps
--HG--
extra : rebase_source : f50e41ad8ea90e74ff3e20b176113061f36057c6
2016-03-10 14:55:34 -08:00
Mike Hommey aca0420413 Bug 1254913 - Handle symbolic links in the path leading to moz.configure. r=nalexander 2016-03-11 09:38:28 +09:00
Maja Frydrychowicz 40304dfbf1 Bug 1255196 - Include mozinfo.json in common.tests.zip; r=gps
MozReview-Commit-ID: BJnXphkKJFy

--HG--
extra : rebase_source : c434e8555eceb8ea1073f00a4d387f270c0e3e4d
2016-03-10 15:44:59 -05:00
Mike Shal aeffe80634 Bug 1242632 - Remove TESTING_FILES from moz.build; r=glandium
MozReview-Commit-ID: ALy4s6Xpg7f
2016-01-25 13:41:22 -05:00
Chris Manchester b16bf0a8dd Bug 1240149 - Install Python packages necessary to artifact builds from mozilla pypi when running in automation. r=nalexander
MozReview-Commit-ID: 3hat64zgs2b
2016-03-09 10:58:49 -08:00
Mike Shal 053369e67e Bug 1253431 part 7 - Remove SDK_BINARY; r=gps
MozReview-Commit-ID: 4RmjsX966Qh

--HG--
extra : rebase_source : 0d9d94ed98ae8f1cfb9d5787edc1336ce1ee6785
2016-03-03 14:23:57 -05:00
Mike Shal 7ea5981744 Bug 1253431 part 1 - Add SDK_FILES to moz.build; r=gps
This adds support for an SDK_FILES variable in moz.build, which creates
a FinalTargetFiles object to install files into dist/sdk/

MozReview-Commit-ID: 97a5NdbZmmD

--HG--
extra : rebase_source : ad8d521ec56fe4610437c8d2d503c545894b40c2
2016-01-21 16:17:57 -05:00
Wes Kocher 2048d9f4a0 Merge m-c to inbound, a=merge CLOSED TREE
MozReview-Commit-ID: 4SEUTTY9jRn
2016-03-08 16:08:08 -08:00
Wes Kocher 0fbf6c1476 merge inbound to m-c a=merge
MozReview-Commit-ID: BHxDQF6gIe3
2016-03-08 16:00:45 -08:00
Chris Manchester 290404eacf Bug 1253651 - Undo changes to PATH made by activating virtualenv in mach artifact. r=glandium
The changes made to PATH by activating the in-tree virtualenv cause some git-cinnabar commands
in subprocesses to fail, because git cinnabar is expecting mercurial to be installed, while it
is not available from the in-tree virtualenv. To work around this, the changes to PATH made by
virtualenv are undone, allowing git-cinnabar to find system python, which is likely to have
mercurial installed.

MozReview-Commit-ID: 47ceHvMmuyf

--HG--
extra : rebase_source : 199d3b01fc49b2760ee14a08d4400a1addf83eac
2016-03-04 14:45:00 -08:00
Nick Alexander c531d30275 Bug 1221200 - Post: Change formatting and ordering. r=me
On a CLOSED TREE because DONTBUILD NPOTB

MozReview-Commit-ID: 56vyz2CRJsU

--HG--
extra : amend_source : 4ec60bc95019147225479c32b6982dc33c649cc4
extra : histedit_source : c3dc78da75a8f5b3985024a7d73ac92ab80628c2
2016-03-07 12:47:34 -08:00
Sambuddha Basu 3c21ec1304 Bug 1221200 - Offer Fennec artifact builds in |mach bootstrap|. r=nalexander
MozReview-Commit-ID: D2dw6qfPa5k

--HG--
extra : rebase_source : aab9128e2db247260777d32fe420ea06223e05bc
extra : histedit_source : de59158bcbf80671a03f534eafb4ac607e91ae37
2016-02-27 17:01:31 +05:30
Mike Hommey 849ac02d19 Bug 1253553 - Move --enable-artifact-builds, --disable-compile-environment and --enable-build-backend to moz.configure. r=nalexander,r=chmanchester
Note I'm using raw primitives until patterns emerge and we decide on
some helpers.
2016-03-08 15:41:32 +09:00
Mike Hommey 339d8a4013 Bug 1253502 - Allow to pass a specific python interpreter to initialize virtualenvs. r=gps 2016-03-08 15:41:32 +09:00
Mike Hommey 74b4506047 Bug 1253203 - Move parts of configure.py into sandboxed moz.configure. r=nalexander,r=chmanchester
This moves all the reading mozconfig, finding autoconf, refreshing the
old configure, and running the old configure into sandboxed
moz.configure. This effectively bootstraps the sandboxed python configure.
2016-03-08 15:41:32 +09:00
Mike Hommey 70fc00898e Bug 1253203 - Remove everything COMM_BUILD. r=nalexander,r=chmanchester
comm-central doesn't set it since bug 1040009.
2016-03-08 15:41:32 +09:00
Mike Hommey 646df2b991 Bug 1253203 - Use mozpath functions for sandboxed os.path in configure.py. r=nalexander,r=chmanchester
Generally speaking, the configuration needs forward-slashes in paths.
We might as well make it hard(er) to set configuration items with
backslash separators on Windows by exposing mozpath.* functions in place
of os.path functions. The downside is that functions explicitly
importing os will still get the real os.path functions.
2016-03-08 15:41:32 +09:00
Mike Hommey 3b7804715f Bug 1253203 - Normalize path separators in MozbuildObject. r=gps
The upcoming move of the configure.py initialization to sandboxed
moz.configure changes the path separators for topsrcdir and topobjdir
from native to always use forward-slashes, which confuses the hell out
of the test_base.py test. Settle the issue by declaring that
MozbuildObject will always use forward-slashed paths for topsrcdir
and topobjdir.
2016-03-08 15:41:32 +09:00
Mike Hommey b505dba93d Bug 1247836 - Building blocks for python configure. r=nalexander,r=chmanchester 2016-03-08 15:41:32 +09:00
Mike Hommey d43ee81232 Bug 1247836 - Add classes for python configure options handling. r=nalexander,r=chmanchester 2016-03-08 15:41:32 +09:00
Mike Hommey 44357443ac Bug 1247836 - Add a ReadOnlyNamespace class to mozbuild.util. r=nalexander,r=chmanchester 2016-03-08 15:41:32 +09:00
Mike Hommey 29758f5f42 Bug 1250297 - Make python configure output config.status instead of old-configure doing it. r=gps
The nice side effect is that now we can have actual dicts for defines
and substs from the start, which simplifies so things, although it
requires adjustments to some unit tests.
2016-03-08 15:41:32 +09:00
Myk Melez db9a40ca42 Bug 1238079 - remove the desktop web runtime; r=fabrice,mossop,gps,jryans,jmaher,marco 2016-03-07 13:33:12 -08:00
Chris Manchester 78c4fb4a05 Bug 1203266 - Remove uses of the emitter in files_info now that they're no longer needed. r=gps
MozReview-Commit-ID: AV2HWIFKLKR
2016-03-07 10:32:55 -08:00
Chris Manchester 7eb7f31485 Bug 1203266 - Read test manifests in the reader instead of the emitter to make them available earlier in the build. r=gps
MozReview-Commit-ID: 2T2RP8S1biG
2016-03-07 10:32:55 -08:00
Chris Manchester 17d6d83115 Bug 1203266 - Add a list variant to mozbuild.util that allows pre-processing list items with a provided callable. r=gps
MozReview-Commit-ID: HibEQOWeVwE
2016-03-07 10:32:54 -08:00
Nicholas Nethercote ebc23cf4dc Bug 1253526 (part 1) - Remove DMD's --max-frames option. r=erahm.
Nobody uses it.

--HG--
extra : rebase_source : 6fe2af5f2b7ec19fad8f8cd49871a63599d7ebba
2016-03-04 17:02:20 +11:00
Mike Shal 5fe7774087 Bug 1253430 - Move most FinalTargetFiles into misc tier; r=glandium
MozReview-Commit-ID: 6FECvFAfE4E

--HG--
extra : rebase_source : a53086a19a07c6bf64f06468a2c0930c3a2daacb
2016-03-02 17:38:35 -05:00
Chris Manchester 1bf18e6476 Bug 1253076 - Handle the case defines are not present to avoid artifact build bustage when processing symbols files. r=glandium
MozReview-Commit-ID: 25oUlS12hec
2016-03-02 16:25:56 -08:00
Gregory Szorc 064730c46a Bug 1252170 - Disable Spotlight indexing of objdir on OS X; r=ted
Creating a .metadata_never_index file in a directory apparently
disables Spotlight indexing.

MozReview-Commit-ID: Di4DGZK6VOL

--HG--
extra : rebase_source : feffa0785174b11cf88a2b7ffdbd9aa5eeb98ac7
extra : amend_source : 838aca018ab91720b6b29b64b846a3ef107b6c88
2016-03-02 14:19:30 -08:00
Chris Manchester 0cef3d3c4f Bug 1234913 - Support git in |mach artifact install|. r=nalexander
MozReview-Commit-ID: LL6kO8QS5p9
2016-02-24 23:20:42 -08:00
Chris Manchester bcaa653555 Bug 1234913 - Stop using local pushlog in |mach artifact install|. r=nalexander
MozReview-Commit-ID: CG5KcYbTcbM
2016-02-24 23:47:06 -08:00
Nick Alexander 0367ab9bf8 Bug 1234913 - Clarify things that are hg-specific; make iteration lazy. r=chmanchester
MozReview-Commit-ID: LL6kO8QS5p9
2016-02-24 21:58:22 -08:00
Nick Alexander b2bd944259 Bug 1234913 - Pre: Show download progress during |mach artifact install|. r=nalexander
Hotel WiFi inspires many things.

MozReview-Commit-ID: 8WoHMWGNf0K
2016-02-24 23:21:37 -08:00
Nick Alexander 6a3c197d93 Bug 1234913 - Pre: Allow to --skip-cache when running |mach artifact install|. r=chmanchester
MozReview-Commit-ID: M2FYAPEqXy
2016-02-24 23:25:25 -08:00
Dan Minor 8fc1f1f3e4 Bug 1251076 - Record ccache stats in build telemetry data r=gps
Using ccache can have a big impact on compile times but we don't currently
capture ccache statistics.

MozReview-Commit-ID: CdrScyAh64I

--HG--
extra : rebase_source : 70dca7ae153ae1c7ce3a241820ab7d18cb6aaa0d
2016-02-25 10:35:07 -08:00
Mike Shal ae97eae57b Bug 1252301 - allow installing CONFIGURE_SUBST_FILES; r=glandium
We need to consider CONFIGURE_SUBST_FILES as generated files when
processing FinalTargetFiles and related variables. Additionally, we have
to make sure that we actually recurse into such directories during the
export phase.

MozReview-Commit-ID: 6ZwHMzjoT6t

--HG--
extra : rebase_source : e39e26ad8b84bcaa757c56048c9c80f5be270d9c
2016-02-29 16:49:59 -05:00
Quentin Headen bdcc3ae825 Bug 1251810 - Update Arch pacman -U command in bootstrap to handle --no-interactive; r=gps
DONTBUILD (NPOTB)

MozReview-Commit-ID: GsFS39CNx8V

--HG--
extra : rebase_source : 864fea86975a3fb145a0001733b1d690f2a2b528
2016-02-29 13:32:18 -08:00
Gregory Szorc fca4d6f904 Bug 1251870 - Disable indexing of objdir on Windows; r=ted
The Windows content indexing service has been known to scan the objdir.
This can add significant system overhead and slow down builds or
subsequent operations. The objdir is meant to be a short-lived black box
and there really isn't a major benefit to indexing it.

There is a file attribute on Windows that disables content indexing.
This commit adds a utility function for creating a directory and
optionally disabling indexing on it. We call it at the top of
`mach build` to ensure the objdir as content indexing disabled.

MozReview-Commit-ID: 68gxCxbkVAN

--HG--
extra : rebase_source : 8e95d9b2923dccadbe54288bea25883937e2f004
2016-02-27 11:58:12 -08:00
Chris Manchester 5adf169610 Bug 1250961 - Move testing/xpcshell/Makefile.in to moz.build. r=gps
MozReview-Commit-ID: 8J9RzA0RZ0i

--HG--
extra : rebase_source : f202d8fb0b79be8c665bed5af54592292802ad0d
2016-02-26 13:20:31 -08:00
Chris Manchester 8b7ef38ae6 Bug 1250961 - Move testing/mochitest/Makefile.in to moz.build. r=gps
MozReview-Commit-ID: LwQH49FLfY2

--HG--
extra : rebase_source : c8c1007e05bfd9ff18d6199018c121473b576220
2016-02-26 13:20:31 -08:00
Jan Beich 6bb0bc3723 Bug 1242132 - Make sure to split multiple _FLAGS after bug 1224452. r=glandium 2016-02-21 21:18:03 +00:00
Dan Minor ec0c3027df Bug 1250624 - Overall system resources is displayed twice; r=chmanchester
MozReview-Commit-ID: Hbx8lOlrUuw

--HG--
extra : rebase_source : 02fb6d0b894eeab425318c9465d5ea4327b73fe4
2016-02-24 09:18:03 -08:00
Quentin Headen 04c99c53de Bug 1251352 - Respect --no-interactive during Arch bootstrap; r=gps
--HG--
extra : amend_source : 903d7946eb28476c1e05c329b204852d008cf75c
2016-02-25 11:47:58 -08:00
Sambuddha Basu cc602702aa Bug 1169089 - Merge CentOS and Fedora bootstrap code; r=gps
DONTBUILD (NPOTB)

MozReview-Commit-ID: 6WDykc20TKf

--HG--
extra : rebase_source : 90c43d31e8f27a6bff9df6c76113e9b038185d99
2016-02-25 11:11:39 -08:00
Gregory Szorc 503851935a Bug 1249858 - Stop processing IPDL and WebIDL files during artifact builds; r=glandium
We don't process IPDL and WebIDL files during artifact builds. The
backend shouldn't need to care about them.

Before: 2001 total backend files; 2001 created; 0 updated; 0 unchanged; 0 deleted
After:  1945 total backend files; 1945 created; 0 updated; 0 unchanged; 0 deleted

After this change, we no longer write any .cpp files to the objdir
during config.status for artifact builds.

As part of this, we stopped generated webidlsrcs.mk and the build broke
because of an unguarded use in a Makefile.

After this change, only 102/3366 files in the objdir after
`mach configure` are not a) in _virtualenv b) named backend.mk
c) named Makefile (~950 each of backend.mk and Makefile).

MozReview-Commit-ID: 11AIn1i4x4f

--HG--
extra : rebase_source : ac90bb9f6be8b7b986aa0a61b3ccc203a18346a6
2016-02-19 21:46:29 -08:00
Gregory Szorc aac8926faf Bug 1249858 - Do not generate unified C++ files during artifact builds; r=glandium
I can't think of a good reason why unified C++ files need to exist
during artifact builds. Let's not write them in this build config.

Before: 2517 total backend files; 2517 created; 0 updated; 0 unchanged; 0 deleted
After:  2001 total backend files; 2001 created; 0 updated; 0 unchanged; 0 deleted

No measureable change in performance on Linux. But on Windows where file
creation is in the ~1ms range, this will surely result in a speedup of
several hundred milliseconds.

We are still generating some .cpp files during artifact builds. This will be
addressed in subsequent commits.

MozReview-Commit-ID: Lqx36YE8qZZ

--HG--
extra : rebase_source : 8af5a9915e78af7aee2aa335552689fe33975400
2016-02-19 21:41:24 -08:00
Gregory Szorc eccb5d39c1 Bug 1249858 - Add property exposing whether performing an artifact build; r=glandium
Future commits will add a number of consumers. This will cut down on
boilerplate.

MozReview-Commit-ID: 8h4VWBXXd8O

--HG--
extra : rebase_source : 3376f015f1766eedcef60e9393b6d68474ffb634
2016-02-19 21:40:09 -08:00
Gregory Szorc 2f5add2222 Bug 1249210 - Install files using multiple threads on Windows; r=glandium
As previous measurements have shown, creating/appending files
on Windows/NTFS is slow because the CloseHandle() Win32 API takes
1-3ms to complete. This is apparently due to a fundamental issue
with NTFS extents. A way to work around this slowness is to use
multiple threads for I/O so file closing doesn't block execution
as much.

This commit updates the file copier to use a thread pool of 4
threads when processing file copies. Additional threads appear
to have diminishing returns.

On my i7-6700K, this reduces the time for processing the tests install
manifest (24,572 files) on Windows from ~22.0s to ~12.5s in the best
case.

Using the thread pool globally resulted in a performance regression
on Linux. Given the performance sensitivity of manifest copying,
I thought it best to implement a slightly redundant non-Windows
branch to preserve performance. For the record, that same machine
running Linux is capable of processing nearly the same install
manifest (24,616 files) in ~2.2s in the best case.

MozReview-Commit-ID: B9LbKaOoO1u

--HG--
extra : rebase_source : e9fee3861a70e1da9d18448f8435f4bd3e28c647
2016-02-19 18:28:26 -08:00
Dan Minor 694a88e33b Bug 1244160 - Create json-schema for build telemetry data r=gps
This adds a simple schema for build telemetry data. We can make it more
restrictive once we have a better feeling for what kind of data we want
to submit.

This also moves more common data about the system to the telemetry handler.
We leave psutil derivied information in the resource usage data as not every
system will have psutil installed.

MozReview-Commit-ID: CFRq1Ow6AOf

--HG--
extra : rebase_source : 3022d8f5d20e3d4f9dc871cf2217a6dad2f22e05
2016-02-02 09:32:49 -05:00
Mike Shal 1e05ed66d5 Bug 1248027 - '#define FOO' should use an empty value, not '1'; r=glandium 2016-02-16 14:34:25 -05:00
Gregory Szorc 1f9b71ef94 Bug 1249857 - Reference proper cache attribute; r=nalexander
self._pushhead_cache no longer exists. But self._tree_cache does!

This was causing AttributeError when running `mach artifact clear-cache`
and other misc `mach artifact` sub-commands.

MozReview-Commit-ID: CP8NL6eCfhD

--HG--
extra : rebase_source : 0afd11722e304c8e0ecd9a305023d43dff79dddd
extra : amend_source : ad3df6d780e7b968573588e9a1029f1a1c9d18b0
2016-02-20 21:44:56 -08:00
Gregory Szorc e35e937238 Bug 1249857 - Do not print times when running mach from config.status; r=nalexander
Currently, config.status runs `mach artifact install`. mach commands prefix
output lines with elapsed time by default. When running from `mach build`,
there will be 2 sets of times in `mach artifact install` output lines.
When config.status is run directly, there will be no times printed
except for `mach artifact install`. It is weird both ways.

Fix it by not printing lines when running `mach artifact install` from
config.status.

MozReview-Commit-ID: GVinyI4Z0qr

--HG--
extra : rebase_source : 80aa5714a0249d9974becee183e7cfde7143f556
extra : amend_source : a89bca7af847f73efd18fb0a09bc9e76d8943577
2016-02-20 21:44:44 -08:00
Mike Hommey 4ae855e98c Bug 1249838 - Avoid dependency from the mozconfig loader on mach. r=gps 2016-02-20 12:12:51 +09:00
Sambuddha Basu 79b3096449 Bug 952564 - Disallow empty lists in moz.build variables r=gps
--HG--
extra : rebase_source : 9a70b6a3150fe898a724a43815dc923bb0d70b89
extra : amend_source : 7aa800ef61427117e5dc461443f82ebd403d8164
2016-02-18 17:26:09 -08:00
Carsten "Tomcat" Book c2a42c6ad4 merge fx-team to mozilla-central a=merge 2016-02-17 12:07:39 +01:00
Patrick Brosset 406297be5c Bug 1248360 - Set eslint version to 1.10.3 when setting it up via mach
MozReview-Commit-ID: LmKsvGzj3fo

--HG--
extra : rebase_source : ec5aaeef13fca603250d5e57b8425ff339136070
2016-02-16 10:01:11 +01:00
Chris Manchester c6fd1b24b0 Bug 1246992 - Only accept artifacts from a specific revision when one is provided to mach artifact. r=nalexander
MozReview-Commit-ID: FHa6awAFZj8

--HG--
extra : rebase_source : 510d996f637c11244b37dd4d615dc2efeaf191b3
2016-02-15 12:08:40 -08:00
Gregory Szorc 974f384129 Bug 1247994 - Upgrade vendored requests package to 2.9.1; r=mshal
Previously, we We were running version 2.5.1 of requests. Newer
versions have several bug fixes and even address a CVE.

Source was obtained from
https://pypi.python.org/packages/source/r/requests/requests-2.9.1.tar.gz
and checked in without modification. This should be a rubber stamp
review.

MozReview-Commit-ID: 9tFSVJFfwGh

--HG--
extra : rebase_source : 985a63b3e09d7abd5089bdb29ebef8d7314c59f2
2016-02-12 10:03:53 -08:00
Nick Alexander bc112329f3 Bug 1119520 - Add opt-in Gradle build mode for mobile/android. r=gps
Opt-in by adding --enable-gradle-mobile-android-builds.

Gradle dependencies (including the Android-Gradle plugin) are assumed
to be present.  Local developers will fetch them from the jcentral
repository.

Android-specific Maven dependencies are shipped as "extras" with the
Android SDK, and should be found automatically by the Android-Gradle
plugin.

MozReview-Commit-ID: 966XgddWgEu

--HG--
extra : rebase_source : 8e8c6156e1d06813c250662e104fd14c621d91ab
extra : source : 306cf0271d3e3a344fcbfd2baf75e0450c288cf1
extra : histedit_source : d17446714236c408699a0953882e84ac3a192380%2Cc21b166af79ef1e00215748820bc2670405ac1dc
2016-02-12 10:06:40 -08:00
Sambuddha Basu 3a59ad7919 Bug 1246264 - Ensure cache directory exists for artifacts installation r=chmanchester
--HG--
extra : commitid : Fz9TFGL0WgM
2016-02-12 03:43:18 +05:30
Mike Hommey 9e3dec34bf Bug 1224450 - Make the CompileDB derive its commands from the moz.build data. r=gps
The moz.build data is now sufficient to, with some convolution, generate
the same compilation database that recursing the tree with the showbuild
target does.

The resulting code is not the prettiest, and exposes the shortcomings of
the current moz.build data model. It is however a first step towards
fixing those shortcomings, because they are now more clearly identified.

This was validated on all platforms on try by checking the output of
  mach build-backend -b CompileDB -d -n
is empty when backing out the patch after running
  mach build-backend -b CompileDB
once.
2016-02-12 07:16:19 +09:00
Mike Hommey 749e95cd9c Bug 1224450 - Skip difficult directories in the CompileDB. r=gps
There are a few difficult directories to handle, with limited usefulness
compared to having the CompileDB properly filled for everything else
in a timely manner, so skip them for now.
2016-02-12 07:16:16 +09:00
Mike Hommey 562113ab90 Bug 1224450 - Ignore host compilations in the CompileDB backend. r=gps 2016-02-12 07:16:15 +09:00
Mike Hommey fd36539df9 Bug 1246881 - Generate a header defining MOZ_BUILDID. r=mshal 2016-02-12 07:15:55 +09:00
Dave Townsend 06f432d221 Bug 1239139: Verify that a high enough node version is available before running eslint. r=gps
The most common issue I'm hearing with eslint is people who have an outdated
node installed. This does a quick check to verify the version is high enough
before linting.

MozReview-Commit-ID: Em0jn18OUYo

--HG--
extra : rebase_source : 5325eb5f556f93e09d48fb123e0abb625aa77b84
2016-02-09 15:34:37 -08:00
Dan Minor d63849ae5e Bug 1244143 - Record whether or not an artifact build was used in build telemetry data r=gps
This adds a substs field and cherrypicks the MOZ_ARTIFACT_BUILDS field so
we can determine whether or not an artifact build occurred.

MozReview-Commit-ID: 8aio8mP8pmR

--HG--
extra : rebase_source : aa0dc2b7ef61e8b02d202c3a631d276e019d3dfd
2016-02-01 14:41:13 -05:00
Carsten "Tomcat" Book fb7fb37fd7 Backed out changeset b06f5fef9488 (bug 1244143) for OS 10.7 opt build trouble 2016-02-10 15:58:09 +01:00
Carsten "Tomcat" Book 855c877f61 Merge mozilla-central to mozilla-inbound 2016-02-10 14:29:05 +01:00
Carsten "Tomcat" Book b8f6140f54 merge mozilla-inbound to mozilla-central a=merge 2016-02-10 11:47:34 +01:00
Dan Minor 4250455fa4 Bug 1244143 - Record whether or not an artifact build was used in build telemetry data r=gps
This adds a substs field and cherrypicks the MOZ_ARTIFACT_BUILDS field so
we can determine whether or not an artifact build occurred.

--HG--
extra : rebase_source : 8878751b0bf5159cb8baedc68c9ab88cf8563628
2016-02-01 14:41:13 -05:00
Dan Minor f3c1aea318 Bug 1239296 - add post_dispatch_handler hook to mach r=gps
This adds a post_dispatch_handler hook that will be called after each
mach invocation and uses it to submit data to telemetry.

--HG--
extra : rebase_source : 1dedea568b7ccec17fa58eb1841425b165d8a644
2016-02-09 10:09:17 -05:00
Dave Townsend 2baeb943ca Bug 1244357: Use a shim around the certificate DB to allow the add-ons manager to think that add-ons are signed when they aren't. r=rhelmer
Because the add-ons manager hasn't startup up yet we can replace the certificate
database in xpcshell tests with one that claims add-ons are signed by valid
certificates even when they aren't. This allows us to run tests even in builds
where signing cannot be disabled during for the normal application.

This adds an override for all tests except those that are explicitely testing
signing.

--HG--
extra : commitid : 24s3ni5gVYe
extra : rebase_source : a95571dc3556bb035511eea424ba57e8c7007eba
2016-01-29 16:41:18 -08:00
Dan Minor 0e4a3375d2 Bug 1239296 - Use telemetry_handler to store build resource data r=gps
--HG--
extra : rebase_source : 3f232b77b91750d8ab5af017552b0ae368d765cb
2016-01-29 12:53:00 -05:00
Dave Townsend 3c97745a55 Backing out c57d2020f884 for bug 1244357 due to test failures. CLOSED TREE
--HG--
extra : commitid : ARB3HviETo6
extra : amend_source : 6386ba6343ce0b187ee2d317bf455a9163ed0330
2016-02-08 10:18:48 -08:00
Dave Townsend 306183747d Bug 1244357: Use a shim around the certificate DB to allow the add-ons manager to think that add-ons are signed when they aren't. r=rhelmer
Because the add-ons manager hasn't startup up yet we can replace the certificate
database in xpcshell tests with one that claims add-ons are signed by valid
certificates even when they aren't. This allows us to run tests even in builds
where signing cannot be disabled during for the normal application.

This adds an override for all tests except those that are explicitely testing
signing.

--HG--
extra : commitid : 9Zd5aH92lAQ
extra : rebase_source : 880d0fff51205dc92df91a61fef8b246d2ea2123
2016-01-29 16:41:18 -08:00
Phil Ringnalda e3869be7d0 Merge m-c to f-t 2016-02-05 19:45:14 -08:00
Gregory Szorc 460386b9c1 Bug 1246040 - Change architecture detection on CentOS; r=glandium
This fails under Docker otherwise. platform.architecture() uses the
architecture of the Python executable, which should be fine assuming the
system-installed Python is being used. Even if the user installed their
own Python, running a 32-bit Python on a 64-bit system feels like
something that would be extremely rare.

DONTBUILD (NPOTB)

--HG--
extra : commitid : HowMKbWsoTt
extra : amend_source : 9c6fd75da6d521845d561e04350b2e82dccf2b38
2016-02-05 10:51:41 -08:00
Gregory Szorc a43c47c0da Bug 1246025 - Install python2-devel package on Fedora; r=mshal
We need this package to build psutil and other Python packages with C
extensions.

Fedora 23 offers Python 3 as the default package and the package name
changed from python-devel to python2-devel. Fedora 22 does appear to
support python2-devel as an alias. So we use the same name everywhere.

DONTBUILD (NPOTB)

--HG--
extra : histedit_source : 7f0f9930c84f1cff396595309d47e1d600ed2609
extra : rebase_source : 544bcaa84b52ed036e76ba2a44a6074c761790cc
extra : commitid : IgEon98g61O
extra : source : 515c94229a9150246dc88318e92216d3a6d68a39
extra : amend_source : 88f419a5374ff7324dbf5f9a4a33ed313e2e2470
2016-02-05 12:33:13 -08:00
Gregory Szorc e86222cccd Bug 1246033 - Reference unambiguous git package on Gentoo; r=mshal
"git" is ambiguous between dev-ruby/git and dev-vcs/git.

--HG--
extra : histedit_source : 4d38547125f11114ee6f5a20f859c475aaa942a9
extra : rebase_source : 9ded586dd5e79953e15849e3aa27c57084fb4de0
extra : commitid : KDg9b0sFs5p
extra : source : d2cfa7eb10fc6139091de6530fa92e763eafd077
extra : amend_source : c8318134a0c8dc16d339e4943f737392e917c4eb
2016-02-05 12:31:52 -08:00
Chris Manchester 1ba302d1f5 Bug 1246872 - Find the source bundle directory by pattern matching for OS X artifact builds. r=nalexander
MozReview-Commit-ID: 7Yn2pO9PO1C
2016-02-08 23:03:53 -08:00
Gregory Szorc e1090839ad Bug 1245684 - Download bootstrap files via a zip archive; r=mshal
This will perform a single HTTP request that completes in <1s. Contrast
with before when we performed multiple HTTP requests and the process
took several seconds.

DONTBUILD (NPOTB)

MozReview-Commit-ID: DjX3LBdSOIk

--HG--
extra : commitid : Li155pLmmc
extra : rebase_source : b098d506fbfaab2b4a7946af48fd49700b1845dc
extra : amend_source : b4142e5de891160593853ea79dd14ea1d64f03ba
2016-02-09 14:41:32 -08:00
Chris Manchester 8d867f3c62 Bug 1240059 - Treat psutil as optional in record_resource_usage. r=gps
--HG--
extra : commitid : luOomgRgcQ
2016-02-03 20:37:12 -08:00
Mike Hommey 9ca9b3074c Bug 1245763 - Don't emit Sources objects when there is no Linkable in the same directory. r=gps
We have very few directories where we have SOURCES declared that are not
part of a library or program in some way. In fact, there is only one
where it is legitimate because we only use the object file
(build/unix/elfhack/inject). Others are the result of moz.build control
flow (see e.g. netwerk/standalone), and we end up building more objects
than we need to.

There are other cases where we need objects without actually linking
them anywhere, but there are other sources in the same directory, and a
corresponding Linkable is emitted. And in fact, the only case I knew
about (media/libvpx), doesn't use such objects since bug 1151175.
2016-02-04 17:16:29 +09:00
Mike Hommey bbb2388ec3 Bug 1245763 - Move the _handle_programs and _process_sources around. r=gps
The functions are going to be merged next ; this makes the change easier
to review.
2016-02-04 17:16:29 +09:00
Mike Hommey dcd8e418ac Bug 1245763 - Group sources and linkables handling function cals in mozbuild.emitter. r=gps 2016-02-04 17:16:29 +09:00
Mike Hommey f3ecc6091c Bug 1245015 - Properly handle ObjC sources in the CompileDB backend. r=mshal 2016-02-03 08:41:20 +09:00
Mike Shal 4c85cf31d1 Bug 1244239 - Fix __slots__ in mozbuild's data.py; r=gps 2016-01-28 14:30:00 -05:00
Birunthan Mohanathas 7104c2aaa5 Bug 1235261 - Part 4: Remove AutoFallibleTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Birunthan Mohanathas d7371d07d0 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Carsten "Tomcat" Book ddbbd78a0d merge mozilla-inbound to mozilla-central a=merge 2016-02-02 11:50:53 +01:00
Mike Hommey 035251c418 Bug 1244941 - Don't fill install manifest with artifacts. r=nalexander
Since bug 1239217, artifacts builds are using a hybrid build system that
uses the fastermake rules to copy files to dist/bin, which means
artifact files are not removed by the processing of the dist/bin install
manifest. This means we don't need to add them to the recursivemake
install manifest anymore.
2016-02-02 11:47:45 +09:00
Nick Alexander e69e03b2a9 Bug 1243041 - Follow-up: Fix Android-only bustage. r=me
DONTBUILD NPOTB

--HG--
extra : commitid : 7pRJ70ubsIw
2016-02-01 13:26:31 -08:00
Chris Manchester fc925df759 Bug 1243041 - Refine artifact platform selection based on target_cpu. r=nalexander
--HG--
extra : commitid : IxR79uqJinR
2016-02-01 12:48:17 -08:00
Nick Alexander 0da74ae170 Bug 1244298 - Download android-api-15 artifacts. r=ahunt
--HG--
extra : commitid : 37fyfy52TDo
extra : amend_source : c2ef5e2d213982a07200ceca7edf9d1626b3c5f9
2016-02-01 10:30:36 -08:00
Chris Manchester ddb5730080 Bug 1240667 - Detect a tree to use for artifact builds based on recent changesets. r=nalexander
Currenlty --enable-artifact builds will take artifacts from fx-team regardless of the
state of the current working directory. This can lead to broken builds if someone
updates to a tree other than fx-team.

This commit changes the default behavior from tracking fx-team to finding all recent
pushheads and finding the closest to the working parent that has artifacts available.

This also fixes a mis-match between tree names according to mozext and branch names in
the taskcluster index preventing artifact download from common integration branches.

--HG--
extra : commitid : 3LqLna4qxk0
2016-01-29 12:27:04 -08:00
Chris Manchester d6f59759cd Bug 1243096 - Remove ini manifests containing only support-files and move their contents to TEST_HARNESS_FILES. r=gps
--HG--
extra : commitid : FyLge9QyfDF
2016-01-27 17:46:34 -08:00
Ehsan Akhgari f0b139bf4f Bug 1242004 - Skip -Xclang arguments when generating clang compilation database or YouCompleteMe config; r=froydnj
clang based tools typically choke when they encounter a lot of -XClang
arguments, and since those args are passed to the cc1 driver they're
unnecessary for such tools anyways.

This helps people who have things like --enable-clang-plugin in their
mozconfig use clang based tools without having to remove these arguments
manually.
2016-01-25 21:34:57 -05:00
Gregory Szorc eaac9e2bed Bug 1242228 - Upgrade virtualenv to 14.0.1; r=mshal
Downloaded from https://pypi.python.org/packages/source/v/virtualenv/virtualenv-14.0.1.tar.gz
and extracted without any modifications.

This appears to speed up `mach configure` for artifact builds by ~3.3s on
my Linux machine (~16.3s to 13.0s). A significant part of this appears
to be newer version of pip caching and reusing wheels after first
install.

This should be a rubber stamp review, as all changes are from trusted
upstream packages.

--HG--
extra : rebase_source : a38af27ab45f21e9ea943fcd23655b3ce51ffdd8
2016-01-23 18:48:43 -08:00
Ted Mielczarek f86b931457 bug 1230117 - get rid of {HOST,TARGET}_NSPR_MDCPUCFG. r=glandium
--HG--
extra : commitid : LJ5QiUWSc4d
extra : rebase_source : 7207b43431e072a5f77397d468d30b5439be2b84
2016-01-21 06:13:06 -05:00
Ted Mielczarek 6a50cacb9f bug 1241272 - Allow error() in moz.build files to be treated as non-fatal. r=gps
Calling error() in moz.build files to indicate unsupported configurations is
useful, but readers using EmptyConfig will trigger them currently. This patch
allows a Config to have an `error_is_fatal` attribute, which will make
error emit a warning instead.

--HG--
extra : commitid : 8rqc0rx4iOK
extra : rebase_source : 0bece15b1d0fcbb38e01a26101c1f4697285c583
2016-01-20 15:11:49 -05:00
Mike Hommey dded38c2fe Bug 1245764 - Move Windows RTL flags (-MD/-MT) flags out of config.mk. r=gps 2016-02-05 17:30:34 +09:00
Phil Ringnalda d381b4bca6 Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
CLOSED TREE

Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00
Birunthan Mohanathas 6ed751e586 Bug 1235261 - Part 4: Remove AutoFallibleTArray. r=froydnj 2016-01-31 17:12:12 +02:00
Birunthan Mohanathas 373593275e Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
Chris Manchester 666423b6d5 Bug 1241989 - Speed up install manifests by avoiding path operations. r=gps
This is two straightforward optimizations in FileCopier: avoiding a redundant iteration
over the directory structure to find destination files (which includes a
call to normpath) and avoiding redundant calls to determine directories to preserve
when remove_unaccounted is not specified (which include a call to dirname).

Running a no-op install of _tests with this patch results in a reduction of about
25,000 calls to normpath and remove about 220,000 calls to dirname, resulting in
an overall speedup of 10-20%.

--HG--
extra : commitid : 8nyTo489q8X
2016-01-22 13:54:33 -08:00