tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 3faf9382e4406717c756c6fcdf19474f21511e35
parent 5f1b357d53ebc9b81082f347e69af664a4508b2a
Author: Sandor Molnar <smolnar@mozilla.com>
Date:   Mon,  8 Dec 2025 17:23:29 +0200

Revert "Bug 988938 - Replace toolkit/components/telemetry/Makefile.in by moz.build (s) r=glandium,toolkit-telemetry-reviewers" for causing xpc failures @ test_TelemetryEnvironment.js

This reverts commit 95115ae3f21054f91f7a20ffd6fe776a286499c3.

Diffstat:
Mconfig/rules.mk | 4----
Mpython/mozbuild/mozbuild/backend/recursivemake.py | 2--
Mpython/mozbuild/mozbuild/frontend/context.py | 8--------
Mpython/mozbuild/mozbuild/frontend/emitter.py | 4----
Atoolkit/components/telemetry/Makefile.in | 11+++++++++++
Dtoolkit/components/telemetry/tests/addons/long-fields/moz.build | 8--------
Dtoolkit/components/telemetry/tests/addons/restartless/moz.build | 8--------
Dtoolkit/components/telemetry/tests/addons/system/moz.build | 8--------
Mtoolkit/components/telemetry/tests/moz.build | 6------
9 files changed, 11 insertions(+), 48 deletions(-)

diff --git a/config/rules.mk b/config/rules.mk @@ -901,15 +901,11 @@ $(4):: $$(abspath $(3))/$(1).xpi endef -ifdef XPI_TESTDIR -$(eval $(call xpi_package_rule,$(notdir $(CURDIR)),$(CURDIR),$(XPI_TESTDIR),misc)) -else # When you move this out of the tools tier, please remove the corresponding # hacks in recursivemake.py that check if Makefile.in sets the variable. ifdef XPI_PKGNAME $(eval $(call xpi_package_rule,$(XPI_PKGNAME),$(FINAL_TARGET),$(FINAL_TARGET)/..,tools realchrome)) endif -endif ############################################################################# # MDDEPDIR is the subdirectory where all the dependency files are placed. diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py @@ -528,8 +528,6 @@ class RecursiveMakeBackend(MakeBackend): # skipped and must run during the 'tools' tier. if "XPI_PKGNAME" in obj.variables: self._no_skip["tools"].add(backend_file.relobjdir) - if "XPI_TESTDIR" in obj.variables: - self._no_skip["misc"].add(backend_file.relobjdir) elif isinstance(obj, HostDefines): self._process_defines(obj, backend_file, which="HOST_DEFINES") diff --git a/python/mozbuild/mozbuild/frontend/context.py b/python/mozbuild/mozbuild/frontend/context.py @@ -2318,14 +2318,6 @@ VARIABLES = { Override the name of the package generated for an XPI extension. """, ), - "XPI_TESTDIR": ( - ObjDirPath, - str, - """The name of the directory where the associated test XPI package must be generated. - - XPI_PKGNAME must be set for this variable to matter. - """, - ), "DIST_SUBDIR": ( str, str, diff --git a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbuild/frontend/emitter.py @@ -1249,15 +1249,11 @@ class TreeMetadataEmitter(LoggingMixin): "USE_EXTENSION_MANIFEST", "WASM_LIBS", "XPI_PKGNAME", - "XPI_TESTDIR", ] for v in varlist: if v in context and context[v]: passthru.variables[v] = context[v] - if "XPI_TESTDIR" in context and "XPI_PKGNAME" not in context: - raise SandboxValidationError("XPI_TESTDIR set but XPI_PKGNAME not set") - if ( context.config.substs.get("OS_TARGET") == "WINNT" and context["DELAYLOAD_DLLS"] diff --git a/toolkit/components/telemetry/Makefile.in b/toolkit/components/telemetry/Makefile.in @@ -0,0 +1,11 @@ +# +# 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/. + +include $(topsrcdir)/config/rules.mk + +# This is so hacky. Waiting on bug 988938. +addondir = $(srcdir)/tests/addons +testdir = $(topobjdir)/_tests/xpcshell/toolkit/components/telemetry/tests/unit +$(foreach dir,$(wildcard $(addondir)/*),$(eval $(call xpi_package_rule,$(notdir $(dir)),$(dir),$(testdir),misc))) diff --git a/toolkit/components/telemetry/tests/addons/long-fields/moz.build b/toolkit/components/telemetry/tests/addons/long-fields/moz.build @@ -1,8 +0,0 @@ -# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- -# vim: set filetype=python: -# 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/. - -XPI_PKGNAME = "long-fields" -XPI_TESTDIR = "!/_tests/xpcshell/toolkit/components/telemetry/tests/unit" diff --git a/toolkit/components/telemetry/tests/addons/restartless/moz.build b/toolkit/components/telemetry/tests/addons/restartless/moz.build @@ -1,8 +0,0 @@ -# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- -# vim: set filetype=python: -# 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/. - -XPI_PKGNAME = "restartless" -XPI_TESTDIR = "!/_tests/xpcshell/toolkit/components/telemetry/tests/unit" diff --git a/toolkit/components/telemetry/tests/addons/system/moz.build b/toolkit/components/telemetry/tests/addons/system/moz.build @@ -1,8 +0,0 @@ -# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- -# vim: set filetype=python: -# 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/. - -XPI_PKGNAME = "system" -XPI_TESTDIR = "!/_tests/xpcshell/toolkit/components/telemetry/tests/unit" diff --git a/toolkit/components/telemetry/tests/moz.build b/toolkit/components/telemetry/tests/moz.build @@ -18,12 +18,6 @@ TESTING_JS_MODULES += [ "utils/TelemetryTestUtils.sys.mjs", ] -TEST_DIRS += [ - "addons/long-fields", - "addons/restartless", - "addons/system", -] - if CONFIG["COMPILE_ENVIRONMENT"]: shared_library = "!%smodules-test%s" % (CONFIG["DLL_PREFIX"], CONFIG["DLL_SUFFIX"]) TEST_HARNESS_FILES.xpcshell.toolkit.components.telemetry.tests.unit += [