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

38 Коммитов

Автор SHA1 Сообщение Дата
Anjana Vakil f5f9b0b768 Bug 1253359 - Use vendored Pytest in `python-test` and Mn harness tests r=gps
In the `python-test` mach command and the mozharness script for
the Marionette harness tests, use the vendored-in Pytest
instead of installing from pip.

Add the Marionette harness test requirements file to the
file_patterns in the definition of the marionette-harness taskcluster
job, as changes to the requirements should trigger the job to run.


MozReview-Commit-ID: J5pln2WB4GY

--HG--
extra : rebase_source : 5144ccfabb84eb0da244b24f6d27b59ae183c174
2016-08-05 20:10:09 +02:00
Andrew Halberstadt fc24b11e43 Bug 1271734 - Move all eslint related infrastructure to tools/lint, r=miker
This commit simply moves 'testing/eslint' to 'tools/lint/eslint' and the eslint related
mach command from 'python/mach_commands.py' to 'tools/lint/mach_commands.py'. It shouldn't
have any functional change on running eslint, either through mach or taskcluster.

This is in preparation for bug 1258341, to make the diffs there a little easier to read.

MozReview-Commit-ID: K03sn9lv9Lv

--HG--
rename : testing/eslint/eslint-plugin-mozilla/LICENSE => tools/lint/eslint/eslint-plugin-mozilla/LICENSE
rename : testing/eslint/eslint-plugin-mozilla/docs/balanced-listeners.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/balanced-listeners.rst
rename : testing/eslint/eslint-plugin-mozilla/docs/import-browserjs-globals.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/import-browserjs-globals.rst
rename : testing/eslint/eslint-plugin-mozilla/docs/import-globals.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/import-globals.rst
rename : testing/eslint/eslint-plugin-mozilla/docs/import-headjs-globals.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/import-headjs-globals.rst
rename : testing/eslint/eslint-plugin-mozilla/docs/index.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/index.rst
rename : testing/eslint/eslint-plugin-mozilla/docs/mark-test-function-used.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/mark-test-function-used.rst
rename : testing/eslint/eslint-plugin-mozilla/docs/no-aArgs.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/no-aArgs.rst
rename : testing/eslint/eslint-plugin-mozilla/docs/no-cpows-in-tests.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/no-cpows-in-tests.rst
rename : testing/eslint/eslint-plugin-mozilla/docs/reject-importGlobalProperties.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/reject-importGlobalProperties.rst
rename : testing/eslint/eslint-plugin-mozilla/docs/var-only-at-top-level.rst => tools/lint/eslint/eslint-plugin-mozilla/docs/var-only-at-top-level.rst
rename : testing/eslint/eslint-plugin-mozilla/lib/globals.js => tools/lint/eslint/eslint-plugin-mozilla/lib/globals.js
rename : testing/eslint/eslint-plugin-mozilla/lib/helpers.js => tools/lint/eslint/eslint-plugin-mozilla/lib/helpers.js
rename : testing/eslint/eslint-plugin-mozilla/lib/index.js => tools/lint/eslint/eslint-plugin-mozilla/lib/index.js
rename : testing/eslint/eslint-plugin-mozilla/lib/processors/xbl-bindings.js => tools/lint/eslint/eslint-plugin-mozilla/lib/processors/xbl-bindings.js
rename : testing/eslint/eslint-plugin-mozilla/lib/rules/.eslintrc => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/.eslintrc
rename : testing/eslint/eslint-plugin-mozilla/lib/rules/balanced-listeners.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/balanced-listeners.js
rename : testing/eslint/eslint-plugin-mozilla/lib/rules/import-browserjs-globals.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/import-browserjs-globals.js
rename : testing/eslint/eslint-plugin-mozilla/lib/rules/import-globals.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/import-globals.js
rename : testing/eslint/eslint-plugin-mozilla/lib/rules/import-headjs-globals.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/import-headjs-globals.js
rename : testing/eslint/eslint-plugin-mozilla/lib/rules/mark-test-function-used.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/mark-test-function-used.js
rename : testing/eslint/eslint-plugin-mozilla/lib/rules/no-aArgs.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/no-aArgs.js
rename : testing/eslint/eslint-plugin-mozilla/lib/rules/no-cpows-in-tests.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/no-cpows-in-tests.js
rename : testing/eslint/eslint-plugin-mozilla/lib/rules/reject-importGlobalProperties.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/reject-importGlobalProperties.js
rename : testing/eslint/eslint-plugin-mozilla/lib/rules/var-only-at-top-level.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/var-only-at-top-level.js
rename : testing/eslint/eslint-plugin-mozilla/moz.build => tools/lint/eslint/eslint-plugin-mozilla/moz.build
rename : testing/eslint/eslint-plugin-mozilla/package.json => tools/lint/eslint/eslint-plugin-mozilla/package.json
rename : testing/eslint/manifest.tt => tools/lint/eslint/manifest.tt
rename : testing/eslint/npm-shrinkwrap.json => tools/lint/eslint/npm-shrinkwrap.json
rename : testing/eslint/package.json => tools/lint/eslint/package.json
rename : testing/eslint/update => tools/lint/eslint/update
extra : rebase_source : bb44b6285acf4625079cb6a3aaca7d9ada778c3a
2016-06-02 15:38:36 -04:00
Michael Ratcliffe 348a5cd296 Bug 1273623 - Optimize eslintModuleHasIssues. r=jryans
MozReview-Commit-ID: Iu1IhDCgLJm

