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

42 Коммитов

Автор SHA1 Сообщение Дата
Andrew Halberstadt 794955920a Bug 1437912 - [moztest] Add some missing subsuite definitions, r=gbrown
Since we're adding specific 'task_regexes' for each new suite definition,
this will allow us to schedule tests of these subsuites with
|mach try fuzzy <path>|.

MozReview-Commit-ID: 2mDSneV95lG

--HG--
extra : rebase_source : 467b9d885e92c1c855ed547f2a7496b1062f2dc2
2018-02-16 09:35:25 -05:00
Andrew Halberstadt f249b70e43 Bug 1437912 - [moztest] Map flavors and subsuites to a suite definition, r=gbrown
The end goal here is to be able to use |mach try fuzzy <path>| with tests that
belong to a subsuite. To do this, we need a unique 'task_regex' value for each
subsuite so that we can map a test path back to a set of tasks.

This removes the TEST_FLAVORS dict (which was mostly just a redefinition of the
data in TEST_SUITES), and instead provides two new private mappings:

<flavor> -> suite definition
(<flavor>, <subsuite>) -> suite definition

To retrieve a suite definition given a flavor/subsuite, consumers can now call
get_suite_definition.

MozReview-Commit-ID: 2pe1v1IHUVy

--HG--
extra : rebase_source : 6fff947ba214112ccf16c894174a6a0e2487111a
2018-02-13 14:16:46 -05:00
Andrew Halberstadt 31a703789c Bug 1437912 - [moztest] Make TEST_SUITES aliases case insensitive, r=gbrown
This removes a lot of redundant alias definitions by calling lower() on the
user input. It also adds a couple of new aliases that look like they might
be useful.

MozReview-Commit-ID: 3Aix4LPB8wg

--HG--
extra : rebase_source : c4bdc327bd737a18f03952bb360af35608d091f1
2018-02-15 11:44:44 -05:00
Andrew Halberstadt f354075c7a 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

--HG--
extra : rebase_source : 7c74a7d0d81f2c984b47aff3a0ee3448b791177b
2018-01-31 14:32:08 -05:00
Andrew Halberstadt 3087b17a69 Bug 1413928 - [tryselect] Implement paths for |mach try fuzzy| r=maja_zf
This enables the syntax like:
./mach try fuzzy dom/indexedDB

This will open up the fzf interface like normal, except only tasks
that have tests under dom/indexedDB will be selectable (and there
will only be one chunk per configuration).

This can be combined with -q/--query like normal:
./mach try fuzzy dom/indexedDB -q "!pgo !cov !asan"

When the tasks get scheduled, only the tests under the specified
path(s) will run within the harness.

MozReview-Commit-ID: IHRXXi5mB4G

--HG--
extra : rebase_source : 8a89f255591e6dfa31b1420196c4698f2015d10c
2017-11-15 16:36:07 -05:00
Andreas Tolfsen b5acf25317 Bug 1425317 - Hook geckodriver up to mach's test command. r=ahal
This removes the subcommands for "./mach geckodriver", reverting
it back to have the meaning of running the geckodriver binary.

The build- and test commands are now integrated with mach, which
means you can run "./mach build testing/geckodriver" and "./mach
test testing/geckodriver" to run tests.  This is backed by a new
top-level "./mach geckodriver-test" command, which we will not be
announcing.

MozReview-Commit-ID: CiQsfNqrvIp

--HG--
extra : rebase_source : 6c492b7e1128e4858e42ae4bb35ab4b29564dbeb
2017-12-15 17:27:52 -06:00
Tom Prince a45ea20b93 Bug 1413575: Adjust in-tree references to mozbase documentation to point in-tree. r=ahal
MozReview-Commit-ID: rctbByyjTA

--HG--
extra : rebase_source : a682eb6d77b79640ac9ec20e9d64340613bcfed7
2017-11-20 11:43:13 -07:00
Andrew Halberstadt 52dad304bf Bug 1414399 - [moztest] Refactor |mach test|'s resolving logic into moztest.resolve r=gps
The code in |mach test| for test resolving, should get merged with the TestResolver
class in moztest.resolve. This way it can be shared with other modules and we'll
have a single canonical place for all our test resolving logic.

