Commit 795f995e authored by Mike Shal's avatar Mike Shal
Browse files

Bug 1335796 - Move WebIDL parser tests out of 'make check'; r=dustin,Ms2ger

This test suite involves a bunch of python tests which don't require
configure or any generated binaries to run. We can split them out into a
Taskcluster linter type task to run directly on the source tree in
parallel with builds.

MozReview-Commit-ID: 9ux3rAuFXAY

--HG--
extra : rebase_source : 95378cd686644e34ea017c682d7384906b17d13a
parent 9e4e4813
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ from mach.decorators import (
)

from mozbuild.base import MachCommandBase
from mozbuild.util import mkdir

def get_test_parser():
    import runtests
@@ -38,6 +39,10 @@ class WebIDLProvider(MachCommandBase):
        sys.path.insert(0, os.path.join(self.topsrcdir, 'other-licenses',
                        'ply'))

        # Ensure the topobjdir exists. On a Taskcluster test run there won't be
        # an objdir yet.
        mkdir(self.topobjdir)

        # Make sure we drop our cached grammar bits in the objdir, not
        # wherever we happen to be running from.
        os.chdir(self.topobjdir)
+7 −1
Original line number Diff line number Diff line
@@ -88,6 +88,7 @@ def run_tests(tests, verbose):
            print '%s:' % test
            for failure in failures:
                print 'TEST-UNEXPECTED-FAIL | %s' % failure
    return 1 if failed_tests else 0

def get_parser():
    usage = """%(prog)s [OPTIONS] [TESTS]
@@ -105,4 +106,9 @@ if __name__ == '__main__':
    args = parser.parse_args()
    if args.verbose is None:
        args.verbose = True
    run_tests(args.tests, verbose=args.verbose)

    # Make sure the current directory is in the python path so we can cache the
    # result of the webidlyacc.py generation.
    sys.path.append('.')

    sys.exit(run_tests(args.tests, verbose=args.verbose))
+0 −4
Original line number Diff line number Diff line
@@ -15,7 +15,3 @@ CPPSRCS += $(addprefix ../,$(test_sources))
include $(topsrcdir)/config/rules.mk

endif

check::
	PYTHONDONTWRITEBYTECODE=1 $(PYTHON) $(topsrcdir)/config/pythonpath.py \
	  $(PLY_INCLUDE) $(srcdir)/../parser/runtests.py
+1 −0
Original line number Diff line number Diff line
@@ -13,3 +13,4 @@ jobs-from:
    - python-tests.yml
    - mozlint.yml
    - doc.yml
    - webidl.yml
+24 −0
Original line number Diff line number Diff line
webidl-test/opt:
    description: WebIDL parser tests
    treeherder:
        symbol: Wp
        kind: test
        tier: 1
        platform: lint/opt
    worker-type: aws-provisioner-v1/b2gtest
    worker:
        implementation: docker-worker
        docker-image: {in-tree: "lint"}
        max-run-time: 1800
    run:
        using: mach
        mach: webidl-parser-test --verbose
    run-on-projects:
        - integration
        - release
    when:
        files-changed:
            - 'dom/bindings/parser/runtests.py'
            - 'dom/bindings/parser/WebIDL.py'
            - 'dom/bindings/parser/tests/**'
            - 'other-licenses/ply/**'