--HG--
extra : histedit_source : 3d3397aeb732876e7d310a5f8a59b434bdd9902e
2016-05-18 16:45:49 +01:00
Michael Ratcliffe d0f51c8409 Bug 1270851 - mach eslint should install eslint and their dependencies if not installed r=gps
--HG--
extra : amend_source : 875066804424fadccc32aa63f3bc31b76286b7c1
2016-05-13 14:06:08 +01:00
Michael Ratcliffe 7b575a75a0 Bug 1265082 - ESLint jobs are apparently hitting the network r=me,dustin,pbro,jryans
So a few changes here:
- node_modules is downloaded using tooltool so that we dont need to rely on external infrastructure.
- We have a npm-shrinkwrap.json file that version locks all of our node packages.
- eslint, eslint-plugin-mozilla etc. are now all installed locally.

In reality this means that we don't hit the network and we don't force users into installing global packages.

./mach eslint --setup has also been improved. We install packages locally and display the path of the user's eslint binary (useful for configuring editors).

eslint-plugin-mozilla has been moved from testing/eslint-plugin-mozilla to /testing/eslint/eslint-plugin-mozilla.

The node_modules directory for eslint and other plugins is located in testing/eslint/.

MozReview-Commit-ID: 4SFSxzka6BS

--HG--
rename : testing/eslint-plugin-mozilla/LICENSE => testing/eslint/eslint-plugin-mozilla/LICENSE
rename : testing/eslint-plugin-mozilla/docs/balanced-listeners.rst => testing/eslint/eslint-plugin-mozilla/docs/balanced-listeners.rst
rename : testing/eslint-plugin-mozilla/docs/import-browserjs-globals.rst => testing/eslint/eslint-plugin-mozilla/docs/import-browserjs-globals.rst
rename : testing/eslint-plugin-mozilla/docs/import-globals.rst => testing/eslint/eslint-plugin-mozilla/docs/import-globals.rst
rename : testing/eslint-plugin-mozilla/docs/import-headjs-globals.rst => testing/eslint/eslint-plugin-mozilla/docs/import-headjs-globals.rst
rename : testing/eslint-plugin-mozilla/docs/index.rst => testing/eslint/eslint-plugin-mozilla/docs/index.rst
rename : testing/eslint-plugin-mozilla/docs/mark-test-function-used.rst => testing/eslint/eslint-plugin-mozilla/docs/mark-test-function-used.rst
rename : testing/eslint-plugin-mozilla/docs/no-aArgs.rst => testing/eslint/eslint-plugin-mozilla/docs/no-aArgs.rst
rename : testing/eslint-plugin-mozilla/docs/no-cpows-in-tests.rst => testing/eslint/eslint-plugin-mozilla/docs/no-cpows-in-tests.rst
rename : testing/eslint-plugin-mozilla/docs/reject-importGlobalProperties.rst => testing/eslint/eslint-plugin-mozilla/docs/reject-importGlobalProperties.rst
rename : testing/eslint-plugin-mozilla/docs/var-only-at-top-level.rst => testing/eslint/eslint-plugin-mozilla/docs/var-only-at-top-level.rst
rename : testing/eslint-plugin-mozilla/lib/globals.js => testing/eslint/eslint-plugin-mozilla/lib/globals.js
rename : testing/eslint-plugin-mozilla/lib/helpers.js => testing/eslint/eslint-plugin-mozilla/lib/helpers.js
rename : testing/eslint-plugin-mozilla/lib/index.js => testing/eslint/eslint-plugin-mozilla/lib/index.js
rename : testing/eslint-plugin-mozilla/lib/processors/xbl-bindings.js => testing/eslint/eslint-plugin-mozilla/lib/processors/xbl-bindings.js
rename : testing/eslint-plugin-mozilla/lib/rules/.eslintrc => testing/eslint/eslint-plugin-mozilla/lib/rules/.eslintrc
rename : testing/eslint-plugin-mozilla/lib/rules/balanced-listeners.js => testing/eslint/eslint-plugin-mozilla/lib/rules/balanced-listeners.js
rename : testing/eslint-plugin-mozilla/lib/rules/import-browserjs-globals.js => testing/eslint/eslint-plugin-mozilla/lib/rules/import-browserjs-globals.js
rename : testing/eslint-plugin-mozilla/lib/rules/import-globals.js => testing/eslint/eslint-plugin-mozilla/lib/rules/import-globals.js
rename : testing/eslint-plugin-mozilla/lib/rules/import-headjs-globals.js => testing/eslint/eslint-plugin-mozilla/lib/rules/import-headjs-globals.js
rename : testing/eslint-plugin-mozilla/lib/rules/mark-test-function-used.js => testing/eslint/eslint-plugin-mozilla/lib/rules/mark-test-function-used.js
rename : testing/eslint-plugin-mozilla/lib/rules/no-aArgs.js => testing/eslint/eslint-plugin-mozilla/lib/rules/no-aArgs.js
rename : testing/eslint-plugin-mozilla/lib/rules/no-cpows-in-tests.js => testing/eslint/eslint-plugin-mozilla/lib/rules/no-cpows-in-tests.js
rename : testing/eslint-plugin-mozilla/lib/rules/reject-importGlobalProperties.js => testing/eslint/eslint-plugin-mozilla/lib/rules/reject-importGlobalProperties.js
rename : testing/eslint-plugin-mozilla/lib/rules/var-only-at-top-level.js => testing/eslint/eslint-plugin-mozilla/lib/rules/var-only-at-top-level.js
rename : testing/eslint-plugin-mozilla/moz.build => testing/eslint/eslint-plugin-mozilla/moz.build
rename : testing/eslint-plugin-mozilla/package.json => testing/eslint/eslint-plugin-mozilla/package.json
extra : rebase_source : cf689f6cc170b9a22018c981a768f545f952e019
2016-05-02 00:22:31 +01:00
Alexandre Poirot be70f31de3 Bug 1271706 - Warn when eslint is outdated. r=gps 2016-05-11 07:16:33 -07:00
J. Ryan Stinnett 1b0b375ad7 Bug 1270596 - Upgrade to ESLint 2.9.0. r=ahal
MozReview-Commit-ID: IylFUWf1HVG
2016-05-06 10:41:04 -05:00
Hector Zhao a2dad95037 Bug 1268752 - Bug fix in locating eslint with npm. r=gps
MozReview-Commit-ID: 2020nKjC5kL

