Commit Graph

144 Commits

Author SHA1 Message Date
Simon Fraser
d64be18286 Bug 1468394 mach python-safety command for checking requirements files r=mtabara,tomprince
Added `./mach python-safety`, distinct from python-test so it doesn't have
to be run on every CI job - its errors may not depend on the area the push has changed.

Added the python/safety directory to ensure a different Pipfile is used, avoiding
conflicts with python-test.

Differential Revision: https://phabricator.services.mozilla.com/D1825
2018-06-29 16:56:51 +00:00
Dave Hunt
6678d9f458 Bug 1455570 - Build and publish TPS add-on; r=dustin,ted
MozReview-Commit-ID: HOsTcmg1m7e
2018-04-23 14:32:05 +01:00
Rob Wood
80c324543e Bug 1455107 - Integrate raptor into mach; r=gbrown
MozReview-Commit-ID: 84vIqU2NWkE
2018-04-23 16:43:30 -04:00
Andrew Halberstadt
3353b79e9c Bug 1434430 - [flake8] Fix blank 'except' statements r=rwood
This is a new issue that gets linted with flake8 3.5.0. Basically you should
never use a blank except: statement.

This will catch all exceptions, including KeyboardInterrupt and SystemExit
(which is likely not intended). If a catch all is needed, use
`except: Exception`.  If you *really* mean to also catch KeyboardInterrupt et
al, use `except: BaseException`.

Of course, being specific is often better than a catch all.

MozReview-Commit-ID: FKx80MLO4RN
2018-01-31 14:32:08 -05:00
Edouard Oger
0a2edfd6b0 Bug 1422115 - Remove storageserver.js from services/. r=markh,tcsc
MozReview-Commit-ID: 4UGCq6SolY1
2017-11-30 15:11:19 -05:00
Tom Prince
e233e0fff8 Bug 1410773: Add optional comm-central virtualenv manifest; r=nalexander
comm-central taskcluster builds have comm-central checkout in `comm/`.  This
will add packages specified in comm-central when it checked out, and will
ignore the missing file for mozilla-central builds.

