tor-browser

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

commit 54e289c8586c364063e6bfdcdd6026218dd9f865
parent cbd5e15e6e42b64510a0f713993e32b54a2d3657
Author: serge-sans-paille <sguelton@mozilla.com>
Date:   Tue, 14 Oct 2025 08:52:36 +0000

Bug 1981974 - move ipdl checks from Makefile.in to moz.build r=glandium

Differential Revision: https://phabricator.services.mozilla.com/D260442

Diffstat:
Dipc/ipdl/test/ipdl/Makefile.in | 17-----------------
Mipc/ipdl/test/ipdl/moz.build | 20++++++++++++++++++++
Mipc/ipdl/test/ipdl/runtests.py | 11+++++++----
Mpython/mozbuild/mozbuild/test/test_legacy_test.py | 4+++-
4 files changed, 30 insertions(+), 22 deletions(-)

diff --git a/ipc/ipdl/test/ipdl/Makefile.in b/ipc/ipdl/test/ipdl/Makefile.in @@ -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/. - -include $(topsrcdir)/config/rules.mk - -OKTESTS := $(wildcard $(srcdir)/ok/*.ipdl) $(wildcard $(srcdir)/ok/*.ipdlh) -ERRORTESTS := $(wildcard $(srcdir)/error/*.ipdl) $(wildcard $(srcdir)/error/*.ipdlh) - -check:: - @$(PYTHON3) $(srcdir)/runtests.py \ - $(srcdir)/ok $(srcdir)/error \ - $(PYTHON3) $(topsrcdir)/ipc/ipdl/ipdl.py \ - --sync-msg-list=$(srcdir)/sync-messages.ini \ - --msg-metadata=$(srcdir)/message-metadata.ini \ - OKTESTS $(OKTESTS) \ - ERRORTESTS $(ERRORTESTS) diff --git a/ipc/ipdl/test/ipdl/moz.build b/ipc/ipdl/test/ipdl/moz.build @@ -6,3 +6,23 @@ # Copy test files so that they can be referenced in the docs. SPHINX_TREES["/ipc/_static"] = "ok" + +oktests = [f"ok/*.ipdl", f"ok/*.ipdlh"] +errortests = [f"error/*.ipdl", f"error/*.ipdlh"] + +LegacyTest( + f"%{CONFIG['PYTHON3']}", + "runtests.py", + "ok", + "error", + f"%{CONFIG['PYTHON3']}", + "/ipc/ipdl/ipdl.py", + "--sync-msg-list", + "sync-messages.ini", + "--msg-metadata", + "message-metadata.ini", + "--ok-tests", + *oktests, + "--error-tests", + *errortests, +) diff --git a/ipc/ipdl/test/ipdl/runtests.py b/ipc/ipdl/test/ipdl/runtests.py @@ -1,3 +1,4 @@ +import glob import os import unittest @@ -101,14 +102,16 @@ if __name__ == "__main__": # The extra subdirectory is used for non-failing files we want # to include from failing files. errorIncludes = ["-I", os.path.join(errordir, "extra"), "-I", errordir] - errorsuite.addTest(ErrorTestCase(ipdlargv + errorIncludes, arg)) + for test in glob.glob(arg): + errorsuite.addTest(ErrorTestCase(ipdlargv + errorIncludes, test)) elif oktests: - if "ERRORTESTS" == arg: + if "--error-tests" == arg: errortests = True continue - oksuite.addTest(OkTestCase(ipdlargv + ["-I", okdir], arg)) + for test in glob.glob(arg): + oksuite.addTest(OkTestCase(ipdlargv + ["-I", okdir], test)) else: - if "OKTESTS" == arg: + if "--ok-tests" == arg: oktests = True continue ipdlargv.append(arg) diff --git a/python/mozbuild/mozbuild/test/test_legacy_test.py b/python/mozbuild/mozbuild/test/test_legacy_test.py @@ -8,7 +8,9 @@ import mozversioncontrol # List of moz.build that currently hold a LegacyTest # *Don't touch that dial!* -allowlist = {} +allowlist = { + "ipc/ipdl/test/ipdl/moz.build", +} def test_extra_legacy_tests():