Commit Graph

40 Commits

Author SHA1 Message Date
Tooru Fujisawa
f79e505ab6 Bug 1221139 - Report actual exception string and traceback in ParseError. r=ahal 2015-11-07 20:45:07 +09:00
Chris Manchester
2dfde33479 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.
2015-10-16 15:31:20 -07:00
Chris Manchester
2cce58f476 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.
2015-10-16 15:31:20 -07:00
Julien Pagès
9a7605b346 Bug 980788 - [manifestparser] Add greater-than/less-than (equal) support. r=ahal 2015-07-15 04:42:00 -04:00
Andrew Halberstadt
11c45629b9 Bug 1182817 - [manifestparser] Fix exception in chunk_by_slice when there are two times more chunks than tests, r=chmanchester 2015-07-13 14:38:34 -04:00
Andrew Halberstadt
4cdea610f2 Bug 1171971 - Move test_paths argument out of mach and into mochitest; remove --test-path, r=chmanchester 2015-06-05 13:28:29 -04:00
Andrew Halberstadt
04b829111a Bug 1150497 - Make manifestparser tags whitespace (instead of comma) delimited to conform to other attributes, r=chmanchester 2015-04-02 09:50:30 -04:00
Andrew Halberstadt
ce3d9d78f3 Bug 1150050 - Bump manifestparser to v1.1 and marionette-client to v0.9.3 to pick up tagging feature, r=AutomatedTester 2015-04-01 11:22:48 -04:00
Andrew Halberstadt
be7dbc01a9 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.
2015-03-19 16:15:33 -04:00
Andrew Halberstadt
9826fc6cd8 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.
2015-03-26 15:21:45 -04:00
Ryan VanderMeulen
97dfa3b8cd Backed out changesets acbab9e22691 and 3c34fd480729 (bug 987360) for Android/B2G xpcshell bustage.
CLOSED TREE
2015-03-27 13:12:19 -04:00
Andrew Halberstadt
c14b32c6f1 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.
2015-03-19 16:15:33 -04:00
Andrew Halberstadt
03020c954b Bug 1131098 - Make mochitest use manifestparser's chunking algorithms and remove JS based ones, r=jmaher 2015-03-10 09:55:30 -04:00
Andrew Halberstadt
d9a14a4c35 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.
2015-03-05 09:12:55 -05:00
Ryan VanderMeulen
ca595f93e4 Backed out changeset 99c2fcc61cc2 (bug 958147) for B2G Desktop and Mulet checktest failures.
CLOSED TREE
2015-03-05 10:02:07 -05:00
Anish
887b353331 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
58e65f8d9e Backed out changeset b3fe7a6a4939 (bug 958147) for m4 test failures on a CLOSED TREE 2015-03-05 14:00:33 +01:00
Anish
8d1a140350 Bug 958147 - Remove run_if filter from manifestparser, r=ahal 2015-03-04 15:46:58 -05:00
Andrew Halberstadt
3fdd385841 Bug 1134395 - mozbuild should pass in rootdir to manifestparser to properly calculate test relpaths, r=gps 2015-02-18 17:07:55 -05:00
Anish
9b39f2745a 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
0c8a3e32f1 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
2015-02-13 16:23:45 -05:00
Andrew Halberstadt
0c069fd2ef 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)
2015-02-10 09:38:29 -05:00
Andrew Halberstadt
970f12f598 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.
2015-01-15 09:37:51 -05:00
Henrik Skupin
f7d6afcd3d Bug 1113284 - Bump manifestparser to 0.9. r=ahal
--HG--
extra : rebase_source : aaf0d817aab50e25a2f45c2f3c5e386c366ea056
2014-12-18 21:00:35 +01:00
Henrik Skupin
4e6cd3d36f 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
3ed78f4286 Bug 920938 - [manifestparser] handle symlinks in populate_directory and from directories; r=jmaher 2014-12-05 09:59:00 +01:00
Pankaj Malhotra(:bitgeeky)
2f223621d1 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
1be8d0b401 Bug 1087711 - Bump manifestparser to 0.8, r=jmaher 2014-10-22 16:04:15 -07:00
Chris Manchester
ef1b74c2d5 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
Jonathan Griffin
c911a69ae6 Bug 1086678 - Provide a default value for subsuite, r=jmaher 2014-10-21 13:12:35 -07:00
Wes Kocher
c0a3376acf Backed out changeset 325d41a714e3 (bug 1086678) for bustage on a CLOSED TREE 2014-10-21 13:51:26 -07:00
Jonathan Griffin
2e646ce6bc Bug 1086678 - Provide a default value for subsuite, r=jmaher 2014-10-21 13:12:35 -07:00
Andrei Eftimie
c10be50a8c Bug 1056037 - Bump manifestparser version to 0.7. r=hskupin 2014-10-07 10:41:59 +02:00
Andrei Eftimie
76452a6326 Bug 1023790 - [manifestparser] Add support for parent link. r=hskupin, r=jmaher 2014-10-02 14:23:21 +02:00
Jonathan Griffin
825e6ee469 Bug 1061982 - manifestparser changes to support conditional subsuites, r=jmaher 2014-09-05 10:44:22 -07:00
Andrew Halberstadt
bbc3e1995a Bug 857966 - manifestparser should error on non-existent test when strict enabled, r=davehunt 2014-09-03 14:17:40 -04:00
Mike Hommey
9d7ad3c28e Bug 1041850 part 2 - Reuse the same re.Scanner instance when parsing different manifests. r=ted
Also cleanup the callbacks it uses.
2014-07-25 07:07:19 +09:00
Mike Hommey
836b09e29c Bug 1041850 part 1 - Cache condition resolution in TestManifest.filter. r=ted 2014-07-25 07:07:13 +09:00
Chris Manchester
7949602ce3 Bug 1035006 - Fix pyflakes warnings in mozbase.;r=wlach 2014-07-07 14:51:34 -04:00
William Lachance
3d9978680b Bug 984528 - Rename manifestdestiny -> manifestparser. r=ahal
--HG--
rename : testing/mozbase/docs/manifestdestiny.rst => testing/mozbase/docs/manifestparser.rst
rename : testing/mozbase/manifestdestiny/manifestparser/__init__.py => testing/mozbase/manifestparser/manifestparser/__init__.py
rename : testing/mozbase/manifestdestiny/manifestparser/manifestparser.py => testing/mozbase/manifestparser/manifestparser/manifestparser.py
rename : testing/mozbase/manifestdestiny/setup.py => testing/mozbase/manifestparser/setup.py
rename : testing/mozbase/manifestdestiny/tests/comment-example.ini => testing/mozbase/manifestparser/tests/comment-example.ini
rename : testing/mozbase/manifestdestiny/tests/default-skipif.ini => testing/mozbase/manifestparser/tests/default-skipif.ini
rename : testing/mozbase/manifestdestiny/tests/filter-example.ini => testing/mozbase/manifestparser/tests/filter-example.ini
rename : testing/mozbase/manifestdestiny/tests/fleem => testing/mozbase/manifestparser/tests/fleem
rename : testing/mozbase/manifestdestiny/tests/include-example.ini => testing/mozbase/manifestparser/tests/include-example.ini
rename : testing/mozbase/manifestdestiny/tests/include/bar.ini => testing/mozbase/manifestparser/tests/include/bar.ini
rename : testing/mozbase/manifestdestiny/tests/include/crash-handling => testing/mozbase/manifestparser/tests/include/crash-handling
rename : testing/mozbase/manifestdestiny/tests/include/flowers => testing/mozbase/manifestparser/tests/include/flowers
rename : testing/mozbase/manifestdestiny/tests/include/foo.ini => testing/mozbase/manifestparser/tests/include/foo.ini
rename : testing/mozbase/manifestdestiny/tests/just-defaults.ini => testing/mozbase/manifestparser/tests/just-defaults.ini
rename : testing/mozbase/manifestdestiny/tests/manifest.ini => testing/mozbase/manifestparser/tests/manifest.ini
rename : testing/mozbase/manifestdestiny/tests/mozmill-example.ini => testing/mozbase/manifestparser/tests/mozmill-example.ini
rename : testing/mozbase/manifestdestiny/tests/mozmill-restart-example.ini => testing/mozbase/manifestparser/tests/mozmill-restart-example.ini
rename : testing/mozbase/manifestdestiny/tests/no-tests.ini => testing/mozbase/manifestparser/tests/no-tests.ini
rename : testing/mozbase/manifestdestiny/tests/path-example.ini => testing/mozbase/manifestparser/tests/path-example.ini
rename : testing/mozbase/manifestdestiny/tests/relative-path.ini => testing/mozbase/manifestparser/tests/relative-path.ini
rename : testing/mozbase/manifestdestiny/tests/test_convert_directory.py => testing/mozbase/manifestparser/tests/test_convert_directory.py
rename : testing/mozbase/manifestdestiny/tests/test_convert_symlinks.py => testing/mozbase/manifestparser/tests/test_convert_symlinks.py
rename : testing/mozbase/manifestdestiny/tests/test_default_skipif.py => testing/mozbase/manifestparser/tests/test_default_skipif.py
rename : testing/mozbase/manifestdestiny/tests/test_expressionparser.py => testing/mozbase/manifestparser/tests/test_expressionparser.py
rename : testing/mozbase/manifestdestiny/tests/test_manifestparser.py => testing/mozbase/manifestparser/tests/test_manifestparser.py
rename : testing/mozbase/manifestdestiny/tests/test_read_ini.py => testing/mozbase/manifestparser/tests/test_read_ini.py
rename : testing/mozbase/manifestdestiny/tests/test_testmanifest.py => testing/mozbase/manifestparser/tests/test_testmanifest.py
rename : testing/mozbase/manifestdestiny/tests/verifyDirectory/subdir/manifest.ini => testing/mozbase/manifestparser/tests/verifyDirectory/subdir/manifest.ini
rename : testing/mozbase/manifestdestiny/tests/verifyDirectory/subdir/test_sub.js => testing/mozbase/manifestparser/tests/verifyDirectory/subdir/test_sub.js
rename : testing/mozbase/manifestdestiny/tests/verifyDirectory/test_1.js => testing/mozbase/manifestparser/tests/verifyDirectory/test_1.js
rename : testing/mozbase/manifestdestiny/tests/verifyDirectory/test_2.js => testing/mozbase/manifestparser/tests/verifyDirectory/test_2.js
rename : testing/mozbase/manifestdestiny/tests/verifyDirectory/test_3.js => testing/mozbase/manifestparser/tests/verifyDirectory/test_3.js
rename : testing/mozbase/manifestdestiny/tests/verifyDirectory/verifyDirectory.ini => testing/mozbase/manifestparser/tests/verifyDirectory/verifyDirectory.ini
rename : testing/mozbase/manifestdestiny/tests/verifyDirectory/verifyDirectory_incomplete.ini => testing/mozbase/manifestparser/tests/verifyDirectory/verifyDirectory_incomplete.ini
rename : testing/mozbase/manifestdestiny/tests/verifyDirectory/verifyDirectory_toocomplete.ini => testing/mozbase/manifestparser/tests/verifyDirectory/verifyDirectory_toocomplete.ini
2014-06-10 13:20:23 -04:00