diff --git a/browser/Makefile.in b/browser/Makefile.in index 8b7dc07b28da..2eb9e708f68e 100644 --- a/browser/Makefile.in +++ b/browser/Makefile.in @@ -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 diff --git a/build/moz.build b/build/moz.build index 412df22299de..9a399ca7404b 100644 --- a/build/moz.build +++ b/build/moz.build @@ -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', + ] diff --git a/config/Makefile.in b/config/Makefile.in index c593a7d586e8..a42055eeeba0 100644 --- a/config/Makefile.in +++ b/config/Makefile.in @@ -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 diff --git a/config/config.mk b/config/config.mk index 3e8edf43ba68..6ef47ab37007 100644 --- a/config/config.mk +++ b/config/config.mk @@ -65,6 +65,7 @@ _MOZBUILD_EXTERNAL_VARIABLES := \ NO_DIST_INSTALL \ PARALLEL_DIRS \ PROGRAM \ + PYTHON_UNIT_TESTS \ RESOURCE_FILES \ SDK_HEADERS \ SDK_LIBRARY \ diff --git a/config/moz.build b/config/moz.build index 04dd19e5c5fb..d355cb5e79e2 100644 --- a/config/moz.build +++ b/config/moz.build @@ -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', +] diff --git a/dom/bindings/Makefile.in b/dom/bindings/Makefile.in index 12d5d4affa10..0a728f9f3669 100644 --- a/dom/bindings/Makefile.in +++ b/dom/bindings/Makefile.in @@ -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 diff --git a/dom/bindings/moz.build b/dom/bindings/moz.build index 3a286f079eea..874903c977ad 100644 --- a/dom/bindings/moz.build +++ b/dom/bindings/moz.build @@ -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', +] diff --git a/python/Makefile.in b/python/Makefile.in deleted file mode 100644 index 1ac2776e46a9..000000000000 --- a/python/Makefile.in +++ /dev/null @@ -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)) diff --git a/python/moz.build b/python/moz.build index a55d55e9568f..72b21bea6cd1 100644 --- a/python/moz.build +++ b/python/moz.build @@ -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', +] diff --git a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbuild/frontend/emitter.py index cf410c95627f..8d83cfddedb6 100644 --- a/python/mozbuild/mozbuild/frontend/emitter.py +++ b/python/mozbuild/mozbuild/frontend/emitter.py @@ -385,6 +385,7 @@ class TreeMetadataEmitter(LoggingMixin): 'MSVC_ENABLE_PGO', 'NO_DIST_INSTALL', 'OS_LIBS', + 'PYTHON_UNIT_TESTS', 'RCFILE', 'RESFILE', 'RCINCLUDE', diff --git a/python/mozbuild/mozbuild/frontend/sandbox_symbols.py b/python/mozbuild/mozbuild/frontend/sandbox_symbols.py index 94706dba174e..a2457e80fd40 100644 --- a/python/mozbuild/mozbuild/frontend/sandbox_symbols.py +++ b/python/mozbuild/mozbuild/frontend/sandbox_symbols.py @@ -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'), diff --git a/testing/mozbase/Makefile.in b/testing/mozbase/Makefile.in index 7d12e0139870..db25ca1a7194 100644 --- a/testing/mozbase/Makefile.in +++ b/testing/mozbase/Makefile.in @@ -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 diff --git a/testing/mozbase/moz.build b/testing/mozbase/moz.build index 895d11993cfb..34d90e79cef5 100644 --- a/testing/mozbase/moz.build +++ b/testing/mozbase/moz.build @@ -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', +] diff --git a/testing/xpcshell/Makefile.in b/testing/xpcshell/Makefile.in index 081eb21f8777..4d11c1daa9d5 100644 --- a/testing/xpcshell/Makefile.in +++ b/testing/xpcshell/Makefile.in @@ -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 diff --git a/testing/xpcshell/moz.build b/testing/xpcshell/moz.build index d63be6e8d971..aeaedbc4dd45 100644 --- a/testing/xpcshell/moz.build +++ b/testing/xpcshell/moz.build @@ -6,3 +6,6 @@ TEST_DIRS += ['example'] +PYTHON_UNIT_TESTS += [ + 'selftest.py', +] diff --git a/xpcom/typelib/xpt/tools/Makefile.in b/xpcom/typelib/xpt/tools/Makefile.in index fe12f952c3a4..e7cacf3dc6a1 100644 --- a/xpcom/typelib/xpt/tools/Makefile.in +++ b/xpcom/typelib/xpt/tools/Makefile.in @@ -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 diff --git a/xpcom/typelib/xpt/tools/moz.build b/xpcom/typelib/xpt/tools/moz.build index 895d11993cfb..0905d78f5894 100644 --- a/xpcom/typelib/xpt/tools/moz.build +++ b/xpcom/typelib/xpt/tools/moz.build @@ -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', +]