MozReview-Commit-ID: Amg5vJHoWkS
2017-10-22 13:40:20 -06:00
Sylvestre Ledru
69d68b3c4f Bug 1406650 - Make build/*.py and a few other files flake8 compatible and add them to the list of files to check r=chmanchester
MozReview-Commit-ID: icmFJtbWdN
2017-10-07 16:45:22 +02:00
Gregory Szorc
46138dcc30 Bug 1393503 - Proper error handling for failure to find VCS tool; r=glandium,nalexander
``print()`` has no business being in library code like this. It was
a holdover from this code being copied from bootstrap. So remove it.

While we're here, replace the generic exception with a specific one.
We don't want to be swallowing bugs via ``except Exception``.

MozReview-Commit-ID: 49goUstfPBz
2017-08-24 17:09:09 -07:00
Gregory Szorc
8b66bd0c4d Bug 1392886 - Ignore missing mach_commands.py when checkout is sparse; r=mshal
Sparse checkouts may not have all mach_commands.py files.

mach raises an error when a mach_commands.py file is missing.

So, we teach the mach driver to ignore missing file errors when
a sparse checkout is present.

The added code is optimized to avoid an import of mozversioncontrol
and some I/O as part of resolving the repo and VCS binaries because
this file is in the critical path of all mach commands and avoiding
I/O is worthwhile. Since we aren't using sparse checkouts in the
common case, this effectively makes the new code 0 cost.

MozReview-Commit-ID: C6itJga31t5
2017-08-23 08:41:01 -07:00
Gregory Szorc
ae2d11a531 Bug 1392886 - Don't destroy reference to "mach" module; r=mshal
"mach" in this scope is both the mach module and the driver instance.
Let's change the latter's variable name so we can access the mach
module.

MozReview-Commit-ID: Db6sxDFl2oo
2017-08-22 20:29:37 -07:00
Kris Maglione
554f22b6d2 Bug 1350646: Part 1 - Remove addon-sdk moz.build generation gunk. r=Mossop
MozReview-Commit-ID: GMlOFoosVQZ
2017-08-02 13:51:40 -07:00
Phil Ringnalda
8eea07a6ce Backed out 22 changesets (bug 1350646) for talos damp failures
Backed out changeset c3108aebee35 (bug 1350646)
Backed out changeset ee8f7fa9d410 (bug 1350646)
Backed out changeset 79e77c06ff44 (bug 1350646)
Backed out changeset 5584fdcd2ee0 (bug 1350646)
Backed out changeset 7571b064a77e (bug 1350646)
Backed out changeset 7f65323c56f9 (bug 1350646)
Backed out changeset 10bbf7c53afe (bug 1350646)
Backed out changeset e40544ead983 (bug 1350646)
Backed out changeset 5eb77e6de0a3 (bug 1350646)
Backed out changeset 6d9244a8ac40 (bug 1350646)
Backed out changeset 13110c98b0fd (bug 1350646)
Backed out changeset 096ff315b48b (bug 1350646)
Backed out changeset 57500d9ea832 (bug 1350646)
Backed out changeset 5a45d9e25a00 (bug 1350646)
Backed out changeset e931e4ff5e11 (bug 1350646)
Backed out changeset d914c050c965 (bug 1350646)
Backed out changeset 35c4d4cd77c7 (bug 1350646)
Backed out changeset 7687db575011 (bug 1350646)
Backed out changeset c68367bb0eb3 (bug 1350646)
Backed out changeset 3ca040743aeb (bug 1350646)
Backed out changeset 8d4c2f001354 (bug 1350646)
Backed out changeset 67c251e2c9db (bug 1350646)

MozReview-Commit-ID: GLM80BkVx85
2017-08-09 20:03:17 -07:00
Kris Maglione
944eea0bfa Bug 1350646: Part 1 - Remove addon-sdk moz.build generation gunk. r=Mossop
MozReview-Commit-ID: GMlOFoosVQZ
2017-08-02 13:51:40 -07:00
Andrew Halberstadt
17bb4f21d5 Bug 1382775 - Move testing/tools/autotry to tools/tryselect/selectors/syntax.py, r=chmanchester
The |mach try| implementation isn't really testing specific so figured while doing this refactor
anyway we could take the opportunity to move it to /tools. This renames the "autotry" module to
"syntax" as one of the 'selectors' under the newly created tryselect module.

MozReview-Commit-ID: DmnGU5sKuCk
2017-07-17 21:36:23 -04:00
Bryce Van Dyk
c75a2d0e45 Bug 1372051 - Remove external media tests from mach modules. r=gps
MozReview-Commit-ID: BleMN1TMSVa
2017-06-12 11:20:19 +12:00
James Graham
20a29950cd Bug 1373216 - Add mach command for starting geckodriver, r=ato
MozReview-Commit-ID: 8hNAjT5db44
2017-06-15 12:47:20 +01:00
Andrew Halberstadt
0ac670aa01 Bug 1346025 - Move 'python/compare-locales' documentation and mach command to 'tools/compare-locales', r=Pike
MozReview-Commit-ID: bkrH4YAD7S
2017-06-06 10:00:51 -04:00
Mike Hommey
7c376a3b1d Bug 1356101 - Derive the mach_bootstrap search path from build/virtualenv_packages.txt. r=gps
Most entries in virtualenv_packages.txt that are .pth or packages.txt
are currently in SEARCH_PATHS in mach_bootstrap. The ones that are
missing would make sense in SEARCH_PATHS. None of non-.pth or
packages.txt entries, however, are in SEARCH_PATHS and don't make sense
there.

On the other hand, virtualenv_packages.txt misses a lot of things that
are in SEARCH_PATHS, all of which should be there. One exception:
xpcom/idl-parser, which causes problems due to the xpidl package
containing an xpidl module, which causes problems with the in-tree
scripts using it. Plus, it needs a cache directory, which is messy, so
it's preferable to keep it away from the virtualenv. It turns out it was
added to mach_bootstrap.py in bug 893976 for a command that was since
then removed (bug 1244736), so we can get away with removing it.

So instead of keeping those two separate lists out of sync, we replace
the SEARCH_PATHS list from mach_bootstrap with one that is derived at
runtime from the contents of virtualenv_packages.txt.

And since a .pth can't fail to install in the virtualenv, it makes no
sense to have psutil.pth defined as optional, which allows it to end up
in the mach_bootstrap search path automatically.

Finally, because we do have overlapping module names in the tree (e.g.
runtests), and mach_bootstrap's SEARCH_PATHS had a guaranteed order,
we change the order of the virtualenv_packages.txt file to match what
used to be in mach_bootstrap, and make all the pth entries use the same
file name so that the order is more guaranteed in the virtualenv too.
2017-04-14 08:19:08 +09:00
Mike Hommey
49ad2400c6 Bug 1356541 - Avoid MOZBUILD_STATE_PATH prompt on automation. r=gps 2017-04-14 20:20:52 +09:00
Bob Clary
2356558941 Bug 1344813 - Implement AWSY as a marionette-based mach command, r=jmaher,pyang,erahm.
usage: mach [global arguments] awsy-test [command arguments]

mach awsy-test runs the in-tree version of the Are We Slim Yet
(AWSY) tests.

awsy-test is implemented as a marionette test and marionette
test arguments also apply although they are not necessary
since reasonable defaults will be chosen.

The AWSY specific arguments can be found in the Command
Arguments for AWSY section below.

awsy-test will automatically download the tp5n.zip talos
pageset from tooltool and install it under
topobjdir/_tests/awsy/html. You can specify your own page set
by specifying --web-root and --page-manifest.

The results of the test will be placed in the results
directory specified by the --results argument.

Command Arguments for AWSY:
  --web-root WEBROOTDIR
                        Path to web server root directory. If not specified,
                        defaults to topobjdir/_tests/awsy/html.
  --page-manifest PAGEMANIFEST
                        Path to page manifest text file containing a list of
                        urls to test. The urls must be served from localhost.
                        If not specified, defaults to
                        page_load_test/tp5b/tp5n.manifest under the web root.
  --results RESULTSDIR  Path to results directory. If not specified, defaults
                        to the parent directory of the web root.
  --quick               Set --entities=3, --iterations=1, --per-tab-pause=1,
                        --settle-wait-time=1 for a quick test. Overrides any
                        explicit argument settings.
  --entities ENTITIES   Number of urls to load. Defaults to the total number
                        of urls.
  --max-tabs MAXTABS    Maximum number of tabs to open. Defaults to 30.
  --iterations ITERATIONS
                        Number of times to run through the test suite.
                        Defaults to 5.
  --per-tab-pause PERTABPAUSE
                        Seconds to wait in between opening tabs. Defaults to
                        10.
  --settle-wait-time SETTLEWAITTIME
                        Seconds to wait for things to settled down. Defaults
                        to 30.
2017-03-29 01:47:46 -07:00
Andrew Halberstadt
2d7ab59334 Bug 1335873 - Check for .pyc's existence before deleting it in mach_bootstrap import hook, r=glandium
This situation can happen if we attempt to import a module we know might not exist, for example:
https://dxr.mozilla.org/mozilla-central/rev/d0462b0948e0b1147dcce615bddcc46379bdadb2/testing/mozbase/mozlog/mozlog/formatters/machformatter.py#9

MozReview-Commit-ID: CTg775kN72h
2017-02-21 11:08:44 -05:00
Sebastian Hengst
b12f31759c Backed out changeset 2873be3659a3 (bug 1335873) 2017-03-01 17:34:57 +01:00
Andrew Halberstadt
8fc239e027 Bug 1335873 - Check for .pyc's existence before deleting it in mach_bootstrap import hook, r=glandium
This situation can happen if we attempt to import a module we know might not exist, for example:
https://dxr.mozilla.org/mozilla-central/rev/d0462b0948e0b1147dcce615bddcc46379bdadb2/testing/mozbase/mozlog/mozlog/formatters/machformatter.py#9

MozReview-Commit-ID: CTg775kN72h
2017-02-21 11:08:44 -05:00
Mike Hommey
0221fec13f Bug 1341215 - Remove the dependency on the mozregression module for mach artifact. r=chmanchester
This imports two modules from mozregression in the tree to do so. They
are imported from current trunk on github, rather than the version we
were getting from pypi.

Note we take six from testing/web-platform/tests/tools/six) instead of
moving it to python/six because it's there by coming from a copy of
https://github.com/w3c/wpt-tools, which contains it as a submodule, and
moving it would make updates there harder.
2017-02-21 16:10:54 +09:00
Gregory Szorc
9070564e4e Bug 1331062 - Add pytoml to mach's search path; r=froydnj
This was accidentally overlooked in 1e0bcb0402b5 (bug 1231764).

MozReview-Commit-ID: IYxrRV9G5iW
2017-01-13 12:11:52 -08:00
Chris Manchester
f6d20ce95a Bug 1316140 - Allow use of multiprocessing from config.status on windows. r=mshal
This generalizes the monkey-patching of the main module added
in bug 914563 to allow multiprocessing to be used from config.status
(which triggers the same bug as when it's used with `mach` as main).

MozReview-Commit-ID: AdOdpKzmbsp
2016-12-21 16:28:28 -08:00
Henrik Skupin
620e1de054 Bug 1320073 - Rename marionette-client to marionette-harness and release version 4.0.0. r=gps,maja_zf,mtseng,SingingTree
MozReview-Commit-ID: L6V3b5h8RWm
2016-12-12 13:05:34 +01:00
Henrik Skupin
862b5abdcc Bug 1319705 - Move Puppeteer to testing/marionette and make it available for Marionette tests in test packages. r=gps
MozReview-Commit-ID: 521o0fV72SQ
2016-11-24 17:02:52 +01:00
Kim Moir
c012e8e9bd Bug 1303590 - Remove Luciddream test suite r=aobreja 2016-09-23 09:20:54 -04:00
Greg Tatum
4249a8f398 Bug 1290988 - Add the mach generate-css-db command. r=tromey, r=chmanchester
Provide a single mach command to automatically generate the static
database of CSS properties that devtools uses for the inspector
and various editors.

MozReview-Commit-ID: 8E2jwxF0KbM
2016-09-14 10:00:27 -05:00
Dustin J. Mitchell
f49a5bdac0 Bug 1286075: include redo in mach python path; r=gps
MozReview-Commit-ID: G34XOxlMDV7
2016-08-23 00:02:38 +00:00
Anjana Vakil
a4a81795f9 Bug 1253359 - Vendor in Pytest 2.9.2 and Py 1.4.31 r=gps
Vendor in Pytest (2.9.2) and its requirement Py (1.4.31),
so that it can be used for e.g. the Marionette
harness unit tests and a pytest plugin for mozlog.

Copy pytest and py package directories (extracted from
tars on Pip) into `mozilla-central/python/`, removing
some support files (e.g. changelog, docs, tests).
Add both `.pth` entries to `virtualenv_packages.txt`.
Add both paths to `SEARCH_PATHS` in `mach_bootstrap.py`.

MozReview-Commit-ID: IOTCOUxX8R9
2016-08-10 13:34:59 +02:00
Dustin J. Mitchell
ce6bd72d21 Bug 1281004: vendor voluptuous; r=gps
MozReview-Commit-ID: Hzz7EFf4coX
2016-06-29 20:39:02 +00:00
Nathan Hakkakzadeh
dd41e9246a Bug 1100925 - Vendored pylru 1.0.9 into mozilla-central. r=gps
This makes building on msys2 easier since its pip is broken.

MozReview-Commit-ID: 1hQHeu3BKOd
2016-07-13 14:22:01 -07:00
Mike Hommey
fbee577b95 Bug 1286993 - Add build/pymake to the SEARCH_PATHS in mach_bootstrap. r=gps
It used to be there, but was removed in bug 1151124 because what I
thought was the only use of pymake in mach was removed in that bug.

Which, it turns out, was not the case. So restore it, so that mach
empty-makefiles works again.
2016-07-15 08:04:21 +09:00
Gregory Szorc
c80ef8bc8d Bug 1279564 - Use get_state_dir() from mozboot; r=glandium
Import mozboot.util and use the function from there.

MozReview-Commit-ID: B0uzpNff1t9
2016-06-10 09:41:59 -07:00
Gregory Szorc
6a28f5d6b0 Bug 1277406 - Delete now-unused Mercurial setup wizard; r=glandium
The wizard has been ported to the version-control-tools repository
and in-tree consumers have been switched to consume it from there. This
code is now dead. Kill it.

References to the now-defunct code have been removed/updated.

MozReview-Commit-ID: 5fpCXdNIp8L
2016-06-09 13:20:53 -07:00
Gregory Szorc
1c97d4988c Bug 1277406 - Move mach mercurial-setup implementation into bootstrap; r=glandium
This begins the consolidation of `mach mercurial-setup` into
`mach bootstrap`. The first step is to move the content of the
mach_commands.py file into the bootstrapper's.

I'm not crazy about adding the sys.path entry for tools/mercurial.
I intend to clean this up later.

MozReview-Commit-ID: Cq56wPG8sO1
2016-06-01 17:06:01 -07:00
Gregory Szorc
80ab9dddc0 Bug 1277406 - Remove nagging to run mach mercurial-setup from mach; r=glandium
I never really liked this. Other people had even more visceral
reactions. Let's get rid of it.

The code for touching a file when it runs has also been removed because
the only thing it was used for was the nagging feature.

MozReview-Commit-ID: ERUVkEYgkzx
2016-06-01 16:58:01 -07:00
Dustin J. Mitchell
908fe8465f Bug 1275409: remove testing/taskcluster/mach_commands.py, except 'mach taskcluster-load-image'; r=wcosta
MozReview-Commit-ID: BrhXVWT5r8D
2016-06-04 19:40:35 +00:00
Mike Hommey
84fdaf54c2 Bug 1277087 - Always add in-tree search paths when bootstrapping mach. r=gps 2016-06-02 08:48:44 +09:00
Carsten "Tomcat" Book
65b28e6c95 Backed out changeset b541ce3cbff5 (bug 1277087) for ab build failures 2016-06-01 09:19:06 +02:00
Mike Hommey
d9fc7e526f Bug 1277087 - Always add in-tree search paths when bootstrapping mach. r=gps 2016-06-01 10:52:16 +09:00
Dustin J. Mitchell
2db03e8aeb Bug 1258497: Implement a new taskgraph generation system; r=gps
The `taskgraph` package generates TaskCluster task graphs based on collections
of task "kinds".  Initially, there is only one kind, the "legacy" kind, which
reads the YAML files from `testing/taskcluster/tasks` to generate the task
graph.

Try syntax is implemented by filtering the tasks in the taskgraph after it has
been created, then extending the result to include any prerequisite tasks.

A collection of `mach taskgraph` subcommands are provided for developers to
extend or debug the task-graph generation process.

MozReview-Commit-ID: 1TJCns4XxZ8
2016-05-16 22:53:22 +00:00
Andrew Halberstadt
e706d84ced Bug 1230962 - Create mach/build system integration for mozlint, r=smacleod
MozReview-Commit-ID: 74ma5uMOphe
2016-03-18 13:54:07 -04:00
Andrew Halberstadt
a2a7da69c0 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
2016-03-28 11:18:24 -04:00
Dan Minor
703859d7b4 Bug 1250656 - Don't block mach command completion when submitting build telemetry data r=gps
This spins up a separate process to submit telemetry data rather than
blocking the execution the current mach command.

Although the initial Python process needs to wait for the second process
to complete prior to exiting, it releases control of the console once it
finishes executing Python code, so from the user's perspective, mahc command
completion is not blocked by submitting telemetry data.

MozReview-Commit-ID: FlKDYd6rNPc
2016-02-24 15:11:58 -08:00
Dan Minor
3cce47c34c Bug 1252601 - Handle requests errors gracefully when submitting telemetry data r=gps
This catches the exception and prevents further attempts to post to
telemetry in this command invocation.

MozReview-Commit-ID: JDW0zUS8fjF
2016-03-03 12:29:46 -05:00
Chris Manchester
b9501666b9 No Bug - Add python/futures to mach search paths to avoid exception when running mach build or mach test. r=gps DONTBUILD
MozReview-Commit-ID: 4QBUYXQ0GdZ
2016-03-01 15:04:28 -08:00
Andreas Tolfsen
d100d70929 Bug 1246407 - Rename parent directories for Marionette client and test harness; r=automatedtester
This change moves testing/marionette/client to testing/marionette/harness,
and testing/marionette/driver to testing/marionette/client.  This parent
directory name change reflects the true purpose of these Python packages.

MozReview-Commit-ID: B0KrGzDTLlQ
2016-02-06 17:34:10 +00:00