Bug 1044657 - Move PYTHON_UNIT_TESTS to moz.build; r=mshal

As a first step, this moves PYTHON_UNIT_TESTS to moz.build as a passthru
variable. In the future, we could hook it up to |mach test|.

The __init__.py files may not need to be in the list, but I don't want to
change the list here.
This commit is contained in:
Ms2ger 2014-07-28 17:51:12 +02:00
Родитель 082f87e1b6
Коммит 33f3b92033
17 изменённых файлов: 87 добавлений и 35 удалений

Просмотреть файл

@ -14,6 +14,3 @@ ifdef MOZ_MAINTENANCE_SERVICE
$(MAKE) -C installer/windows maintenanceservice_installer
endif
endif
check::
$(PYTHON) $(topsrcdir)/build/compare-mozconfig/compare-mozconfigs-wrapper.py

Просмотреть файл

@ -44,3 +44,7 @@ for var in ('MOZ_CRASHREPORTER', 'MOZ_PROFILE_MIGRATOR',
if CONFIG[var]:
DEFINES[var] = True
if CONFIG['MOZ_BUILD_APP'] == 'browser':
PYTHON_UNIT_TESTS += [
'compare-mozconfig/compare-mozconfigs-wrapper.py',
]

Просмотреть файл

@ -39,8 +39,6 @@ HEADERS_TARGET := export
INSTALL_TARGETS += HEADERS
endif
PYTHON_UNIT_TESTS := $(wildcard $(srcdir)/tests/unit-*.py)
include $(topsrcdir)/config/rules.mk
HOST_CFLAGS += -DUNICODE -D_UNICODE

Просмотреть файл

@ -65,6 +65,7 @@ _MOZBUILD_EXTERNAL_VARIABLES := \
NO_DIST_INSTALL \
PARALLEL_DIRS \
PROGRAM \
PYTHON_UNIT_TESTS \
RESOURCE_FILES \
SDK_HEADERS \
SDK_LIBRARY \

Просмотреть файл

@ -28,3 +28,10 @@ if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
if CONFIG['MOZ_SHARED_ICU']:
DEFINES['MOZ_SHARED_ICU'] = True
PYTHON_UNIT_TESTS += [
'tests/unit-expandlibs.py',
'tests/unit-mozunit.py',
'tests/unit-nsinstall.py',
'tests/unit-printprereleasesuffix.py',
]

Просмотреть файл

@ -24,8 +24,6 @@ CPPSRCS += $(globalgen_sources) $(unified_binding_cpp_files)
# Bug 932092 tracks.
LOCAL_INCLUDES += -I$(DIST)/include/mozilla/dom
PYTHON_UNIT_TESTS += $(srcdir)/mozwebidlcodegen/test/test_mozwebidlcodegen.py
include $(topsrcdir)/config/rules.mk
# TODO This list should be emitted to a .pp file via

Просмотреть файл

@ -96,3 +96,7 @@ SPHINX_PYTHON_PACKAGE_DIRS += ['mozwebidlcodegen']
if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/android', 'xulrunner']:
# This is needed for Window.webidl
DEFINES['HAVE_SIDEBAR'] = True
PYTHON_UNIT_TESTS += [
'mozwebidlcodegen/test/test_mozwebidlcodegen.py',
]

Просмотреть файл

@ -1,17 +0,0 @@
# 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/.
test_dirs := \
mach/mach/test \
mozbuild/mozbuild/test \
mozbuild/mozbuild/test/action \
mozbuild/mozbuild/test/backend \
mozbuild/mozbuild/test/controller \
mozbuild/mozbuild/test/compilation \
mozbuild/mozbuild/test/frontend \
mozbuild/mozpack/test \
mozbuild/dumbmake/test \
$(NULL)
PYTHON_UNIT_TESTS := $(foreach dir,$(test_dirs),$(wildcard $(srcdir)/$(dir)/*.py))

Просмотреть файл

@ -10,3 +10,60 @@ SPHINX_PYTHON_PACKAGE_DIRS += [
'mozbuild/mozpack',
'mozversioncontrol/mozversioncontrol',
]
PYTHON_UNIT_TESTS += [
'mach/mach/test/__init__.py',
'mach/mach/test/common.py',
'mach/mach/test/test_conditions.py',
'mach/mach/test/test_config.py',
'mach/mach/test/test_entry_point.py',
'mach/mach/test/test_error_output.py',
'mach/mach/test/test_logger.py',
'mozbuild/dumbmake/test/__init__.py',
'mozbuild/dumbmake/test/test_dumbmake.py',
'mozbuild/mozbuild/test/__init__.py',
'mozbuild/mozbuild/test/action/test_buildlist.py',
'mozbuild/mozbuild/test/backend/__init__.py',
'mozbuild/mozbuild/test/backend/common.py',
'mozbuild/mozbuild/test/backend/test_android_eclipse.py',
'mozbuild/mozbuild/test/backend/test_configenvironment.py',
'mozbuild/mozbuild/test/backend/test_recursivemake.py',
'mozbuild/mozbuild/test/backend/test_visualstudio.py',
'mozbuild/mozbuild/test/common.py',
'mozbuild/mozbuild/test/compilation/__init__.py',
'mozbuild/mozbuild/test/compilation/test_warnings.py',
'mozbuild/mozbuild/test/controller/__init__.py',
'mozbuild/mozbuild/test/controller/test_clobber.py',
'mozbuild/mozbuild/test/frontend/__init__.py',
'mozbuild/mozbuild/test/frontend/test_emitter.py',
'mozbuild/mozbuild/test/frontend/test_namespaces.py',
'mozbuild/mozbuild/test/frontend/test_reader.py',
'mozbuild/mozbuild/test/frontend/test_sandbox.py',
'mozbuild/mozbuild/test/frontend/test_sandbox_symbols.py',
'mozbuild/mozbuild/test/test_base.py',
'mozbuild/mozbuild/test/test_containers.py',
'mozbuild/mozbuild/test/test_expression.py',
'mozbuild/mozbuild/test/test_jarmaker.py',
'mozbuild/mozbuild/test/test_line_endings.py',
'mozbuild/mozbuild/test/test_link_deps.py',
'mozbuild/mozbuild/test/test_makeutil.py',
'mozbuild/mozbuild/test/test_mozconfig.py',
'mozbuild/mozbuild/test/test_mozinfo.py',
'mozbuild/mozbuild/test/test_preprocessor.py',
'mozbuild/mozbuild/test/test_pythonutil.py',
'mozbuild/mozbuild/test/test_testing.py',
'mozbuild/mozbuild/test/test_util.py',
'mozbuild/mozpack/test/__init__.py',
'mozbuild/mozpack/test/test_chrome_flags.py',
'mozbuild/mozpack/test/test_chrome_manifest.py',
'mozbuild/mozpack/test/test_copier.py',
'mozbuild/mozpack/test/test_errors.py',
'mozbuild/mozpack/test/test_files.py',
'mozbuild/mozpack/test/test_manifests.py',
'mozbuild/mozpack/test/test_mozjar.py',
'mozbuild/mozpack/test/test_packager.py',
'mozbuild/mozpack/test/test_packager_formats.py',
'mozbuild/mozpack/test/test_packager_l10n.py',
'mozbuild/mozpack/test/test_path.py',
'mozbuild/mozpack/test/test_unify.py',
]

Просмотреть файл

@ -385,6 +385,7 @@ class TreeMetadataEmitter(LoggingMixin):
'MSVC_ENABLE_PGO',
'NO_DIST_INSTALL',
'OS_LIBS',
'PYTHON_UNIT_TESTS',
'RCFILE',
'RESFILE',
'RCINCLUDE',

Просмотреть файл

@ -289,6 +289,10 @@ VARIABLES = {
likely go away.
""", None),
'PYTHON_UNIT_TESTS': (StrictOrderingOnAppendList, list,
"""A list of python unit tests.
""", None),
'HOST_LIBRARY_NAME': (unicode, unicode,
"""Name of target library generated when cross compiling.
""", 'binaries'),

Просмотреть файл

@ -2,10 +2,6 @@
# 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/.
PYTHON_UNIT_TESTS := \
test.py \
$(NULL)
include $(topsrcdir)/config/rules.mk
# Harness packages from the srcdir

Просмотреть файл

@ -4,3 +4,6 @@
# 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/.
PYTHON_UNIT_TESTS += [
'test.py',
]

Просмотреть файл

@ -3,11 +3,6 @@
# 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/.
# Run selftests
PYTHON_UNIT_TESTS := \
selftest.py
$(NULL)
include $(topsrcdir)/config/rules.mk
# Harness files from the srcdir

Просмотреть файл

@ -6,3 +6,6 @@
TEST_DIRS += ['example']
PYTHON_UNIT_TESTS += [
'selftest.py',
]

Просмотреть файл

@ -11,5 +11,3 @@ XPT_TOOL_FILES := xpt.py
XPT_TOOL_DEST = $(SDK_BIN_DIR)
XPT_TOOL_TARGET := export
INSTALL_TARGETS += XPT_TOOL
PYTHON_UNIT_TESTS := runtests.py

Просмотреть файл

@ -4,3 +4,6 @@
# 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/.
PYTHON_UNIT_TESTS += [
'runtests.py',
]