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

61 Коммитов

Автор SHA1 Сообщение Дата
Steve Armand fa0b6e7c7e Bug 1397849 - Enable py2 and py3 linter on testing/mozbase. r=ahal
MozReview-Commit-ID: GnaVLhtO4un

--HG--
extra : rebase_source : 8839a423c5db505469b813957649b1605ed5737f
2017-09-25 22:57:18 -04:00
Cosm 917335fa1c Bug 1395956 - Update gecko.readthedocs links to the new firefox-source-docs.mozilla.org location. r=chutten 2017-09-02 22:11:02 +05:30
Ganti Sai Sarath Chandra 6ed789d12b Bug 1378422 - Add python 2 only classifiers to python modules under /testing, r=ahal
MozReview-Commit-ID: DRi8KFyCnBn

--HG--
extra : rebase_source : 3ac98bdc648f8a0e3dc6d3b6d42e19dfc295a396
2017-08-19 04:19:06 +05:30
Andrew Halberstadt 57887f2601 Bug 1328830 - [manifestparser] Check line continuation before looking for next key, r=jmaher
Currently manifestparser will only look for line continuations *after* looking for a key. This means
that line continuations cannot contain key separators. For example, this:

    [test]
    foo=
      bar=baz

gets treated as:

    {'name': 'test', 'foo': '', 'bar': 'baz'}

Here, bar=baz will be treated as a new key/value pair despite the indentation. This patch switches
the order around, so we look for a continuation first. Now, it is only treated as a continuation if
the indent is greater than the indent of the preceding key.

So this manifest:

    [test]
    foo=bar
      baz=fleem

is a continuation and results in:

    {'name': 'test', 'foo': 'bar\nbaz=fleem'}

But this manifest:

    [test]
      foo=bar
      baz=fleem

is not a continuation, and yields:

    {'name': 'test', 'foo': 'bar', 'baz': 'fleem'}

MozReview-Commit-ID: FAMP5TUIo9q

--HG--
extra : rebase_source : 624c53cfe0565374c1224dd86a3fffc8831279d3
2017-07-19 14:48:01 -04:00
Andrew Halberstadt c9beaa56b4 Bug 1373294 - Fix E305 (two blank lines after method or class) in files enabled by flake8 linter, r=jmaher
This is needed before we can upgrade to flake8 3.3.0, as that version starts flagging these errors.

These files were modified by running:
autopep8 --select E305 --in-place -r <dir>

on the affected directories. I did it one dir at a time and verified the result after each.

MozReview-Commit-ID: FmlsfiKIbtr

--HG--
extra : rebase_source : 9df32258cadff5d27a0e72113c57f782756c0b18
2017-06-15 12:10:59 -04:00
Andrew Halberstadt 8415b25e37 Bug 1003417 - Add a 'mozbase' subsuite to python unittests on linux, r=ted
The subsuite is added conditionally because we only have the capability of
running source-check tasks on linux at the moment. Once taskcluster support
for windows and mac has matured a bit and the taskcluster configs support
source-check there, we should apply the subuite unconditionally.

MozReview-Commit-ID: Kk9Irz3fn14

--HG--
extra : rebase_source : b9266a06583083c36477d4e93f5462ee614cdb71
2016-11-16 16:43:42 -05:00
Andrew Halberstadt 3c4766fcab Bug 1334488 - [manifestparser] Improve error message when using an invalid comment character at the start of a manifest, r=jmaher
This refactors some of the error logic into a new IniParseError exception. In addition to checking for a 'name' property, we also
check for a 'path' property. This is because some file-like objects coming out of the build system use a 'path' attribute instead
of the standard 'name'.

MozReview-Commit-ID: EXXl9gt1MQk

--HG--
extra : rebase_source : a130824e6724fdef5cf0bd627b19db68ec5fe683
2017-01-27 10:28:58 -05:00
Andrew Halberstadt 425c00ead0 Bug 1333564 - [manifestparser] Include manifest path when raising exceptions from the ini parser, r=jmaher
MozReview-Commit-ID: 3Ns9PxVnvy5