--HG--
extra : rebase_source : db5a653a6da48e066de407c9b994f6a71326b4c5
2016-04-29 10:50:40 +08: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
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
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
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
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
Kris Maglione 8d948cbdfc Bug 1230776: Support scripts from HTML files in eslint. r=gps
Also removes related unused variables in mach_commands.py.

--HG--
extra : commitid : IiDVMuEZtA5
extra : rebase_source : 575a51dd0ad5450323b4da5f441f8e5d721e41d6
2015-12-05 13:17:49 -08:00
Felipe Gomes 4680ffb080 Bug 1231720 - Log when ESLint finishes running. r=nalexander
--HG--
extra : commitid : 5u08LIBan4s
2015-12-10 14:31:14 -05:00
Dave Townsend 9ee8a4af74 Bug 1230300: Fix mach eslint to pass command arguments through to eslint. r=gps
Currently mach treats the first argument to eslint as the path and moves it to
the end of the arguments but this breaks usage like "mach eslint -f json browser".

It used to be necessary to change to the directory you wanted to lint but now
the .eslintignore is at the top level we just run from the top level. This means
the path argument doesn't need to be special anymore.

--HG--
extra : commitid : 5ozct0pVSC4
extra : rebase_source : 22132a240d8e6f4d099dbcdeb793958d7173e154
extra : amend_source : 2b9931b4283e1c84f699027e13eccc33fcdec978
2015-12-03 10:38:29 -08:00
Dave Townsend e966ac1914 Bug 1229858: Add a preprocessor to convert XBL into JavaScript blocks for eslint. r=miker
--HG--
extra : commitid : KBrnZcg3l6i
extra : rebase_source : 0b961d96d021923d7ef2855367549b3aa2a077da
extra : amend_source : 7f403c59c018656bcff98e7fc2996bfbb9b853d3
2015-12-02 17:03:33 -08:00
Jared Wein d118134fda Bug 1229154 - Launch 'eslint' with UNIX environment since 'eslint' is not a valid Win32 binary. r=gps
--HG--
extra : rebase_source : a738aa832da24531c47a72632ecef8c729601966
2015-12-01 14:29:47 -05:00
Dave Townsend 3593419254 Bug 1228628: Move all eslintignore rules to the top-level of the tree. r=mconley
--HG--
extra : commitid : Dwq9c2G0xAV
extra : rebase_source : 29ef8c7dad0b0477933d82ea87fd157607cc7b14
extra : amend_source : f0353d9eab87d940d29377401b60606153644985
2015-11-27 09:39:59 -08:00
Michael Ratcliffe fc66d30a75 Bug 1212047 - Improve ESLint logging in case of error r=glandium
Fix *all* return codes