MozReview-Commit-ID: IHRXXi5mB4G

--HG--
extra : rebase_source : 6f96d06412ab8fa152ac5d9bdd15acbcdc9695c4
2017-11-08 09:59:51 -05:00
Andrew Halberstadt a69182174e Bug 1414399 - [mozbuild/moztest] Move mozbuild.testing.TestResolver to moztest.resolve r=gps
The TestMetadata and TestResolver classes aren't technically part of the build
system. The only connection is that they consume some build system output.

The next patch in this series is going to be merging in a bunch of other test
resolving logic from other parts of the tree. Moving this out first allows us
to keep that extra logic out of mozbuild.

MozReview-Commit-ID: 1eq4SjFVCyW

--HG--
rename : python/mozbuild/mozbuild/test/test_testing.py => testing/mozbase/moztest/tests/test_resolve.py
extra : rebase_source : 7ff11f9ec455547533082d20cb5371845f7a4f21
2017-11-06 08:41:42 -05:00
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
Andrew Halberstadt db3fb1fa34 Bug 1403983 - Fix reftest regression where screenshots aren't being output and add a test, r=jmaher
MozReview-Commit-ID: 8ZqmukDtWpO

--HG--
extra : rebase_source : 86544bda6e79e5e35444b4083e76d2cf8642c408
2017-09-28 12:26:51 -04:00
Andrew Halberstadt 9efc4d301f Bug 1392390 - Refactor common code out of mochitest selftests and into a new moztest.selftest module, r=jmaher
This includes code for downloading a Firefox binary, downloading + setting up a tests.zip and
running output through mozharness' output parsers. This is all stuff that will also be required
for the reftest selftests.

I couldn't think of a better location to put this stuff, suggestions welcome.

MozReview-Commit-ID: 59TSbsugT5T

--HG--
extra : rebase_source : a328f6bc90e73fe23f9054933cd01a30065419f6
2017-09-11 16:06:06 -04:00
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 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
Henrik Skupin 3b00d747cb Bug 1323770 - Moztest should forward correct test result. r=ahal
Registered callback handlers for tests should receive the correct
test status when the test has been finished, and not always "Error".

This change allows those callbacks to run specific code for individual
test results, eg. only do screenshots for failures.

MozReview-Commit-ID: FfbCRR0Jvjb

--HG--
extra : rebase_source : c73253acbb666ca62b23f806145c20f0a70c934c
2016-12-21 11:19:36 +01:00
Wes Kocher 4bed5ca05c Backed out 4 changesets (bug 1323770) for marionette bustage a=backout
Backed out changeset bb8ccabdbe27 (bug 1323770)
Backed out changeset f1fbf0853e4f (bug 1323770)
Backed out changeset d0e5cb3af786 (bug 1323770)
Backed out changeset 71e82343afb9 (bug 1323770)
2016-12-28 14:09:26 -08:00
Henrik Skupin 058d435289 Bug 1323770 - Moztest should forward correct test result. r=ahal
Registered callback handlers for tests should receive the correct
test status when the test has been finished, and not always "Error".

This change allows those callbacks to run specific code for individual
test results, eg. only do screenshots for failures.

MozReview-Commit-ID: FfbCRR0Jvjb

--HG--
extra : rebase_source : 98c69eea450f35312fd43bb7237a9d00e90636c4
2016-12-21 11:19:36 +01: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
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
Julien Pagès ae85f164f2 Bug 1065406 - [mozlog] Split test class and name for XUnit formatter. r=jgraham 2014-12-16 16:02:00 +01:00
Chris Manchester 10861ed968 Bug 1060523 - Omit extra newlines when logging exception messages in moztest. r=jgraham 2014-08-29 14:43:28 -04:00
Chris Manchester c5d1c08f0e Bug 1056931 - Release a new moztest to pick up stack logging.;r=jgraham 2014-08-21 17:50:54 -04:00
Chris Manchester 6dcbff056e Bug 1055679 - Log stacks and messages separately in moztest's unittest adapter and include stacks in mozlog's test_end.;r=jgraham 2014-08-19 17:22:53 -04:00
Chris Manchester 1c97de1410 Bug 1035006 - Fix pyflakes warnings in mozbase.;r=wlach 2014-07-07 14:51:34 -04:00
Chris Manchester b6d72ec019 Bug 1020625 - Don't call structured logging's suite_start and suite_end per test suite. r=jgraham 2014-06-09 12:01:26 -04:00
Andreas Tolfsen 293c846e46 Bug 1017675 - Bump moztest to version 0.5. r=jgraham
---
 testing/mozbase/moztest/setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
