Commit Graph

127 Commits

Author SHA1 Message Date
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
Gregory Szorc
3a79fc3bfa Bug 1250748 - Remove the 20s countdown timer from mach first run; r=chmanchester
Previously on first `mach` run on a system, we'd display a prompt with a
20s countdown timer after which the default state directory
(~/.mozbuild) was created. Users had to wait 20s or ctrl+c and
make the directory by hand. Either way, they'd have to re-invoke
mach to run whatever command they were trying to run.

This was annoying.

This commit makes the following changes:

1) The countdown timer is replaced with "press RETURN/ENTER to continue"
2) The requirement to re-invoke mach has been removed

On first run, people now see a message telling them to press
RETURN/ENTER. Then the directory is created and whatever mach command
they requested to run is run.

While I was here, I also changed the permissions on the newly created
directory to match what it was a few lines above. Without, we're relying
on umask, which may be permissive. UNIX convention is to use a more
restrictive umask insider user directories. So this feels like the right
behavior.

MozReview-Commit-ID: IodN13xAJ8P
2016-02-23 17:29:38 -08:00
Dan Minor
04db7b82ba 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
2016-02-02 09:32:49 -05:00
Syd Polk
12735c70ef Bug 1243546 - Add mach command for external-media-tests - r=gps
MozReview-Commit-ID: 5BcunutbebG
2016-02-10 11:48:25 -06:00
Dan Minor
48ec2652af 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.
2016-02-09 10:09:17 -05:00
Dan Minor
23b9987c48 Bug 1239296 - Add telemetry_handler function to mach context r=gps
This adds a telemetry_handler function to the mach context that can be
used to store telemetry data in the state directory for later reporting.
2016-01-29 13:06:36 -05:00
Carsten "Tomcat" Book
5ba717bd52 Backed out changeset 200da85932e9 (bug 1230862) for valgrind perma failures 2016-02-10 11:04:50 +01:00
Julien Pagès
8c54a35567 Bug 1230862 - Remove mozhttpd. r=wlach 2016-02-09 03:26:43 +01:00
Phil Ringnalda
f75afdb972 Back out 0a0582597885 (bug 1243546) for Mac "global name 'args' is not defined" bustage 2016-02-09 18:44:35 -08:00
Syd Polk
10f5961f47 Bug 1243546 - Add mach command for external-media-tests - r=gps 2016-02-09 18:10:19 -06:00
EKR
fbb7de9161 Bug 1246402 - Environment variable to disable mercurial setup check. r=gps 2016-02-06 08:02:40 -08:00
Andreas Tolfsen
f85d50ebe5 Bug 1239987 - Remove marionette-transport dependency from build environment; r=gps 2016-01-30 08:55:24 +00:00
Henrik Skupin
d8ec087094 Bug 1237179 - Add mach command to run firefox-ui-tests from the source directory. r=gps 2016-01-15 19:38:31 +01:00
James Graham
f4edd8159b Bug 1207377 - Add a |mach mozharness| command for running tests locally in mozharness, r=ahal 2015-12-07 12:32:04 +00:00
Maja Frydrychowicz
32510525af Bug 1150512 - Move Marionette test runner to wptserve; r=automatedtester 2015-12-03 15:48:41 -05:00
Mike Hommey
156895b748 Bug 1229623 - Remove compilation/database.py from mach_bootstrap.py. r=mshal
When I modified ehsan's patch in bug 904572 to switch to a build backend
instead of a mach command, I forgot to remove the line added to
mach_bootstrap.py to pick the mach command, which now doesn't exist.
2015-12-03 13:34:02 +09:00
Mike Hommey
232276cccd Bug 1151124 - Add a simplified version of pymake's clinetoargv to mozbuild and use it. r=gps
Pymake's clinetoargv is very specific to pymake's use case, yet has been abused
as a replacement for shlex because shlex doesn't handle things properly for our
use cases.

Using pymake's clinetoargv, however, has shortcomings, and we're better off
importing its code in mozbuild, simplifying it a little, and using that
instead.

Plus, less dependencies on pymake will help kill it for good some day.
2015-11-24 11:29:14 +09:00
Jonas Sicking
36e03d8617 Bug 1222235: Remove monthly mercurial-update reminder. r=gps 2015-11-05 15:54:55 -08:00