--HG--
extra : transplant_source : %DEp0%92%E4%9E%8E1%17%B0%D4%AE%2C%C0%C0%04%7DBd%AE
2015-10-23 17:18:45 +01:00
Michael Ratcliffe 59b814892b Bug 1211223 - Error running eslint setup on Windows r=mh+mozilla, r=pbro
--HG--
extra : commitid : VCSW7YjYq1
extra : rebase_source : 619bf85751c2f9281c897d958893c62360d4fd37
2015-10-23 14:36:24 +01:00
Michael Ratcliffe 3efb3a9e6f Bug 1203520 - We need a DevTools ESLint plugin containing our ruleset r=gps
--HG--
extra : commitid : FrMOnVBUxmY
extra : rebase_source : c38511e94177f651a0decad41180991c54cb0f33
2015-09-30 14:44:48 +01:00
Nick Alexander 159cd7e187 Bug 1177933 - Add |mach eslint| command. r=mcomella,dmose
DONTBUILD NPOTB

--HG--
extra : commitid : IkJltHjrNkD
extra : rebase_source : 93b215c71160013c41fc447ff8eea16f670833cf
extra : histedit_source : 73c8204c8aa208b5ed7739b2f7064a110d6f5982%2Cf5cb35fa8eeea8c6443f96b3940df32c2e5fb826
2015-07-02 12:18:52 -07:00
Gregory Szorc 0fd4fce9ae Bug 1176642 - Defer import of glob; r=glandium
This was the only import of glob from all mach_commands.py files. Kill
it.