2014-05-29 18:08:31 +01:00
Andreas Tolfsen fb19815569 Bug 1017596 - Add suite_start and suite_end messages to moztest.adapters.unit. r=jgraham
This properly implements the structured logging protocol in the unittest
adapter.

The patch also adds an optional argument `test_list` to StructuredTestLogger
which will include an array of all tests when sending the suite_start message.
---
 testing/mozbase/moztest/moztest/adapters/unit.py | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)
2014-05-29 18:08:24 +01:00
Ryan VanderMeulen fc4c812999 Backed out changeset 3a9b6d6d9224 (bug 1017596) for making Mn more orange-prone. 2014-05-29 15:17:29 -04:00
Ryan VanderMeulen 54af07219d Backed out changeset c9f8e59a7e0d (bug 1017675) for making Mn more orange-prone. 2014-05-29 15:17:21 -04:00
Andreas Tolfsen 786bbc0a52 Bug 1017675 - Bump moztest to version 0.5. r=jgraham
---
 testing/mozbase/moztest/setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--HG--
extra : rebase_source : e27967cf955ca12fc884598507bf16d4d31bdf0b
2014-05-29 18:08:31 +01:00
Andreas Tolfsen adb410ad85 Bug 1017596 - Add suite_start and suite_end messages to moztest.adapters.unit. r=jgraham
This properly implements the structured logging protocol in the unittest
adapter.

The patch also adds an optional argument `test_list` to StructuredTestLogger
which will include an array of all tests when sending the suite_start message.
---
 testing/mozbase/moztest/moztest/adapters/unit.py | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

--HG--
extra : rebase_source : f8c9852485129bd034317c1b801a3f33a56162cf
2014-05-29 18:08:24 +01:00
James Graham 780dc709f1 Bug 1014593 - Update moztest version number to release latest changes, r=ahal 2014-05-22 15:41:13 +01:00
Andrew Halberstadt 2162ac0779 Bug 949600 - Sync mozbase to m-c one last time, r=wlach 2014-02-19 16:42:01 -05:00
Wes Kocher 572d78adfd Backed out changeset a7f8c25c07ac (bug 949600) for breaking clobber due to new update_permissions code, regardless of whether this is a CLOSED TREE. 2014-02-18 16:12:34 -08:00
Andrew Halberstadt 354168bb48 Bug 949600 - Sync mozbase to m-c one last time, r=wlach 2014-02-18 09:25:58 -05:00
Jonathan Griffin e89079d032 Bug 904682 - Mirror moztest to m-c. r=jhammel 2013-08-15 12:57:55 -04:00
Andrew Halberstadt bfcbe4015d Bug 895940 - Mirror mozbase to m-c, r=jhammel 2013-07-25 16:27:53 -04:00
Jeff Hammel 2fb3ca19f0 Bug 790018 - bump version of manifestdestiny and mirror to m-c;r=mcote 2012-09-11 19:46:39 -07:00
Jonathan Griffin d8e0dcfd02 Bug 788842 - Mirror mozbase to m-c, r=jhammel 2012-09-07 17:58:39 -07:00
Jonathan Griffin a83f8b8d14 backout 69243e829931 due to OSX 10.7 bustage 2012-09-07 17:05:26 -07:00
Jonathan Griffin 0435762ffe Bug 788842 - Mirror mozbase to m-c, r=jhammel 2012-09-07 15:39:17 -07:00