--HG--
extra : rebase_source : 24a07462052aba712e8a2b8b1fe78ade3b1f0c5e
2017-01-25 15:51:06 -05:00
Andrew Halberstadt 44a16cbe8a Bug 1333564 - [manifestparser] Add support for inline comments, r=jmaher
Previously manifestparser only supported inline comments on conditional keys, such as
skip-if, fails-if, subsuite-if, etc. But on any other key name, inline comments weren't
supported. This was a bad situation because people saw these skip-if comments, and
naturally assumed inline comments worked everywhere. Then they were surprised when things
broke in mysterious ways.

This patch removes the special-casing for skip-if and friends and allows inline comments
everywhere. A caveat to this, is that ' #' is no longer a valid substring in a value.

MozReview-Commit-ID: Hr0BIwzTgaJ

--HG--
extra : rebase_source : f9a042da2137f200434140a7e472df0799f6606d
2017-01-25 12:21:31 -05:00
Andrew Halberstadt 30e80e125a Bug 1333564 - [manifestparser] Stop supporting ';' as a valid comment character, r=jmaher
It turns out there are shockingly few cases of manifestparser manifests that actually use the ';'
character as a comment. Because we will soon allow inline comments, deprecating the use of ';' will
ensure that values are allowed to have semicolons in them.

Even without inline comments, might as well enforce consistency across manifests.

MozReview-Commit-ID: AEPPQFdNXG0

--HG--
extra : rebase_source : 3540fa385f328bffb020c0a6debc4d2b3a90ed39
2017-01-25 14:38:37 -05:00
Andrew Halberstadt 676b6a3311 Bug 1333564 - [manifestparser] Allow multi-character comment tokens, r=jmaher
MozReview-Commit-ID: 8RDgAkBVmcK

--HG--
extra : rebase_source : 1b061d9f1511c7265d1d7e2481ed1d192609d652
2017-01-25 09:41:10 -05:00
Kris Maglione 1390ab41bf Bug 994255: Add included and parent test manifest files to backend inputs list. r=gps
MozReview-Commit-ID: EvMt0ojZGFr

--HG--
extra : rebase_source : ccdf62dde1d315495e7effbdd824c2a2c14099f2
2016-11-18 14:52:54 -08:00
Andrew Halberstadt 2d76b4f70d Bug 1317970 - Make mozbase tests use mozunit for consistent formatting, r=chmanchester
The mozbase unittests don't use mozunit, so their output is confusing in the log.
This makes mozbase output consistent with the rest of the python unittests.

MozReview-Commit-ID: AIs5mza8Rn6

--HG--
extra : rebase_source : 10f65e612f5b3cebb921c47699f5a8be7cd2ba5a
2016-11-17 16:36:18 -05:00
Chris Manchester 4aaad1ce55 Bug 1313716 - Don't provide a blank subsuite as a default in the manifestparser. r=ahal
This causes consumers managing defaults themselves to fail to find a default
subsuite for tests, because the manifestparser will have provided a blank
default value by the time they incorporate defaults into a test definition.
This patch removes the provided defaults and updates a number of places assuming
the 'subsuite' field is always present.

MozReview-Commit-ID: 1jPy52VmEPr
2016-10-31 10:04:42 -07:00
Kris Maglione 3a59c31923 Backed out changeset 425c0602ccb4 (bug 1313716) for breaking mach mochitest. r=backout
MozReview-Commit-ID: pTW1acQYLV
2016-10-30 19:17:13 -07:00
Chris Manchester 2de89e603a Bug 1313716 - Don't provide a blank subsuite as a default in the manifestparser. r=ahal
This causes consumers managing defaults themselves to fail to find a default
subsuite for tests, because the manifestparser will have provided a blank
default value by the time they incorporate defaults into a test definition.
This patch removes the provided defaults and updates a number of places assuming
the 'subsuite' field is always present.

MozReview-Commit-ID: 1jPy52VmEPr

--HG--
extra : rebase_source : be7a2504af6853abb1bc532a058738f33d8dcbee
2016-10-28 11:07:21 -07:00
Chris Manchester 8792602f28 Bug 1312520 - Extract the logic for combining defaults and individual section defnitions in the manifestparser to a standalone function. r=ahal
MozReview-Commit-ID: CQNFboRhsOs
2016-10-25 12:23:39 -07:00
Chris Manchester 47d22a4d61 Bug 1312520 - Add an option to the manifestparser to prevent defaults from propagating to individual section definitions. r=ahal
Consumers will be expected to process defaults themselves through the
"manifest_defaults" member variable instead.