With this commit, there are no modules imported by a single
mach_commands.py outside of testing/web-platform/mach_commands.py.

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

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

--HG--
extra : commitid : 6tFME1KKfTD
extra : rebase_source : 78728f82f5487281620e00c2a8004cd5e1968087
2015-06-21 17:39:09 -07:00
Gregory Szorc a19bee3a08 Bug 1176642 - Remove unused imports; r=glandium
--HG--
extra : commitid : IZ7JkH4GKW4
extra : rebase_source : 4c3301c5c353be8afed407df4a003a9cac4583e8
2015-06-25 12:16:38 -07:00
Mike Hommey 525ae5030d Bug 1147283 - Replace mozpack.path with mozpath. r=mshal
Back when mozpack.path was added, it was used as:

  import mozpack.path
  mozpack.path.func()

Nowadays, the common idiom is:

  import mozpack.path as mozpath
  mozpath.func()

because it's shorter.

$ git grep mozpath\\. | wc -l
423
$ git grep mozpack.path\\. | wc -l
123

This change was done with:
$ git grep -l mozpack.path\\. | xargs sed -i 's/mozpack\.path\./mozpath./g'
$ git grep -l 'import mozpack.path$' | xargs sed -i 's/import mozpack.path$/\0 as mozpath/'
$ (pat='import mozpack.path as mozpath'; git grep -l "$pat" | xargs sed -i "1,/$pat/b;/$pat/d")
2015-03-27 08:13:16 +09:00
Mike Hommey 417a2977b3 Bug 1076649 - Remove the '+' prefixing from mach commands with allow_all_arguments=True. r=gps
The reason to use '+' prefixing was to distinguish between options to the
mach command itself, and options that are passed down to whatever the
command does (like mach run passing down args to the built application).
That makes things unnecessarily awkward, and quite non-standard.

Instead, use standard '-' prefixing, and pass all the unknown arguments
down. If there is overlap between the known arguments and arguments supported
by the underlying tool (like -remote when using mach run), it is possible to
use '--' to mark all following arguments as being targetted at the underlying
tool.

For instance:
    mach run -- -remote something
would run
    firefox -remote something
while
    mach run -remote something
would run
    firefox something

As allow_all_arguments is redundant with the presence of a argparse.REMAINDER
CommandArgument, allow_all_arguments is removed. The only mach command with a
argparse.REMAINDER CommandArgument without allow_all_arguments was "mach dmd",
and it did so because it didn't want to use '+' prefixes.
2014-10-07 07:36:27 +09:00
Nathan Froyd 4db6e0c4ea Bug 1062518 - ensure that |mach python-test| considers $PWD when finding tests; r=mshal 2014-09-15 13:25:41 -04:00
Nathan Froyd 77b3f5251c Bug 1056862 - make |mach python-test| work even if run from outside the srcdir; r=gps
DONTBUILD because NPOTB
2014-08-21 11:03:26 -04:00
Gregory Szorc fce7b45cdf Bug 952280 - mach python commands now use virtualenv APIs; r=mshal
The Python-related mach commands were written before we had a virtualenv
API exposed to the mach command context. This patch updates those
commands to use the newer APIs. As a bonus, these commands now work
without running configure!

--HG--
extra : rebase_source : ea394d6fc0c5fa2d3a3a6ed25fc59ce6be40690c
extra : amend_source : e841d57a2578c93b778ef73c68c35a8cc7cfde44
2013-12-19 13:48:37 -08:00
Mike Hommey 5cdc0fbec2 Bug 905490 - Avoid "mach python" logging the python command. r=gps 2013-08-15 23:45:09 +09:00
Matt Brubeck ac0a131eac Bug 899695 - Fix exception in "mach python" on Windows [r=gps]
DONTBUILD (not part of the build)
2013-08-08 08:06:02 -07:00
Nick Alexander 7a82c120fd Bug 818744 - mach commands to run Python and Python unit tests. r=gps
DONTBUILD because NPOTB
2013-07-02 17:33:48 -07:00