Commit Graph

4 Commits

Author SHA1 Message Date
Andrew Halberstadt
a74852785a 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
d3a120536c Bug 949600 - Sync mozbase to m-c one last time, r=wlach 2014-02-19 16:42:01 -05:00
Wes Kocher
8fd437b458 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
5e63bce1a7 Bug 949600 - Sync mozbase to m-c one last time, r=wlach 2014-02-18 09:25:58 -05:00