зеркало из https://github.com/mozilla/gecko-dev.git
Bug 928195 - Part 2: Provide a mach command to run WebIDL parser tests; r=bz
--HG-- extra : rebase_source : ff200d7a77532dae9e022d03cccc624ea1f77c63
This commit is contained in:
Родитель
604163999d
Коммит
58ddbab782
|
@ -35,6 +35,8 @@ SEARCH_PATHS = [
|
|||
'python/which',
|
||||
'build/pymake',
|
||||
'config',
|
||||
'dom/bindings',
|
||||
'dom/bindings/parser',
|
||||
'other-licenses/ply',
|
||||
'xpcom/idl-parser',
|
||||
'testing',
|
||||
|
@ -60,6 +62,7 @@ SEARCH_PATHS = [
|
|||
# Individual files providing mach commands.
|
||||
MACH_MODULES = [
|
||||
'addon-sdk/mach_commands.py',
|
||||
'dom/bindings/mach_commands.py',
|
||||
'layout/tools/reftest/mach_commands.py',
|
||||
'python/mach_commands.py',
|
||||
'python/mach/mach/commands/commandinfo.py',
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, # You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
from mach.decorators import (
|
||||
CommandArgument,
|
||||
CommandProvider,
|
||||
Command,
|
||||
)
|
||||
|
||||
from mozbuild.base import MachCommandBase
|
||||
|
||||
|
||||
@CommandProvider
|
||||
class WebIDLProvider(MachCommandBase):
|
||||
@Command('webidl-parser-test', category='testing',
|
||||
description='Run WebIDL tests.')
|
||||
@CommandArgument('--verbose', '-v', action='store_true',
|
||||
help='Run tests in verbose mode.')
|
||||
def webidl_test(self, verbose=False):
|
||||
sys.path.insert(0, os.path.join(self.topsrcdir, 'other-licenses',
|
||||
'ply'))
|
||||
|
||||
from runtests import run_tests
|
||||
return run_tests(None, verbose=verbose)
|
|
@ -65,10 +65,6 @@ check::
|
|||
PYTHONDONTWRITEBYTECODE=1 $(PYTHON) $(topsrcdir)/config/pythonpath.py \
|
||||
$(PLY_INCLUDE) $(srcdir)/../parser/runtests.py
|
||||
|
||||
check-interactive:
|
||||
PYTHONDONTWRITEBYTECODE=1 $(PYTHON) $(topsrcdir)/config/pythonpath.py \
|
||||
$(PLY_INCLUDE) $(srcdir)/../parser/runtests.py -q
|
||||
|
||||
# Since we define MOCHITEST_FILES, config/makefiles/mochitest.mk goes ahead and
|
||||
# sets up a rule with libs:: in itm which makes our .DEFAULT_TARGET be "libs".
|
||||
# Then ruls.mk does |.DEFAULT_TARGET ?= default| which leaves it as "libs". So
|
||||
|
|
Загрузка…
Ссылка в новой задаче