MozReview-Commit-ID: IGnOj3zEJfE
2016-10-25 12:23:39 -07:00
Francesco Pischedda f45ed99748 Bug 1280573 - Add testing/mozbase to flake8 linter: r=ahal
added testing/mozbase to tools/lint/flake8.lint
fixed a first batch of PEP8 errors/warnings

at first the commad autopep8 -i --max-line-length 99 -r -j 8 .
has been used to fix simpler problems, run from testing/mozbase

some of the issues can not easily fixed :
- undefined 'names' in code for example isLinux - isLinux and isBsd "fixed" with # noqa
- undefined 'message' resolved with return fmt.format(...
- undefined 'structured' resolved replacing those with mozlog
- long comments - some remaining - addressed with # noqa
- package level import everything - addressed with # flake8: noqa

restored testing/mozbase/mozdevice/mozdevice/Zeroconf.py
fixed issues reported on mozreview
fixed ')' in testing/mozbase/mozprocess/mozprocess/qijo.py imports
finally fixed multiline string at testing/mozbase/manifestparser/tests/test_manifestparser.py:114
^^^ and again, but now with ./mach python-test --path-only testing/mozbase/manifestparser/tests/test_manifestparser.py passing
fixed testing/mozbase/manifestparser/tests/test_convert_directory.py assert

fixed this error:
10:15:21     INFO -      return lambda line: stack_fixer_module.fixSymbols(line)
10:15:21     INFO -  TypeError: fixSymbols() takes exactly 2 arguments (1 given)

fixed two spaces lint error even of #  noqa comments
restored assignement to lambda with #  noqa to silence the lint error
global noqa for testing/mozbase/manifestparser/tests/test_filters.py
stupid is/is not error...

MozReview-Commit-ID: 1FpJF54GqIi

--HG--
extra : rebase_source : 3cf0277fb36a296e3506aeacc2ff05e1b03f9eac
2016-09-30 16:08:37 +02:00
Andrew Halberstadt c5c5ece520 Bug 1296735 - [manifestparser] pathprefix filter should use absolute paths if the filter is also absolute, r=jmaher
This fixes an error when attempting to run xpcshell-test with a test path from an interactive loaner.

MozReview-Commit-ID: 20kg5zKplhT

--HG--
extra : rebase_source : cda8e17dd6ad7b606711630e90df8d5e65c8bda3
2016-08-22 13:31:56 -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
Tooru Fujisawa 6e26277e91 Bug 1221139 - Report actual exception string and traceback in ParseError. r=ahal
--HG--
extra : commitid : 4C7qISpav0m
extra : rebase_source : 3260ad4cb2063da21e94b786f7b9efbd91fd1d9d
2015-11-07 20:45:07 +09:00
Chris Manchester f7a9504a73 Bug 1203266 - Optionally read manifestparser manifests with a Finder class. r=ahal
We need to go through an abstraction layer when manifestparser manifests
are read as a part of reading moz.build files in case moz.build reading
is using mercurial as its filesystem. This adds an optional finder member,
which will be used if present for IO that happens when reading manifests,
This needs to be optional, because the manifestparser can be used as a
standalone package that isn't distributed with mozpack.

--HG--
extra : commitid : 7S8mdpexvgW
2015-10-16 15:31:20 -07:00
Chris Manchester a8ec3a69cd Bug 1203266 - Don't call normpath in the manifestparser on paths that don't contain '..'. r=ahal
Profiling the manifestparser revealed that 25% of its total time is spent in a single
call to os.path.normpath, called on each test path in each manifest. For the manifests
in mozilla-central, these calls almost always return their input. To save time, this
patch modifies the manifestparser to not call normpath on paths that don't contain
'..'. This will change the parsed result of manifests containing no-op path
components ('//' or '/./') to include those components in their output.

--HG--
extra : commitid : D7g4GX6VLuC
2015-10-16 15:31:20 -07:00
Julien Pagès a978aad1fc Bug 980788 - [manifestparser] Add greater-than/less-than (equal) support. r=ahal 2015-07-15 04:42:00 -04:00
Andrew Halberstadt cfd7060fa9 Bug 1182817 - [manifestparser] Fix exception in chunk_by_slice when there are two times more chunks than tests, r=chmanchester
--HG--
extra : commitid : K5KnytkByDT
extra : rebase_source : 502b560240f8319b3955485578705a5319980992
2015-07-13 14:38:34 -04:00
Andrew Halberstadt 42888ae5f5 Bug 1171971 - Move test_paths argument out of mach and into mochitest; remove --test-path, r=chmanchester
--HG--
extra : commitid : KbQllMAJdfl
extra : rebase_source : 2069e41c760e4993b1d6d0ddd70799e426a19089
2015-06-05 13:28:29 -04:00
Andrew Halberstadt 4b227980fa Bug 1150497 - Make manifestparser tags whitespace (instead of comma) delimited to conform to other attributes, r=chmanchester
--HG--
extra : rebase_source : 2e64baefde7623d810cdd6dfe6f060792e2831bf
2015-04-02 09:50:30 -04:00
Andrew Halberstadt 766127a915 Bug 1150050 - Bump manifestparser to v1.1 and marionette-client to v0.9.3 to pick up tagging feature, r=AutomatedTester
--HG--
extra : rebase_source : 0f1f34a19aae8b031439bb0dbe533875e10c218f
2015-04-01 11:22:48 -04:00
Andrew Halberstadt 056bddce11 Bug 987360 - Add ability to tag tests with arbitrary strings and run them, r=chmanchester
Add a `tags` attribute to a test or DEFAULT section in a manifest:

[test_foo]
tags = foo

Then run all tests with a given tag by passing in `--tag foo` to a supported test harness. So far mochitest, xpcshell and marionette are supported.

--HG--
extra : rebase_source : d75905da1ca021a15a9538117d3866425f73d962
extra : source : 3c34fd480729e3b6684fba747ff61078f672ce16
2015-03-19 16:15:33 -04:00
Andrew Halberstadt 23dabc3c03 Bug 1142050 - Add --chunk-by-runtime option to mochitest, r=jmaher
With --chunk-by-runtime enabled, test runtime data collected from automation is used to try and make all chunks take the same amount of time. So far only data for mochitest browser-chrome is added.

--HG--
extra : rebase_source : e6f8327286ee3e69036f7781211f618b870823b5
2015-03-26 15:21:45 -04:00
Ryan VanderMeulen 378481f17f Backed out changesets acbab9e22691 and 3c34fd480729 (bug 987360) for Android/B2G xpcshell bustage.
CLOSED TREE

--HG--
extra : rebase_source : d79b1dcfb12ae8e12efefd7d15b8a2f9f5063377
2015-03-27 13:12:19 -04:00
Andrew Halberstadt e3068d1b6f Bug 987360 - Add ability to tag tests with arbitrary strings and run them, r=chmanchester
Add a `tags` attribute to a test or DEFAULT section in a manifest:

[test_foo]
tags = foo

Then run all tests with a given tag by passing in `--tag foo` to a supported test harness. So far mochitest, xpcshell and marionette are supported.

--HG--
extra : rebase_source : 68a0931c6a8ee1df4f5c09d67c396490774aa856
2015-03-19 16:15:33 -04:00
Andrew Halberstadt 4a6ff3aa47 Bug 1131098 - Make mochitest use manifestparser's chunking algorithms and remove JS based ones, r=jmaher
--HG--
extra : rebase_source : 1374462488e20cbd6e2048d8d5c63aff49a87911
2015-03-10 09:55:30 -04:00
Andrew Halberstadt 07ce5b611f Bug 1137339 - [manifestparser] implement a chunk_by_runtime filter, r=jmaher
With this chunking strategy, the runtimes of tests are taken into account, such that each chunk
takes roughly the same amount of time to finish. Tests belonging to the same manifest will not get
split up.

The algorithm works by sorting every manifest from slowest to fastest. Each manifest is popped off
and its tests are added to the fastest chunk to date until no manifests are left. Total runtimes of
the chunks are re-calculated after every addition.

--HG--
extra : rebase_source : 55eb880256549cb387e659cddbad0f20eaca9f3b
2015-03-05 09:12:55 -05:00
Ryan VanderMeulen f2ad1daa19 Backed out changeset 99c2fcc61cc2 (bug 958147) for B2G Desktop and Mulet checktest failures.
CLOSED TREE
2015-03-05 10:02:07 -05:00
Anish f7451e8d19 Bug 958147 - Choose one of run-if or skip-if and get rid of the other. r = jmaher,mwargers,ahal 2015-03-05 09:14:04 -05:00
Carsten "Tomcat" Book d65d7abd09 Backed out changeset b3fe7a6a4939 (bug 958147) for m4 test failures on a CLOSED TREE 2015-03-05 14:00:33 +01:00
Anish d5524e76d3 Bug 958147 - Remove run_if filter from manifestparser, r=ahal 2015-03-04 15:46:58 -05:00
Andrew Halberstadt c6d32a2950 Bug 1134395 - mozbuild should pass in rootdir to manifestparser to properly calculate test relpaths, r=gps
--HG--
extra : rebase_source : 0d77784a6e7eea31be009f3f475861cf57caeeb3
2015-02-18 17:07:55 -05:00
Anish 4063a569ed Bug 958147 - Choose one of run-if or skip-if and get rid of the other.r=jmaher, mwargers 2015-03-03 08:46:37 -05:00
Andrew Halberstadt 9252eecf41 Bug 1132154 - [manifestparser] Implement basic chunking algorithms in manifestparser, r=jmaher
The algorithms are chunk_by_slice and chunk_by_dir and were largely copied from:
http://hg.mozilla.org/mozilla-central/file/fd12875a8a48/testing/mochitest/chunkifyTests.js

--HG--
extra : rebase_source : a19c24d078b90939062c42769d72e7db4e1b35d2
2015-02-13 16:23:45 -05:00
Andrew Halberstadt f02004a920 Bug 1123763 - [manifestparser] Implement filter system for manifest.active_tests(), r=ted
A filter is a callable that accepts an iterable of tests and a dictionary of values (e.g mozinfo.info) and returns an iterable of tests. Note filtering can mean modifying tests in addition to removing them. For example, this implements a "timeout-if" tag in the manifest:

    from manifestparser import expression
    import mozinfo

    def timeout_if(tests, values):
        for test in tests:
            if 'timeout-if' in test:
                timeout, condition = test['timeout-if'].split(',', 1)
                if expression.parse(condition, **values):
                    test['timeout'] = timeout
        yield test

    tests = mp.active_tests(filters=[timeout_if], **mozinfo.info)

--HG--
extra : rebase_source : adead90910811e71e8ea2bb862f2b8e92f2c1bee
2015-02-10 09:38:29 -05:00
Andrew Halberstadt eb68fdf7f2 Bug 1120983 - [manifestparser] Split manifestparser.py into several smaller files, r=wlach
Simple refactor that moves logic out of manifestparser.py and into cli.py, expression.py and ini.py.

--HG--
extra : rebase_source : dd454973cdb3bcb7ec29dd2e1c0c594e3b3fb817
2015-01-15 09:37:51 -05:00
Henrik Skupin a46504a0fc Bug 1113284 - Bump manifestparser to 0.9. r=ahal
--HG--
extra : rebase_source : aaf0d817aab50e25a2f45c2f3c5e386c366ea056
2014-12-18 21:00:35 +01:00
Henrik Skupin e88593acfd Bug 1110837 - [manifestparser] If parents are used, the first include in the master manifest is always used to determine defaults. r=jmaher
--HG--
extra : rebase_source : a28ecbd99906a54df76a5b74a45af9feac120488
2014-12-18 20:55:44 +01:00
Julien Pagès 3dfa6981dc Bug 920938 - [manifestparser] handle symlinks in populate_directory and from directories; r=jmaher 2014-12-05 09:59:00 +01:00
Pankaj Malhotra(:bitgeeky) a5b690fcb0 Bug 1087682 - Add a manifestparser test for the case where there is no manifest. r=jgriffin 2014-11-04 04:16:00 +01:00
Jonathan Griffin 5c8f5b9785 Bug 1087711 - Bump manifestparser to 0.8, r=jmaher 2014-10-22 16:04:15 -07:00
Chris Manchester a280752de3 Bug 1068923 - Provide the including manifest name to uniquely identify tests in case of a dupe manifest. r=ahal
The path of the including manifest is included in test objects whenever possible to aide identification of tests in cases the same test file is included by multiple manifests.
2014-10-22 16:04:51 -04:00