From 43a97878ce14b72f0981164f87f2e35e14151312 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:22:09 +0200 Subject: Adding upstream version 110.0.1. Signed-off-by: Daniel Baumann --- python/README | 16 + python/docs/index.rst | 228 + python/gdbpp/gdbpp/__init__.py | 31 + python/gdbpp/gdbpp/enumset.py | 30 + python/gdbpp/gdbpp/linkedlist.py | 48 + python/gdbpp/gdbpp/owningthread.py | 25 + python/gdbpp/gdbpp/smartptr.py | 60 + python/gdbpp/gdbpp/string.py | 21 + python/gdbpp/gdbpp/tarray.py | 29 + python/gdbpp/gdbpp/thashtable.py | 151 + python/l10n/fluent_migrations/__init__.py | 0 .../fluent_migrations/bug_1347955_aboutLogging.py | 35 + .../bug_1552333_aboutCertError.py | 40 + .../bug_1577257_profiler_title.py | 22 + .../bug_1635548_browser_context.py | 82 + .../fluent_migrations/bug_1760029_tabbrowser.py | 399 ++ .../bug_1780585_pipFocusedstate.py | 54 + .../bug_1786186_mobile_aboutConfig.py | 65 + .../bug_1790387_featureCallout_a11y.py | 22 + .../fluent_migrations/bug_1791178_downloadUI.py | 187 + .../fluent_migrations/bug_1791178_downloadUtils.py | 172 + .../bug_1791178_nsContextMenu_saveHelper.py | 39 + .../l10n/fluent_migrations/bug_1793572_webrtc.py | 771 +++ .../bug_1801035_places_window_no_size.py | 21 + .../bug_1801915_confirmationHints.py | 29 + .../bug_1802128_langpack_defines.py | 43 + .../fluent_migrations/bug_1803010_downloads.py | 30 + .../bug_1805319_webrtc_indicator_typo.py | 23 + python/l10n/mozxchannel/__init__.py | 150 + python/l10n/mozxchannel/projectconfig.py | 77 + python/l10n/mozxchannel/source.py | 84 + python/l10n/test_fluent_migrations/__init__.py | 0 python/l10n/test_fluent_migrations/fmt.py | 188 + python/lldbutils/.isort.cfg | 3 + python/lldbutils/README.txt | 221 + python/lldbutils/lldbutils/__init__.py | 17 + python/lldbutils/lldbutils/content.py | 28 + python/lldbutils/lldbutils/general.py | 165 + python/lldbutils/lldbutils/gfx.py | 65 + python/lldbutils/lldbutils/layout.py | 46 + python/lldbutils/lldbutils/utils.py | 86 + python/mach/.isort.cfg | 3 + python/mach/README.rst | 13 + python/mach/bash-completion.sh | 18 + python/mach/docs/commands.rst | 129 + python/mach/docs/driver.rst | 32 + python/mach/docs/faq.rst | 152 + python/mach/docs/index.rst | 89 + python/mach/docs/logging.rst | 100 + python/mach/docs/metrics.md | 55 + python/mach/docs/settings.rst | 137 + python/mach/docs/telemetry.rst | 37 + python/mach/docs/usage.rst | 150 + .../docs/windows-usage-outside-mozillabuild.rst | 124 + python/mach/mach/__init__.py | 0 python/mach/mach/base.py | 73 + python/mach/mach/commands/__init__.py | 0 python/mach/mach/commands/commandinfo.py | 487 ++ .../commands/completion_templates/bash.template | 62 + .../commands/completion_templates/fish.template | 64 + .../commands/completion_templates/zsh.template | 62 + python/mach/mach/commands/settings.py | 50 + python/mach/mach/config.py | 415 ++ python/mach/mach/decorators.py | 334 ++ python/mach/mach/dispatcher.py | 516 ++ python/mach/mach/logging.py | 398 ++ python/mach/mach/main.py | 735 +++ python/mach/mach/mixin/__init__.py | 0 python/mach/mach/mixin/logging.py | 51 + python/mach/mach/mixin/process.py | 210 + python/mach/mach/python_lockfile.py | 79 + python/mach/mach/registrar.py | 186 + python/mach/mach/requirements.py | 183 + python/mach/mach/sentry.py | 222 + python/mach/mach/site.py | 1402 +++++ python/mach/mach/telemetry.py | 305 ++ python/mach/mach/telemetry_interface.py | 77 + python/mach/mach/terminal.py | 76 + python/mach/mach/test/__init__.py | 0 python/mach/mach/test/conftest.py | 84 + python/mach/mach/test/invoke_mach_command.py | 4 + python/mach/mach/test/providers/__init__.py | 0 python/mach/mach/test/providers/basic.py | 15 + python/mach/mach/test/providers/commands.py | 33 + python/mach/mach/test/providers/conditions.py | 55 + .../mach/mach/test/providers/conditions_invalid.py | 10 + python/mach/mach/test/providers/throw.py | 18 + python/mach/mach/test/providers/throw2.py | 15 + python/mach/mach/test/python.ini | 22 + python/mach/mach/test/script_site_activation.py | 67 + python/mach/mach/test/test_commands.py | 79 + python/mach/mach/test/test_conditions.py | 101 + python/mach/mach/test/test_config.py | 292 ++ python/mach/mach/test/test_decorators.py | 133 + python/mach/mach/test/test_dispatcher.py | 60 + python/mach/mach/test/test_entry_point.py | 59 + python/mach/mach/test/test_error_output.py | 29 + python/mach/mach/test/test_logger.py | 48 + python/mach/mach/test/test_mach.py | 31 + python/mach/mach/test/test_site.py | 56 + python/mach/mach/test/test_site_activation.py | 463 ++ python/mach/mach/test/test_site_compatibility.py | 189 + python/mach/mach/test/zero_microseconds.py | 12 + python/mach/mach/util.py | 110 + python/mach/metrics.yaml | 206 + python/mach/pings.yaml | 22 + python/mach/setup.cfg | 2 + python/mach/setup.py | 40 + python/mach_commands.py | 366 ++ python/moz.build | 78 + python/mozboot/.isort.cfg | 3 + python/mozboot/README.rst | 20 + python/mozboot/bin/bootstrap.py | 439 ++ python/mozboot/mozboot/__init__.py | 0 python/mozboot/mozboot/android-avds/arm.json | 26 + python/mozboot/mozboot/android-avds/arm64.json | 27 + python/mozboot/mozboot/android-avds/x86_64.json | 26 + .../mozboot/mozboot/android-emulator-packages.txt | 2 + python/mozboot/mozboot/android-packages.txt | 4 + .../mozboot/android-system-images-packages.txt | 1 + python/mozboot/mozboot/android.py | 891 ++++ python/mozboot/mozboot/archlinux.py | 33 + python/mozboot/mozboot/base.py | 741 +++ python/mozboot/mozboot/bootstrap.py | 765 +++ python/mozboot/mozboot/centosfedora.py | 80 + python/mozboot/mozboot/debian.py | 83 + python/mozboot/mozboot/freebsd.py | 74 + python/mozboot/mozboot/gentoo.py | 29 + python/mozboot/mozboot/linux_common.py | 113 + python/mozboot/mozboot/mach_commands.py | 111 + python/mozboot/mozboot/mozconfig.py | 156 + python/mozboot/mozboot/mozillabuild.py | 240 + python/mozboot/mozboot/openbsd.py | 38 + python/mozboot/mozboot/opensuse.py | 63 + python/mozboot/mozboot/osx.py | 324 ++ python/mozboot/mozboot/rust.py | 185 + python/mozboot/mozboot/sccache.py | 9 + python/mozboot/mozboot/solus.py | 32 + python/mozboot/mozboot/static_analysis.py | 8 + python/mozboot/mozboot/test/python.ini | 4 + python/mozboot/mozboot/test/test_mozconfig.py | 229 + python/mozboot/mozboot/util.py | 48 + python/mozboot/mozboot/void.py | 41 + python/mozboot/mozboot/windows.py | 132 + python/mozboot/setup.py | 16 + python/mozbuild/.isort.cfg | 3 + python/mozbuild/metrics.yaml | 140 + python/mozbuild/mozbuild/__init__.py | 0 python/mozbuild/mozbuild/action/__init__.py | 0 python/mozbuild/mozbuild/action/buildlist.py | 49 + python/mozbuild/mozbuild/action/check_binary.py | 343 ++ .../mozbuild/action/download_wpt_manifest.py | 21 + python/mozbuild/mozbuild/action/dump_env.py | 30 + python/mozbuild/mozbuild/action/dumpsymbols.py | 109 + python/mozbuild/mozbuild/action/exe_7z_archive.py | 89 + python/mozbuild/mozbuild/action/fat_aar.py | 185 + python/mozbuild/mozbuild/action/file_generate.py | 155 + .../mozbuild/action/generate_symbols_file.py | 95 + .../mozbuild/action/html_fragment_preprocesor.py | 101 + python/mozbuild/mozbuild/action/install.py | 22 + python/mozbuild/mozbuild/action/jar_maker.py | 16 + python/mozbuild/mozbuild/action/l10n_merge.py | 42 + .../mozbuild/action/langpack_localeNames.json | 422 ++ .../mozbuild/mozbuild/action/langpack_manifest.py | 556 ++ python/mozbuild/mozbuild/action/make_dmg.py | 67 + python/mozbuild/mozbuild/action/make_unzip.py | 25 + python/mozbuild/mozbuild/action/node.py | 137 + .../mozbuild/action/package_generated_sources.py | 42 + python/mozbuild/mozbuild/action/preprocessor.py | 24 + .../mozbuild/action/process_define_files.py | 114 + .../mozbuild/action/process_install_manifest.py | 125 + python/mozbuild/mozbuild/action/symbols_archive.py | 89 + python/mozbuild/mozbuild/action/test_archive.py | 870 +++ python/mozbuild/mozbuild/action/tooltool.py | 1670 ++++++ python/mozbuild/mozbuild/action/unify_symbols.py | 49 + python/mozbuild/mozbuild/action/unify_tests.py | 65 + python/mozbuild/mozbuild/action/unpack_dmg.py | 52 + python/mozbuild/mozbuild/action/util.py | 24 + python/mozbuild/mozbuild/action/webidl.py | 19 + python/mozbuild/mozbuild/action/wrap_rustc.py | 79 + python/mozbuild/mozbuild/action/xpccheck.py | 109 + python/mozbuild/mozbuild/action/xpidl-process.py | 153 + python/mozbuild/mozbuild/action/zip.py | 52 + python/mozbuild/mozbuild/analyze/__init__.py | 0 python/mozbuild/mozbuild/analyze/hg.py | 176 + python/mozbuild/mozbuild/android_version_code.py | 197 + python/mozbuild/mozbuild/artifact_builds.py | 27 + python/mozbuild/mozbuild/artifact_cache.py | 248 + python/mozbuild/mozbuild/artifact_commands.py | 612 +++ python/mozbuild/mozbuild/artifacts.py | 1657 ++++++ python/mozbuild/mozbuild/backend/__init__.py | 27 + python/mozbuild/mozbuild/backend/base.py | 389 ++ .../mozbuild/mozbuild/backend/cargo_build_defs.py | 87 + python/mozbuild/mozbuild/backend/clangd.py | 129 + python/mozbuild/mozbuild/backend/common.py | 603 +++ .../mozbuild/mozbuild/backend/configenvironment.py | 356 ++ python/mozbuild/mozbuild/backend/cpp_eclipse.py | 876 ++++ python/mozbuild/mozbuild/backend/fastermake.py | 300 ++ python/mozbuild/mozbuild/backend/mach_commands.py | 358 ++ python/mozbuild/mozbuild/backend/make.py | 139 + python/mozbuild/mozbuild/backend/recursivemake.py | 1904 +++++++ .../mozbuild/mozbuild/backend/static_analysis.py | 52 + python/mozbuild/mozbuild/backend/test_manifest.py | 110 + python/mozbuild/mozbuild/backend/visualstudio.py | 704 +++ python/mozbuild/mozbuild/base.py | 1105 ++++ python/mozbuild/mozbuild/bootstrap.py | 61 + python/mozbuild/mozbuild/build_commands.py | 366 ++ python/mozbuild/mozbuild/chunkify.py | 56 + python/mozbuild/mozbuild/code_analysis/__init__.py | 0 .../mozbuild/code_analysis/mach_commands.py | 2002 +++++++ python/mozbuild/mozbuild/code_analysis/moz.build | 8 + python/mozbuild/mozbuild/code_analysis/utils.py | 138 + python/mozbuild/mozbuild/codecoverage/__init__.py | 0 .../mozbuild/mozbuild/codecoverage/chrome_map.py | 175 + .../mozbuild/codecoverage/lcov_rewriter.py | 771 +++ .../mozbuild/codecoverage/manifest_handler.py | 52 + python/mozbuild/mozbuild/codecoverage/packager.py | 71 + python/mozbuild/mozbuild/compilation/__init__.py | 0 .../mozbuild/mozbuild/compilation/codecomplete.py | 54 + python/mozbuild/mozbuild/compilation/database.py | 242 + python/mozbuild/mozbuild/compilation/util.py | 64 + python/mozbuild/mozbuild/compilation/warnings.py | 392 ++ python/mozbuild/mozbuild/config_status.py | 184 + python/mozbuild/mozbuild/configure/__init__.py | 1311 +++++ .../mozbuild/configure/check_debug_ranges.py | 68 + python/mozbuild/mozbuild/configure/constants.py | 126 + python/mozbuild/mozbuild/configure/help.py | 90 + python/mozbuild/mozbuild/configure/lint.py | 348 ++ python/mozbuild/mozbuild/configure/options.py | 614 +++ python/mozbuild/mozbuild/configure/util.py | 235 + python/mozbuild/mozbuild/controller/__init__.py | 0 python/mozbuild/mozbuild/controller/building.py | 1865 +++++++ python/mozbuild/mozbuild/controller/clobber.py | 249 + python/mozbuild/mozbuild/doctor.py | 605 +++ python/mozbuild/mozbuild/dotproperties.py | 86 + python/mozbuild/mozbuild/faster_daemon.py | 326 ++ python/mozbuild/mozbuild/frontend/__init__.py | 0 python/mozbuild/mozbuild/frontend/context.py | 3147 +++++++++++ python/mozbuild/mozbuild/frontend/data.py | 1371 +++++ python/mozbuild/mozbuild/frontend/emitter.py | 1892 +++++++ python/mozbuild/mozbuild/frontend/gyp_reader.py | 497 ++ python/mozbuild/mozbuild/frontend/mach_commands.py | 338 ++ python/mozbuild/mozbuild/frontend/reader.py | 1432 +++++ python/mozbuild/mozbuild/frontend/sandbox.py | 313 ++ python/mozbuild/mozbuild/gen_test_backend.py | 53 + python/mozbuild/mozbuild/generated_sources.py | 75 + python/mozbuild/mozbuild/gn_processor.py | 718 +++ python/mozbuild/mozbuild/html_build_viewer.py | 118 + python/mozbuild/mozbuild/jar.py | 648 +++ python/mozbuild/mozbuild/mach_commands.py | 2732 ++++++++++ python/mozbuild/mozbuild/makeutil.py | 211 + python/mozbuild/mozbuild/mozconfig.py | 396 ++ python/mozbuild/mozbuild/mozconfig_loader | 48 + python/mozbuild/mozbuild/mozinfo.py | 164 + python/mozbuild/mozbuild/nodeutil.py | 126 + python/mozbuild/mozbuild/preprocessor.py | 924 ++++ python/mozbuild/mozbuild/pythonutil.py | 23 + python/mozbuild/mozbuild/repackaging/__init__.py | 0 .../mozbuild/repackaging/application_ini.py | 66 + python/mozbuild/mozbuild/repackaging/deb.py | 145 + python/mozbuild/mozbuild/repackaging/dmg.py | 57 + python/mozbuild/mozbuild/repackaging/installer.py | 55 + python/mozbuild/mozbuild/repackaging/mar.py | 95 + python/mozbuild/mozbuild/repackaging/msi.py | 122 + python/mozbuild/mozbuild/repackaging/msix.py | 1233 +++++ python/mozbuild/mozbuild/repackaging/pkg.py | 47 + .../mozbuild/mozbuild/repackaging/test/python.ini | 4 + .../mozbuild/repackaging/test/test_msix.py | 53 + .../html-build-viewer/build_resources.html | 694 +++ python/mozbuild/mozbuild/schedules.py | 79 + python/mozbuild/mozbuild/settings.py | 30 + python/mozbuild/mozbuild/shellutil.py | 210 + python/mozbuild/mozbuild/sphinx.py | 252 + python/mozbuild/mozbuild/telemetry.py | 264 + python/mozbuild/mozbuild/test/__init__.py | 0 .../html_fragment_preprocesor/example_basic.xml | 10 + .../example_multiple_templates.xml | 30 + .../data/html_fragment_preprocesor/example_xul.xml | 14 + .../test/action/data/invalid/region.properties | 12 + .../test/action/data/node/node-test-script.js | 11 + .../mozbuild/test/action/test_buildlist.py | 96 + .../test/action/test_html_fragment_preprocessor.py | 196 + .../mozbuild/test/action/test_langpack_manifest.py | 157 + python/mozbuild/mozbuild/test/action/test_node.py | 80 + .../test/action/test_process_install_manifest.py | 65 + python/mozbuild/mozbuild/test/backend/__init__.py | 0 python/mozbuild/mozbuild/test/backend/common.py | 253 + .../mozbuild/test/backend/data/build/app/moz.build | 54 + .../mozbuild/test/backend/data/build/bar.ini | 1 + .../mozbuild/test/backend/data/build/bar.js | 2 + .../mozbuild/test/backend/data/build/bar.jsm | 1 + .../mozbuild/test/backend/data/build/baz.ini | 2 + .../mozbuild/test/backend/data/build/baz.jsm | 2 + .../test/backend/data/build/components.manifest | 2 + .../mozbuild/test/backend/data/build/foo.css | 2 + .../mozbuild/test/backend/data/build/foo.ini | 1 + .../mozbuild/test/backend/data/build/foo.js | 1 + .../mozbuild/test/backend/data/build/foo.jsm | 1 + .../mozbuild/test/backend/data/build/jar.mn | 11 + .../mozbuild/test/backend/data/build/moz.build | 68 + .../mozbuild/test/backend/data/build/prefs.js | 1 + .../mozbuild/test/backend/data/build/qux.ini | 5 + .../mozbuild/test/backend/data/build/qux.jsm | 5 + .../mozbuild/test/backend/data/build/resource | 1 + .../mozbuild/test/backend/data/build/resource2 | 1 + .../mozbuild/test/backend/data/build/subdir/bar.js | 1 + .../mozbuild/test/backend/data/database/bar.c | 0 .../mozbuild/test/backend/data/database/baz.cpp | 0 .../backend/data/database/build/non-unified-compat | 0 .../mozbuild/test/backend/data/database/foo.c | 0 .../mozbuild/test/backend/data/database/moz.build | 14 + .../mozbuild/test/backend/data/database/qux.cpp | 0 .../mozbuild/test/backend/data/defines/moz.build | 9 + .../test/backend/data/dist-files/install.rdf | 0 .../mozbuild/test/backend/data/dist-files/main.js | 0 .../test/backend/data/dist-files/moz.build | 8 + .../test/backend/data/exports-generated/dom1.h | 0 .../test/backend/data/exports-generated/foo.h | 0 .../test/backend/data/exports-generated/gfx.h | 0 .../test/backend/data/exports-generated/moz.build | 12 + .../test/backend/data/exports-generated/mozilla1.h | 0 .../mozbuild/test/backend/data/exports/dom1.h | 0 .../mozbuild/test/backend/data/exports/dom2.h | 0 .../mozbuild/test/backend/data/exports/foo.h | 0 .../mozbuild/test/backend/data/exports/gfx.h | 0 .../mozbuild/test/backend/data/exports/moz.build | 8 + .../mozbuild/test/backend/data/exports/mozilla1.h | 0 .../mozbuild/test/backend/data/exports/mozilla2.h | 0 .../mozbuild/test/backend/data/exports/pprio.h | 0 .../data/final-target-files-wildcard/bar.xyz | 0 .../data/final-target-files-wildcard/foo.xyz | 0 .../data/final-target-files-wildcard/moz.build | 5 + .../test/backend/data/final_target/both/moz.build | 6 + .../data/final_target/dist-subdir/moz.build | 5 + .../data/final_target/final-target/moz.build | 5 + .../test/backend/data/final_target/moz.build | 5 + .../backend/data/final_target/xpi-name/moz.build | 5 + .../backend/data/generated-files-force/foo-data | 0 .../data/generated-files-force/generate-bar.py | 0 .../data/generated-files-force/generate-foo.py | 0 .../backend/data/generated-files-force/moz.build | 14 + .../test/backend/data/generated-files/foo-data | 0 .../backend/data/generated-files/generate-bar.py | 0 .../backend/data/generated-files/generate-foo.py | 0 .../test/backend/data/generated-files/moz.build | 12 + .../test/backend/data/generated_includes/moz.build | 5 + .../test/backend/data/host-defines/moz.build | 9 + .../data/host-rust-library-features/Cargo.toml | 13 + .../data/host-rust-library-features/moz.build | 22 + .../test/backend/data/host-rust-library/Cargo.toml | 15 + .../test/backend/data/host-rust-library/moz.build | 22 + .../data/install_substitute_config_files/moz.build | 6 + .../install_substitute_config_files/sub/foo.h.in | 1 + .../install_substitute_config_files/sub/moz.build | 7 + .../test/backend/data/ipdl_sources/bar/moz.build | 16 + .../test/backend/data/ipdl_sources/foo/moz.build | 16 + .../test/backend/data/ipdl_sources/ipdl/moz.build | 9 + .../test/backend/data/ipdl_sources/moz.build | 19 + .../test/backend/data/jar-manifests/moz.build | 7 + .../mozbuild/test/backend/data/linkage/moz.build | 11 + .../test/backend/data/linkage/prog/moz.build | 11 + .../test/backend/data/linkage/prog/qux/moz.build | 6 + .../test/backend/data/linkage/prog/qux/qux1.c | 0 .../test/backend/data/linkage/real/foo/foo1.c | 0 .../test/backend/data/linkage/real/foo/foo2.c | 0 .../test/backend/data/linkage/real/foo/moz.build | 6 + .../test/backend/data/linkage/real/moz.build | 14 + .../test/backend/data/linkage/shared/baz/baz1.c | 0 .../test/backend/data/linkage/shared/baz/moz.build | 6 + .../test/backend/data/linkage/shared/moz.build | 14 + .../test/backend/data/linkage/static/bar/bar1.cc | 0 .../test/backend/data/linkage/static/bar/bar2.cc | 0 .../linkage/static/bar/bar_helper/bar_helper1.cpp | 0 .../data/linkage/static/bar/bar_helper/moz.build | 8 + .../test/backend/data/linkage/static/bar/moz.build | 13 + .../test/backend/data/linkage/static/moz.build | 12 + .../test/backend/data/linkage/templates.mozbuild | 23 + .../bar/baz/dummy_file_for_nonempty_directory | 0 .../foo/dummy_file_for_nonempty_directory | 0 .../test/backend/data/local_includes/moz.build | 5 + .../backend/data/localized-files/en-US/bar.ini | 0 .../test/backend/data/localized-files/en-US/foo.js | 0 .../test/backend/data/localized-files/moz.build | 9 + .../en-US/localized-input | 0 .../data/localized-generated-files-AB_CD/foo-data | 0 .../generate-foo.py | 0 .../inner/locales/en-US/localized-input | 0 .../locales/en-US/localized-input | 0 .../data/localized-generated-files-AB_CD/moz.build | 32 + .../non-localized-input | 0 .../en-US/localized-input | 0 .../data/localized-generated-files-force/foo-data | 0 .../generate-foo.py | 0 .../data/localized-generated-files-force/moz.build | 22 + .../non-localized-input | 0 .../en-US/localized-input | 0 .../data/localized-generated-files/foo-data | 0 .../data/localized-generated-files/generate-foo.py | 0 .../data/localized-generated-files/moz.build | 15 + .../localized-generated-files/non-localized-input | 0 .../backend/data/localized-pp-files/en-US/bar.ini | 0 .../backend/data/localized-pp-files/en-US/foo.js | 0 .../test/backend/data/localized-pp-files/moz.build | 8 + .../data/prog-lib-c-only/c-library/c-library.c | 2 + .../data/prog-lib-c-only/c-library/moz.build | 7 + .../prog-lib-c-only/c-program/c_test_program.c | 2 + .../data/prog-lib-c-only/c-program/moz.build | 7 + .../c-simple-programs/c_simple_program.c | 2 + .../prog-lib-c-only/c-simple-programs/moz.build | 5 + .../data/prog-lib-c-only/cxx-library/c-source.c | 2 + .../prog-lib-c-only/cxx-library/cxx-library.cpp | 2 + .../data/prog-lib-c-only/cxx-library/moz.build | 10 + .../cxx-program/cxx_test_program.cpp | 2 + .../data/prog-lib-c-only/cxx-program/moz.build | 7 + .../cxx-simple-programs/cxx_simple_program.cpp | 2 + .../prog-lib-c-only/cxx-simple-programs/moz.build | 5 + .../test/backend/data/prog-lib-c-only/moz.build | 35 + .../data/prog-lib-c-only/simple-programs/moz.build | 3 + .../backend/data/program-paths/dist-bin/moz.build | 4 + .../data/program-paths/dist-subdir/moz.build | 5 + .../data/program-paths/final-target/moz.build | 5 + .../test/backend/data/program-paths/moz.build | 15 + .../data/program-paths/not-installed/moz.build | 5 + .../test/backend/data/resources/bar.res.in | 0 .../test/backend/data/resources/cursor.cur | 0 .../test/backend/data/resources/desktop1.ttf | 0 .../test/backend/data/resources/desktop2.ttf | 0 .../test/backend/data/resources/extra.manifest | 0 .../mozbuild/test/backend/data/resources/font1.ttf | 0 .../mozbuild/test/backend/data/resources/font2.ttf | 0 .../mozbuild/test/backend/data/resources/foo.res | 0 .../test/backend/data/resources/mobile.ttf | 0 .../mozbuild/test/backend/data/resources/moz.build | 9 + .../test/backend/data/resources/test.manifest | 0 .../backend/data/rust-library-features/Cargo.toml | 15 + .../backend/data/rust-library-features/moz.build | 20 + .../test/backend/data/rust-library/Cargo.toml | 15 + .../test/backend/data/rust-library/moz.build | 19 + .../backend/data/rust-programs/code/Cargo.toml | 10 + .../test/backend/data/rust-programs/code/moz.build | 6 + .../test/backend/data/rust-programs/moz.build | 5 + .../mozbuild/test/backend/data/sources/bar.cpp | 0 .../mozbuild/test/backend/data/sources/bar.s | 0 .../mozbuild/test/backend/data/sources/baz.c | 0 .../mozbuild/test/backend/data/sources/foo.asm | 0 .../mozbuild/test/backend/data/sources/foo.cpp | 0 .../mozbuild/test/backend/data/sources/fuga.mm | 0 .../mozbuild/test/backend/data/sources/hoge.mm | 0 .../mozbuild/test/backend/data/sources/moz.build | 26 + .../mozbuild/test/backend/data/sources/qux.c | 0 .../mozbuild/test/backend/data/sources/titi.S | 0 .../mozbuild/test/backend/data/sources/toto.S | 0 .../mozbuild/test/backend/data/stub0/Makefile.in | 4 + .../test/backend/data/stub0/dir1/Makefile.in | 7 + .../test/backend/data/stub0/dir1/moz.build | 3 + .../test/backend/data/stub0/dir2/moz.build | 3 + .../test/backend/data/stub0/dir3/Makefile.in | 7 + .../test/backend/data/stub0/dir3/moz.build | 3 + .../mozbuild/test/backend/data/stub0/moz.build | 7 + .../data/substitute_config_files/Makefile.in | 0 .../backend/data/substitute_config_files/foo.in | 1 + .../backend/data/substitute_config_files/moz.build | 5 + .../child/another-file.sjs | 0 .../test-manifest-shared-support/child/browser.ini | 6 + .../child/data/one.txt | 0 .../child/data/two.txt | 0 .../test-manifest-shared-support/child/test_sub.js | 0 .../test-manifest-shared-support/mochitest.ini | 8 + .../data/test-manifest-shared-support/moz.build | 5 + .../test-manifest-shared-support/support-file.txt | 0 .../data/test-manifest-shared-support/test_foo.js | 0 .../mochitest-common.ini | 1 + .../test-manifests-backend-sources/mochitest.ini | 2 + .../data/test-manifests-backend-sources/moz.build | 6 + .../test-manifests-backend-sources/test_bar.js | 0 .../test-manifests-backend-sources/test_foo.js | 0 .../mochitest1.ini | 4 + .../mochitest2.ini | 4 + .../moz.build | 7 + .../test_bar.js | 0 .../test_foo.js | 0 .../instrumentation.ini | 1 + .../test-manifests-package-tests/mochitest.ini | 1 + .../data/test-manifests-package-tests/mochitest.js | 0 .../data/test-manifests-package-tests/moz.build | 10 + .../test-manifests-package-tests/not_packaged.java | 0 .../data/test-manifests-written/dir1/test_bar.js | 0 .../data/test-manifests-written/dir1/xpcshell.ini | 3 + .../data/test-manifests-written/mochitest.ini | 3 + .../data/test-manifests-written/mochitest.js | 0 .../backend/data/test-manifests-written/moz.build | 9 + .../data/test-manifests-written/xpcshell.ini | 4 + .../data/test-manifests-written/xpcshell.js | 0 .../data/test-support-binaries-tracked/moz.build | 5 + .../test-support-binaries-tracked/src/moz.build | 12 + .../test-support-binaries-tracked/test/moz.build | 32 + .../test/test-one.cpp | 0 .../test/test-two.cpp | 0 .../mozbuild/test/backend/data/test_config/file.in | 3 + .../test/backend/data/test_config/moz.build | 3 + .../backend/data/variable_passthru/Makefile.in | 0 .../test/backend/data/variable_passthru/baz.def | 0 .../test/backend/data/variable_passthru/moz.build | 11 + .../test/backend/data/variable_passthru/test1.c | 0 .../test/backend/data/variable_passthru/test1.cpp | 0 .../test/backend/data/variable_passthru/test1.mm | 0 .../test/backend/data/variable_passthru/test2.c | 0 .../test/backend/data/variable_passthru/test2.cpp | 0 .../test/backend/data/variable_passthru/test2.mm | 0 .../test/backend/data/visual-studio/dir1/bar.cpp | 0 .../test/backend/data/visual-studio/dir1/foo.cpp | 0 .../test/backend/data/visual-studio/dir1/moz.build | 9 + .../test/backend/data/visual-studio/moz.build | 7 + .../mozbuild/test/backend/data/xpidl/bar.idl | 0 .../data/xpidl/config/makefiles/xpidl/Makefile.in | 0 .../mozbuild/test/backend/data/xpidl/foo.idl | 0 .../mozbuild/test/backend/data/xpidl/moz.build | 6 + .../mozbuild/mozbuild/test/backend/test_build.py | 261 + .../test/backend/test_configenvironment.py | 73 + .../mozbuild/test/backend/test_database.py | 91 + .../mozbuild/test/backend/test_fastermake.py | 42 + .../test/backend/test_partialconfigenvironment.py | 173 + .../mozbuild/test/backend/test_recursivemake.py | 1307 +++++ .../mozbuild/test/backend/test_test_manifest.py | 94 + .../mozbuild/test/backend/test_visualstudio.py | 63 + .../test/code_analysis/test_mach_commands.py | 90 + .../mozbuild/test/codecoverage/sample_lcov.info | 1895 +++++++ .../test/codecoverage/test_lcov_rewrite.py | 444 ++ python/mozbuild/mozbuild/test/common.py | 69 + .../mozbuild/mozbuild/test/compilation/__init__.py | 0 .../mozbuild/test/compilation/test_warnings.py | 240 + python/mozbuild/mozbuild/test/configure/common.py | 307 ++ .../test/configure/data/decorators.configure | 53 + .../mozbuild/test/configure/data/empty_mozconfig | 0 .../mozbuild/test/configure/data/extra.configure | 15 + .../test/configure/data/imply_option/imm.configure | 37 + .../configure/data/imply_option/infer.configure | 28 + .../configure/data/imply_option/infer_ko.configure | 36 + .../configure/data/imply_option/negative.configure | 40 + .../configure/data/imply_option/simple.configure | 28 + .../configure/data/imply_option/values.configure | 28 + .../test/configure/data/included.configure | 68 + .../mozbuild/test/configure/data/moz.configure | 205 + .../test/configure/data/set_config.configure | 51 + .../test/configure/data/set_define.configure | 51 + .../test/configure/data/subprocess.configure | 24 + python/mozbuild/mozbuild/test/configure/lint.py | 62 + .../configure/macos_fake_sdk/SDKSettings.plist | 8 + .../test/configure/test_checks_configure.py | 1169 +++++ .../mozbuild/test/configure/test_compile_checks.py | 589 +++ .../mozbuild/test/configure/test_configure.py | 1986 +++++++ .../mozbuild/mozbuild/test/configure/test_lint.py | 487 ++ .../mozbuild/test/configure/test_moz_configure.py | 174 + .../mozbuild/test/configure/test_options.py | 905 ++++ .../test/configure/test_toolchain_configure.py | 1917 +++++++ .../test/configure/test_toolchain_helpers.py | 433 ++ .../test/configure/test_toolkit_moz_configure.py | 102 + .../mozbuild/mozbuild/test/configure/test_util.py | 539 ++ .../mozbuild/mozbuild/test/controller/__init__.py | 0 .../mozbuild/test/controller/test_ccachestats.py | 866 +++ .../mozbuild/test/controller/test_clobber.py | 214 + python/mozbuild/mozbuild/test/data/Makefile | 0 python/mozbuild/mozbuild/test/data/bad.properties | 12 + .../mozbuild/mozbuild/test/data/test-dir/Makefile | 0 .../mozbuild/test/data/test-dir/with/Makefile | 0 .../test/data/test-dir/with/without/with/Makefile | 0 .../test/data/test-dir/without/with/Makefile | 0 .../mozbuild/mozbuild/test/data/valid.properties | 11 + python/mozbuild/mozbuild/test/frontend/__init__.py | 0 .../data/allow-compiler-warnings/moz.build | 22 + .../frontend/data/allow-compiler-warnings/test1.c | 0 .../mozbuild/test/frontend/data/asflags/moz.build | 15 + .../mozbuild/test/frontend/data/asflags/test1.c | 0 .../mozbuild/test/frontend/data/asflags/test2.S | 0 .../test/frontend/data/branding-files/bar.ico | 0 .../test/frontend/data/branding-files/baz.png | 0 .../test/frontend/data/branding-files/foo.xpm | 0 .../test/frontend/data/branding-files/moz.build | 12 + .../test/frontend/data/branding-files/quux.icns | 0 .../test/frontend/data/compile-defines/moz.build | 16 + .../test/frontend/data/compile-defines/test1.c | 0 .../data/compile-flags-field-validation/moz.build | 17 + .../data/compile-flags-field-validation/test1.c | 0 .../data/compile-flags-templates/moz.build | 29 + .../frontend/data/compile-flags-templates/test1.c | 0 .../data/compile-flags-type-validation/moz.build | 17 + .../data/compile-flags-type-validation/test1.c | 0 .../test/frontend/data/compile-flags/moz.build | 22 + .../test/frontend/data/compile-flags/test1.c | 0 .../test/frontend/data/compile-includes/moz.build | 15 + .../frontend/data/compile-includes/subdir/header.h | 0 .../test/frontend/data/compile-includes/test1.c | 0 .../data/config-file-substitution/moz.build | 6 + .../crate-dependency-path-resolution/Cargo.toml | 18 + .../crate-dependency-path-resolution/moz.build | 19 + .../shallow/Cargo.toml | 6 + .../the/depths/Cargo.toml | 9 + .../mozbuild/test/frontend/data/defines/moz.build | 9 + .../data/disable-compiler-warnings/moz.build | 22 + .../data/disable-compiler-warnings/test1.c | 0 .../frontend/data/disable-stl-wrapping/moz.build | 23 + .../frontend/data/disable-stl-wrapping/test1.c | 0 .../frontend/data/dist-files-missing/install.rdf | 0 .../frontend/data/dist-files-missing/moz.build | 8 + .../test/frontend/data/dist-files/install.rdf | 0 .../mozbuild/test/frontend/data/dist-files/main.js | 0 .../test/frontend/data/dist-files/moz.build | 8 + .../test/frontend/data/exports-generated/foo.h | 0 .../test/frontend/data/exports-generated/moz.build | 8 + .../frontend/data/exports-generated/mozilla1.h | 0 .../frontend/data/exports-missing-generated/foo.h | 0 .../data/exports-missing-generated/moz.build | 5 + .../test/frontend/data/exports-missing/foo.h | 0 .../test/frontend/data/exports-missing/moz.build | 6 + .../test/frontend/data/exports-missing/mozilla1.h | 0 .../mozbuild/test/frontend/data/exports/bar.h | 0 .../mozbuild/test/frontend/data/exports/baz.h | 0 .../mozbuild/test/frontend/data/exports/dom1.h | 0 .../mozbuild/test/frontend/data/exports/dom2.h | 0 .../mozbuild/test/frontend/data/exports/dom3.h | 0 .../mozbuild/test/frontend/data/exports/foo.h | 0 .../mozbuild/test/frontend/data/exports/gfx.h | 0 .../mozbuild/test/frontend/data/exports/mem.h | 0 .../mozbuild/test/frontend/data/exports/mem2.h | 0 .../mozbuild/test/frontend/data/exports/moz.build | 13 + .../mozbuild/test/frontend/data/exports/mozilla1.h | 0 .../mozbuild/test/frontend/data/exports/mozilla2.h | 0 .../mozbuild/test/frontend/data/exports/pprio.h | 0 .../mozbuild/test/frontend/data/exports/pprthred.h | 0 .../bug_component/bad-assignment/moz.build | 2 + .../bug_component/different-matchers/moz.build | 4 + .../data/files-info/bug_component/final/moz.build | 3 + .../bug_component/final/subcomponent/moz.build | 2 + .../data/files-info/bug_component/moz.build | 2 + .../data/files-info/bug_component/simple/moz.build | 2 + .../data/files-info/bug_component/static/moz.build | 5 + .../test/frontend/data/files-info/moz.build | 0 .../final-target-pp-files-non-srcdir/moz.build | 7 + .../data/generated-files-absolute-script/moz.build | 9 + .../data/generated-files-absolute-script/script.py | 0 .../frontend/data/generated-files-force/moz.build | 11 + .../data/generated-files-method-names/moz.build | 13 + .../data/generated-files-method-names/script.py | 0 .../data/generated-files-no-inputs/moz.build | 9 + .../data/generated-files-no-inputs/script.py | 0 .../generated-files-no-python-script/moz.build | 8 + .../generated-files-no-python-script/script.rb | 0 .../data/generated-files-no-script/moz.build | 8 + .../test/frontend/data/generated-files/moz.build | 9 + .../test/frontend/data/generated-sources/a.cpp | 0 .../test/frontend/data/generated-sources/b.cc | 0 .../test/frontend/data/generated-sources/c.cxx | 0 .../test/frontend/data/generated-sources/d.c | 0 .../test/frontend/data/generated-sources/e.m | 0 .../test/frontend/data/generated-sources/f.mm | 0 .../test/frontend/data/generated-sources/g.S | 0 .../test/frontend/data/generated-sources/h.s | 0 .../test/frontend/data/generated-sources/i.asm | 0 .../test/frontend/data/generated-sources/moz.build | 39 + .../frontend/data/generated_includes/moz.build | 5 + .../frontend/data/host-compile-flags/moz.build | 22 + .../test/frontend/data/host-compile-flags/test1.c | 0 .../data/host-program-paths/final-target/moz.build | 5 + .../data/host-program-paths/installed/moz.build | 4 + .../frontend/data/host-program-paths/moz.build | 14 + .../host-program-paths/not-installed/moz.build | 5 + .../frontend/data/host-rust-libraries/Cargo.toml | 15 + .../frontend/data/host-rust-libraries/moz.build | 22 + .../data/host-rust-program-no-cargo-toml/moz.build | 1 + .../host-rust-program-nonexistent-name/Cargo.toml | 7 + .../host-rust-program-nonexistent-name/moz.build | 1 + .../frontend/data/host-rust-programs/Cargo.toml | 7 + .../frontend/data/host-rust-programs/moz.build | 1 + .../mozbuild/test/frontend/data/host-sources/a.cpp | 0 .../mozbuild/test/frontend/data/host-sources/b.cc | 0 .../mozbuild/test/frontend/data/host-sources/c.cxx | 0 .../mozbuild/test/frontend/data/host-sources/d.c | 0 .../mozbuild/test/frontend/data/host-sources/e.mm | 0 .../mozbuild/test/frontend/data/host-sources/f.mm | 0 .../test/frontend/data/host-sources/moz.build | 27 + .../frontend/data/include-basic/included.build | 4 + .../test/frontend/data/include-basic/moz.build | 7 + .../data/include-file-stack/included-1.build | 4 + .../data/include-file-stack/included-2.build | 4 + .../frontend/data/include-file-stack/moz.build | 5 + .../test/frontend/data/include-missing/moz.build | 5 + .../data/include-outside-topsrcdir/relative.build | 4 + .../include-relative-from-child/child/child.build | 4 + .../include-relative-from-child/child/child2.build | 4 + .../child/grandchild/grandchild.build | 4 + .../data/include-relative-from-child/parent.build | 4 + .../data/include-topsrcdir-relative/moz.build | 5 + .../data/include-topsrcdir-relative/sibling.build | 4 + .../data/inheriting-variables/bar/moz.build | 5 + .../data/inheriting-variables/foo/baz/moz.build | 7 + .../data/inheriting-variables/foo/moz.build | 7 + .../frontend/data/inheriting-variables/moz.build | 10 + .../test/frontend/data/ipdl_sources/bar/moz.build | 14 + .../test/frontend/data/ipdl_sources/foo/moz.build | 14 + .../test/frontend/data/ipdl_sources/moz.build | 10 + .../data/jar-manifests-multiple-files/moz.build | 7 + .../test/frontend/data/jar-manifests/moz.build | 7 + .../frontend/data/library-defines/liba/moz.build | 5 + .../frontend/data/library-defines/libb/moz.build | 7 + .../frontend/data/library-defines/libc/moz.build | 5 + .../frontend/data/library-defines/libd/moz.build | 5 + .../test/frontend/data/library-defines/moz.build | 11 + .../test/frontend/data/link-flags/moz.build | 16 + .../mozbuild/test/frontend/data/link-flags/test1.c | 0 .../frontend/data/local_includes-filename/foo.h | 0 .../data/local_includes-filename/moz.build | 5 + .../data/local_includes-invalid/objdir/moz.build | 5 + .../data/local_includes-invalid/srcdir/moz.build | 5 + .../bar/baz/dummy_file_for_nonempty_directory | 0 .../foo/dummy_file_for_nonempty_directory | 0 .../test/frontend/data/local_includes/moz.build | 5 + .../data/localized-files-from-generated/moz.build | 6 + .../data/localized-files-no-en-us/en-US/bar.ini | 0 .../frontend/data/localized-files-no-en-us/foo.js | 0 .../inner/locales/en-US/bar.ini | 0 .../data/localized-files-no-en-us/moz.build | 9 + .../moz.build | 6 + .../frontend/data/localized-files/en-US/bar.ini | 0 .../frontend/data/localized-files/en-US/foo.js | 0 .../test/frontend/data/localized-files/moz.build | 9 + .../moz.build | 6 + .../data/localized-generated-files-force/moz.build | 6 + .../data/localized-generated-files/moz.build | 5 + .../frontend/data/localized-pp-files/en-US/bar.ini | 0 .../frontend/data/localized-pp-files/en-US/foo.js | 0 .../frontend/data/localized-pp-files/moz.build | 8 + .../frontend/data/missing-local-includes/moz.build | 5 + .../test/frontend/data/missing-xpidl/moz.build | 6 + .../data/multiple-rust-libraries/moz.build | 29 + .../data/multiple-rust-libraries/rust1/Cargo.toml | 15 + .../data/multiple-rust-libraries/rust1/moz.build | 4 + .../data/multiple-rust-libraries/rust2/Cargo.toml | 15 + .../data/multiple-rust-libraries/rust2/moz.build | 4 + .../test/frontend/data/object-conflicts/1/Test.c | 0 .../test/frontend/data/object-conflicts/1/Test.cpp | 0 .../frontend/data/object-conflicts/1/moz.build | 4 + .../test/frontend/data/object-conflicts/2/Test.cpp | 0 .../frontend/data/object-conflicts/2/moz.build | 4 + .../data/object-conflicts/2/subdir/Test.cpp | 0 .../test/frontend/data/object-conflicts/3/Test.c | 0 .../test/frontend/data/object-conflicts/3/Test.cpp | 0 .../frontend/data/object-conflicts/3/moz.build | 7 + .../test/frontend/data/object-conflicts/4/Test.c | 0 .../test/frontend/data/object-conflicts/4/Test.cpp | 0 .../frontend/data/object-conflicts/4/moz.build | 4 + .../frontend/data/program-paths/dist-bin/moz.build | 4 + .../data/program-paths/dist-subdir/moz.build | 5 + .../data/program-paths/final-target/moz.build | 5 + .../test/frontend/data/program-paths/moz.build | 15 + .../data/program-paths/not-installed/moz.build | 5 + .../mozbuild/test/frontend/data/program/moz.build | 18 + .../test/frontend/data/program/test_program1.cpp | 0 .../test/frontend/data/program/test_program2.cpp | 0 .../frontend/data/reader-error-bad-dir/moz.build | 5 + .../frontend/data/reader-error-basic/moz.build | 5 + .../data/reader-error-empty-list/moz.build | 5 + .../data/reader-error-error-func/moz.build | 5 + .../data/reader-error-included-from/child.build | 4 + .../data/reader-error-included-from/moz.build | 5 + .../data/reader-error-missing-include/moz.build | 5 + .../data/reader-error-outside-topsrcdir/moz.build | 5 + .../reader-error-read-unknown-global/moz.build | 5 + .../data/reader-error-repeated-dir/moz.build | 7 + .../data/reader-error-script-error/moz.build | 5 + .../frontend/data/reader-error-syntax/moz.build | 5 + .../data/reader-error-write-bad-value/moz.build | 5 + .../reader-error-write-unknown-global/moz.build | 7 + .../reader-relevant-mozbuild/d1/every-level/a/file | 0 .../d1/every-level/a/moz.build | 0 .../reader-relevant-mozbuild/d1/every-level/b/file | 0 .../d1/every-level/b/moz.build | 0 .../d1/every-level/moz.build | 0 .../data/reader-relevant-mozbuild/d1/file1 | 0 .../data/reader-relevant-mozbuild/d1/file2 | 0 .../data/reader-relevant-mozbuild/d1/moz.build | 0 .../d1/no-intermediate-moz-build/child/file | 0 .../d1/no-intermediate-moz-build/child/moz.build | 0 .../d1/parent-is-far/dir1/dir2/dir3/file | 0 .../d1/parent-is-far/moz.build | 0 .../data/reader-relevant-mozbuild/d2/dir1/file | 0 .../reader-relevant-mozbuild/d2/dir1/moz.build | 0 .../data/reader-relevant-mozbuild/d2/dir2/file | 0 .../reader-relevant-mozbuild/d2/dir2/moz.build | 0 .../data/reader-relevant-mozbuild/d2/moz.build | 0 .../frontend/data/reader-relevant-mozbuild/file | 0 .../data/reader-relevant-mozbuild/moz.build | 0 .../frontend/data/resolved-flags-error/moz.build | 17 + .../frontend/data/resolved-flags-error/test1.c | 0 .../data/rust-library-dash-folding/Cargo.toml | 15 + .../data/rust-library-dash-folding/moz.build | 19 + .../rust-library-duplicate-features/Cargo.toml | 15 + .../data/rust-library-duplicate-features/moz.build | 20 + .../frontend/data/rust-library-features/Cargo.toml | 15 + .../frontend/data/rust-library-features/moz.build | 20 + .../rust-library-invalid-crate-type/Cargo.toml | 15 + .../data/rust-library-invalid-crate-type/moz.build | 19 + .../data/rust-library-name-mismatch/Cargo.toml | 12 + .../data/rust-library-name-mismatch/moz.build | 19 + .../data/rust-library-no-cargo-toml/moz.build | 19 + .../data/rust-library-no-lib-section/Cargo.toml | 12 + .../data/rust-library-no-lib-section/moz.build | 19 + .../data/rust-program-no-cargo-toml/moz.build | 1 + .../data/rust-program-nonexistent-name/Cargo.toml | 7 + .../data/rust-program-nonexistent-name/moz.build | 1 + .../test/frontend/data/rust-programs/Cargo.toml | 7 + .../test/frontend/data/rust-programs/moz.build | 1 + .../test/frontend/data/schedules/moz.build | 19 + .../test/frontend/data/schedules/subd/moz.build | 5 + .../mozbuild/test/frontend/data/sources-just-c/d.c | 0 .../mozbuild/test/frontend/data/sources-just-c/e.m | 0 .../mozbuild/test/frontend/data/sources-just-c/g.S | 0 .../mozbuild/test/frontend/data/sources-just-c/h.s | 0 .../test/frontend/data/sources-just-c/i.asm | 0 .../test/frontend/data/sources-just-c/moz.build | 29 + .../mozbuild/test/frontend/data/sources/a.cpp | 0 .../mozbuild/test/frontend/data/sources/b.cc | 0 .../mozbuild/test/frontend/data/sources/c.cxx | 0 .../mozbuild/test/frontend/data/sources/d.c | 0 .../mozbuild/test/frontend/data/sources/e.m | 0 .../mozbuild/test/frontend/data/sources/f.mm | 0 .../mozbuild/test/frontend/data/sources/g.S | 0 .../mozbuild/test/frontend/data/sources/h.s | 0 .../mozbuild/test/frontend/data/sources/i.asm | 0 .../mozbuild/test/frontend/data/sources/moz.build | 39 + .../frontend/data/templates/templates.mozbuild | 21 + .../data/test-harness-files-root/moz.build | 4 + .../frontend/data/test-harness-files/mochitest.ini | 1 + .../frontend/data/test-harness-files/mochitest.py | 1 + .../frontend/data/test-harness-files/moz.build | 7 + .../frontend/data/test-harness-files/runtests.py | 1 + .../test/frontend/data/test-harness-files/utils.py | 1 + .../data/test-install-shared-lib/moz.build | 16 + .../data/test-linkables-cxx-link/moz.build | 14 + .../data/test-linkables-cxx-link/one/foo.cpp | 0 .../data/test-linkables-cxx-link/one/moz.build | 11 + .../data/test-linkables-cxx-link/three/moz.build | 5 + .../data/test-linkables-cxx-link/two/foo.c | 0 .../data/test-linkables-cxx-link/two/moz.build | 11 + .../absolute-support.ini | 4 + .../data/test-manifest-absolute-support/foo.txt | 1 + .../data/test-manifest-absolute-support/moz.build | 4 + .../test-manifest-absolute-support/test_file.js | 0 .../test/frontend/data/test-manifest-dupes/bar.js | 0 .../test/frontend/data/test-manifest-dupes/foo.js | 0 .../data/test-manifest-dupes/mochitest.ini | 7 + .../frontend/data/test-manifest-dupes/moz.build | 4 + .../frontend/data/test-manifest-dupes/test_baz.js | 0 .../included-reftest.list | 1 + .../data/test-manifest-emitted-includes/moz.build | 1 + .../test-manifest-emitted-includes/reftest.list | 2 + .../frontend/data/test-manifest-empty/empty.ini | 2 + .../frontend/data/test-manifest-empty/moz.build | 4 + .../test_inactive.html | 0 .../data/test-manifest-install-includes/common.ini | 1 + .../test-manifest-install-includes/mochitest.ini | 3 + .../data/test-manifest-install-includes/moz.build | 4 + .../test-manifest-install-includes/test_foo.html | 1 + .../data/test-manifest-just-support/foo.txt | 1 + .../test-manifest-just-support/just-support.ini | 2 + .../data/test-manifest-just-support/moz.build | 4 + .../a11y-support/dir1/bar | 0 .../test-manifest-keys-extracted/a11y-support/foo | 0 .../data/test-manifest-keys-extracted/a11y.ini | 4 + .../data/test-manifest-keys-extracted/browser.ini | 4 + .../data/test-manifest-keys-extracted/chrome.ini | 3 + .../test-manifest-keys-extracted/crashtest.list | 1 + .../data/test-manifest-keys-extracted/metro.ini | 3 + .../test-manifest-keys-extracted/mochitest.ini | 5 + .../data/test-manifest-keys-extracted/moz.build | 12 + .../data/test-manifest-keys-extracted/python.ini | 1 + .../data/test-manifest-keys-extracted/reftest.list | 1 + .../data/test-manifest-keys-extracted/test_a11y.js | 0 .../test-manifest-keys-extracted/test_browser.js | 0 .../test-manifest-keys-extracted/test_chrome.js | 0 .../data/test-manifest-keys-extracted/test_foo.py | 0 .../test-manifest-keys-extracted/test_metro.js | 0 .../test-manifest-keys-extracted/test_mochitest.js | 0 .../test-manifest-keys-extracted/test_xpcshell.js | 0 .../data/test-manifest-keys-extracted/xpcshell.ini | 5 + .../data/test-manifest-missing-manifest/moz.build | 4 + .../moz.build | 4 + .../xpcshell.ini | 4 + .../test-manifest-missing-test-file/mochitest.ini | 1 + .../data/test-manifest-missing-test-file/moz.build | 4 + .../child/mochitest.ini | 4 + .../child/test_foo.js | 0 .../moz.build | 4 + .../support-file.txt | 0 .../child/another-file.sjs | 0 .../test-manifest-shared-missing/child/browser.ini | 6 + .../child/data/one.txt | 0 .../child/data/two.txt | 0 .../test-manifest-shared-missing/child/test_sub.js | 0 .../test-manifest-shared-missing/mochitest.ini | 9 + .../data/test-manifest-shared-missing/moz.build | 5 + .../test-manifest-shared-missing/support-file.txt | 0 .../data/test-manifest-shared-missing/test_foo.js | 0 .../child/another-file.sjs | 0 .../test-manifest-shared-support/child/browser.ini | 6 + .../child/data/one.txt | 0 .../child/data/two.txt | 0 .../test-manifest-shared-support/child/test_sub.js | 0 .../test-manifest-shared-support/mochitest.ini | 8 + .../data/test-manifest-shared-support/moz.build | 5 + .../test-manifest-shared-support/support-file.txt | 0 .../data/test-manifest-shared-support/test_foo.js | 0 .../test-manifest-unmatched-generated/moz.build | 4 + .../test-manifest-unmatched-generated/test.ini | 4 + .../test-manifest-unmatched-generated/test_foo | 0 .../moz.build | 12 + .../frontend/data/test-symbols-file-objdir/foo.py | 0 .../data/test-symbols-file-objdir/moz.build | 15 + .../frontend/data/test-symbols-file/foo.symbols | 1 + .../test/frontend/data/test-symbols-file/moz.build | 12 + .../frontend/data/traversal-all-vars/moz.build | 6 + .../data/traversal-all-vars/parallel/moz.build | 0 .../data/traversal-all-vars/regular/moz.build | 0 .../data/traversal-all-vars/test/moz.build | 0 .../data/traversal-outside-topsrcdir/moz.build | 5 + .../data/traversal-relative-dirs/bar/moz.build | 0 .../data/traversal-relative-dirs/foo/moz.build | 5 + .../data/traversal-relative-dirs/moz.build | 5 + .../data/traversal-repeated-dirs/bar/moz.build | 5 + .../data/traversal-repeated-dirs/foo/moz.build | 5 + .../data/traversal-repeated-dirs/moz.build | 5 + .../frontend/data/traversal-simple/bar/moz.build | 0 .../data/traversal-simple/foo/biz/moz.build | 0 .../frontend/data/traversal-simple/foo/moz.build | 2 + .../test/frontend/data/traversal-simple/moz.build | 5 + .../data/unified-sources-non-unified/bar.cxx | 0 .../frontend/data/unified-sources-non-unified/c1.c | 0 .../frontend/data/unified-sources-non-unified/c2.c | 0 .../data/unified-sources-non-unified/foo.cpp | 0 .../data/unified-sources-non-unified/moz.build | 32 + .../data/unified-sources-non-unified/objc1.mm | 0 .../data/unified-sources-non-unified/objc2.mm | 0 .../data/unified-sources-non-unified/quux.cc | 0 .../test/frontend/data/unified-sources/bar.cxx | 0 .../test/frontend/data/unified-sources/c1.c | 0 .../test/frontend/data/unified-sources/c2.c | 0 .../test/frontend/data/unified-sources/foo.cpp | 0 .../test/frontend/data/unified-sources/moz.build | 32 + .../test/frontend/data/unified-sources/objc1.mm | 0 .../test/frontend/data/unified-sources/objc2.mm | 0 .../test/frontend/data/unified-sources/quux.cc | 0 .../mozbuild/test/frontend/data/use-nasm/moz.build | 15 + .../mozbuild/test/frontend/data/use-nasm/test1.S | 0 .../test/frontend/data/variable-passthru/bans.S | 0 .../test/frontend/data/variable-passthru/baz.def | 0 .../test/frontend/data/variable-passthru/moz.build | 13 + .../test/frontend/data/variable-passthru/test1.c | 0 .../test/frontend/data/variable-passthru/test1.cpp | 0 .../test/frontend/data/variable-passthru/test1.mm | 0 .../test/frontend/data/variable-passthru/test2.c | 0 .../test/frontend/data/variable-passthru/test2.cpp | 0 .../test/frontend/data/variable-passthru/test2.mm | 0 .../test/frontend/data/visibility-flags/moz.build | 23 + .../test/frontend/data/visibility-flags/test1.c | 0 .../frontend/data/wasm-compile-flags/moz.build | 14 + .../test/frontend/data/wasm-compile-flags/test1.c | 0 .../mozbuild/test/frontend/data/wasm-sources/a.cpp | 0 .../mozbuild/test/frontend/data/wasm-sources/b.cc | 0 .../mozbuild/test/frontend/data/wasm-sources/c.cxx | 0 .../mozbuild/test/frontend/data/wasm-sources/d.c | 0 .../test/frontend/data/wasm-sources/moz.build | 15 + .../data/xpidl-module-no-sources/moz.build | 5 + .../mozbuild/test/frontend/test_context.py | 736 +++ .../mozbuild/test/frontend/test_emitter.py | 1872 +++++++ .../mozbuild/test/frontend/test_namespaces.py | 225 + .../mozbuild/mozbuild/test/frontend/test_reader.py | 531 ++ .../mozbuild/test/frontend/test_sandbox.py | 536 ++ python/mozbuild/mozbuild/test/python.ini | 60 + .../mozbuild/test/test_android_version_code.py | 111 + .../mozbuild/mozbuild/test/test_artifact_cache.py | 145 + python/mozbuild/mozbuild/test/test_artifacts.py | 115 + python/mozbuild/mozbuild/test/test_base.py | 446 ++ python/mozbuild/mozbuild/test/test_containers.py | 224 + .../mozbuild/mozbuild/test/test_dotproperties.py | 183 + python/mozbuild/mozbuild/test/test_expression.py | 88 + python/mozbuild/mozbuild/test/test_jarmaker.py | 493 ++ python/mozbuild/mozbuild/test/test_licenses.py | 33 + python/mozbuild/mozbuild/test/test_line_endings.py | 45 + python/mozbuild/mozbuild/test/test_makeutil.py | 164 + python/mozbuild/mozbuild/test/test_manifest.py | 2081 ++++++++ python/mozbuild/mozbuild/test/test_mozconfig.py | 275 + python/mozbuild/mozbuild/test/test_mozinfo.py | 318 ++ python/mozbuild/mozbuild/test/test_preprocessor.py | 824 +++ python/mozbuild/mozbuild/test/test_pythonutil.py | 24 + .../mozbuild/test/test_rewrite_mozbuild.py | 515 ++ python/mozbuild/mozbuild/test/test_telemetry.py | 102 + .../mozbuild/test/test_telemetry_settings.py | 174 + python/mozbuild/mozbuild/test/test_util.py | 950 ++++ .../mozbuild/test/test_util_fileavoidwrite.py | 110 + python/mozbuild/mozbuild/test/test_vendor.py | 48 + .../mozbuild/mozbuild/test/vendor_requirements.in | 5 + .../mozbuild/mozbuild/test/vendor_requirements.txt | 287 + python/mozbuild/mozbuild/testing.py | 266 + python/mozbuild/mozbuild/toolchains.py | 32 + python/mozbuild/mozbuild/util.py | 1475 ++++++ python/mozbuild/mozbuild/vendor/__init__.py | 0 python/mozbuild/mozbuild/vendor/host_angle.py | 37 + python/mozbuild/mozbuild/vendor/host_base.py | 64 + python/mozbuild/mozbuild/vendor/host_github.py | 27 + python/mozbuild/mozbuild/vendor/host_gitlab.py | 26 + .../mozbuild/mozbuild/vendor/host_googlesource.py | 32 + python/mozbuild/mozbuild/vendor/mach_commands.py | 232 + python/mozbuild/mozbuild/vendor/moz.build | 8 + python/mozbuild/mozbuild/vendor/moz_yaml.py | 770 +++ .../mozbuild/mozbuild/vendor/rewrite_mozbuild.py | 1279 +++++ .../mozbuild/vendor/test_vendor_changes.sh | 65 + python/mozbuild/mozbuild/vendor/vendor_manifest.py | 725 +++ python/mozbuild/mozbuild/vendor/vendor_python.py | 272 + python/mozbuild/mozbuild/vendor/vendor_rust.py | 962 ++++ python/mozbuild/mozpack/__init__.py | 0 .../mozpack/apple_pkg/Distribution.template | 19 + .../mozpack/apple_pkg/PackageInfo.template | 19 + python/mozbuild/mozpack/archive.py | 153 + python/mozbuild/mozpack/chrome/__init__.py | 0 python/mozbuild/mozpack/chrome/flags.py | 277 + python/mozbuild/mozpack/chrome/manifest.py | 399 ++ python/mozbuild/mozpack/copier.py | 604 +++ python/mozbuild/mozpack/dmg.py | 230 + python/mozbuild/mozpack/errors.py | 138 + python/mozbuild/mozpack/executables.py | 141 + python/mozbuild/mozpack/files.py | 1274 +++++ python/mozbuild/mozpack/manifests.py | 482 ++ python/mozbuild/mozpack/mozjar.py | 836 +++ python/mozbuild/mozpack/packager/__init__.py | 445 ++ python/mozbuild/mozpack/packager/formats.py | 353 ++ python/mozbuild/mozpack/packager/l10n.py | 303 ++ python/mozbuild/mozpack/packager/unpack.py | 199 + python/mozbuild/mozpack/path.py | 246 + python/mozbuild/mozpack/pkg.py | 299 ++ python/mozbuild/mozpack/test/__init__.py | 0 python/mozbuild/mozpack/test/data/test_data | 1 + python/mozbuild/mozpack/test/python.ini | 18 + .../mozpack/test/support/minify_js_verify.py | 15 + python/mozbuild/mozpack/test/test_archive.py | 196 + python/mozbuild/mozpack/test/test_chrome_flags.py | 149 + .../mozbuild/mozpack/test/test_chrome_manifest.py | 175 + python/mozbuild/mozpack/test/test_copier.py | 547 ++ python/mozbuild/mozpack/test/test_errors.py | 94 + python/mozbuild/mozpack/test/test_files.py | 1362 +++++ python/mozbuild/mozpack/test/test_manifests.py | 464 ++ python/mozbuild/mozpack/test/test_mozjar.py | 349 ++ python/mozbuild/mozpack/test/test_packager.py | 630 +++ .../mozbuild/mozpack/test/test_packager_formats.py | 536 ++ python/mozbuild/mozpack/test/test_packager_l10n.py | 152 + .../mozbuild/mozpack/test/test_packager_unpack.py | 66 + python/mozbuild/mozpack/test/test_path.py | 151 + python/mozbuild/mozpack/test/test_pkg.py | 137 + python/mozbuild/mozpack/test/test_unify.py | 250 + python/mozbuild/mozpack/unify.py | 265 + python/mozbuild/setup.py | 29 + python/mozlint/.isort.cfg | 3 + python/mozlint/mozlint/__init__.py | 7 + python/mozlint/mozlint/cli.py | 437 ++ python/mozlint/mozlint/editor.py | 57 + python/mozlint/mozlint/errors.py | 33 + python/mozlint/mozlint/formatters/__init__.py | 31 + python/mozlint/mozlint/formatters/compact.py | 41 + python/mozlint/mozlint/formatters/stylish.py | 149 + python/mozlint/mozlint/formatters/summary.py | 50 + python/mozlint/mozlint/formatters/treeherder.py | 34 + python/mozlint/mozlint/formatters/unix.py | 33 + python/mozlint/mozlint/parser.py | 130 + python/mozlint/mozlint/pathutils.py | 313 ++ python/mozlint/mozlint/result.py | 160 + python/mozlint/mozlint/roller.py | 416 ++ python/mozlint/mozlint/types.py | 214 + python/mozlint/mozlint/util/__init__.py | 0 python/mozlint/mozlint/util/implementation.py | 35 + python/mozlint/mozlint/util/string.py | 9 + python/mozlint/setup.py | 26 + python/mozlint/test/__init__.py | 0 python/mozlint/test/conftest.py | 66 + python/mozlint/test/files/foobar.js | 2 + python/mozlint/test/files/foobar.py | 3 + python/mozlint/test/files/irrelevant/file.txt | 1 + python/mozlint/test/files/no_foobar.js | 2 + python/mozlint/test/filter/a.js | 0 python/mozlint/test/filter/a.py | 0 python/mozlint/test/filter/foo/empty.txt | 0 python/mozlint/test/filter/foobar/empty.txt | 0 python/mozlint/test/filter/subdir1/b.js | 0 python/mozlint/test/filter/subdir1/b.py | 0 python/mozlint/test/filter/subdir1/subdir3/d.js | 0 python/mozlint/test/filter/subdir1/subdir3/d.py | 0 python/mozlint/test/filter/subdir2/c.js | 0 python/mozlint/test/filter/subdir2/c.py | 0 python/mozlint/test/linters/badreturncode.yml | 8 + python/mozlint/test/linters/excludes.yml | 10 + python/mozlint/test/linters/excludes_empty.yml | 8 + python/mozlint/test/linters/explicit_path.yml | 8 + python/mozlint/test/linters/external.py | 74 + python/mozlint/test/linters/external.yml | 8 + python/mozlint/test/linters/global.yml | 8 + python/mozlint/test/linters/global_payload.py | 38 + python/mozlint/test/linters/global_skipped.yml | 8 + python/mozlint/test/linters/invalid_exclude.yml | 6 + python/mozlint/test/linters/invalid_extension.ym | 5 + python/mozlint/test/linters/invalid_include.yml | 6 + .../test/linters/invalid_include_with_glob.yml | 6 + .../mozlint/test/linters/invalid_support_files.yml | 6 + python/mozlint/test/linters/invalid_type.yml | 5 + python/mozlint/test/linters/missing_attrs.yml | 3 + python/mozlint/test/linters/missing_definition.yml | 1 + python/mozlint/test/linters/multiple.yml | 19 + .../mozlint/test/linters/non_existing_exclude.yml | 7 + .../mozlint/test/linters/non_existing_include.yml | 7 + .../test/linters/non_existing_support_files.yml | 7 + python/mozlint/test/linters/raises.yml | 6 + python/mozlint/test/linters/regex.yml | 10 + python/mozlint/test/linters/setup.yml | 9 + python/mozlint/test/linters/setupfailed.yml | 9 + python/mozlint/test/linters/setupraised.yml | 9 + python/mozlint/test/linters/slow.yml | 8 + python/mozlint/test/linters/string.yml | 9 + python/mozlint/test/linters/structured.yml | 8 + python/mozlint/test/linters/support_files.yml | 10 + python/mozlint/test/linters/warning.yml | 11 + .../test/linters/warning_no_code_review.yml | 12 + python/mozlint/test/python.ini | 11 + python/mozlint/test/runcli.py | 17 + python/mozlint/test/test_cli.py | 127 + python/mozlint/test/test_editor.py | 92 + python/mozlint/test/test_formatters.py | 141 + python/mozlint/test/test_parser.py | 80 + python/mozlint/test/test_pathutils.py | 166 + python/mozlint/test/test_result.py | 26 + python/mozlint/test/test_roller.py | 396 ++ python/mozlint/test/test_types.py | 84 + python/mozperftest/.isort.cfg | 3 + python/mozperftest/README.rst | 6 + python/mozperftest/mozperftest/.coveragerc | 10 + python/mozperftest/mozperftest/__init__.py | 13 + python/mozperftest/mozperftest/argparser.py | 358 ++ python/mozperftest/mozperftest/environment.py | 106 + python/mozperftest/mozperftest/fzf/__init__.py | 3 + python/mozperftest/mozperftest/fzf/fzf.py | 116 + python/mozperftest/mozperftest/fzf/preview.py | 90 + python/mozperftest/mozperftest/hooks.py | 63 + python/mozperftest/mozperftest/layers.py | 177 + python/mozperftest/mozperftest/mach_commands.py | 288 + python/mozperftest/mozperftest/metadata.py | 44 + python/mozperftest/mozperftest/metrics/__init__.py | 23 + python/mozperftest/mozperftest/metrics/common.py | 343 ++ .../mozperftest/metrics/consoleoutput.py | 59 + .../mozperftest/mozperftest/metrics/exceptions.py | 53 + .../mozperftest/metrics/notebook/__init__.py | 7 + .../mozperftest/metrics/notebook/constant.py | 31 + .../metrics/notebook/notebook-sections/compare | 85 + .../metrics/notebook/notebook-sections/header | 12 + .../metrics/notebook/notebook-sections/scatterplot | 15 + .../mozperftest/metrics/notebook/perftestetl.py | 185 + .../metrics/notebook/perftestnotebook.py | 79 + .../metrics/notebook/template_upload_file.html | 39 + .../mozperftest/metrics/notebook/transformer.py | 228 + .../metrics/notebook/transforms/__init__.py | 0 .../metrics/notebook/transforms/logcattime.py | 121 + .../metrics/notebook/transforms/single_json.py | 36 + .../mozperftest/metrics/notebook/utilities.py | 63 + .../mozperftest/metrics/notebookupload.py | 115 + .../mozperftest/metrics/perfboard/__init__.py | 3 + .../mozperftest/metrics/perfboard/dashboard.json | 56 + .../mozperftest/metrics/perfboard/grafana.py | 87 + .../mozperftest/metrics/perfboard/influx.py | 188 + .../mozperftest/metrics/perfboard/panel.json | 81 + .../mozperftest/metrics/perfboard/target.json | 20 + .../mozperftest/mozperftest/metrics/perfherder.py | 341 ++ python/mozperftest/mozperftest/metrics/utils.py | 142 + .../mozperftest/metrics/visualmetrics.py | 221 + python/mozperftest/mozperftest/runner.py | 283 + .../schemas/intermediate-results-schema.json | 113 + .../mozperftest/schemas/transformer_schema.json | 55 + python/mozperftest/mozperftest/script.py | 269 + python/mozperftest/mozperftest/system/__init__.py | 35 + python/mozperftest/mozperftest/system/android.py | 219 + .../mozperftest/system/android_perf_tuner.py | 193 + .../mozperftest/system/android_startup.py | 404 ++ python/mozperftest/mozperftest/system/example.zip | Bin 0 -> 6588776 bytes python/mozperftest/mozperftest/system/macos.py | 120 + .../mozperftest/mozperftest/system/pingserver.py | 94 + python/mozperftest/mozperftest/system/profile.py | 122 + python/mozperftest/mozperftest/system/proxy.py | 232 + python/mozperftest/mozperftest/test/__init__.py | 25 + python/mozperftest/mozperftest/test/androidlog.py | 62 + .../mozperftest/test/browsertime/__init__.py | 19 + .../mozperftest/test/browsertime/package-lock.json | 1874 +++++++ .../mozperftest/test/browsertime/package.json | 12 + .../mozperftest/test/browsertime/runner.py | 472 ++ .../mozperftest/test/browsertime/visualtools.py | 196 + python/mozperftest/mozperftest/test/noderunner.py | 75 + python/mozperftest/mozperftest/test/webpagetest.py | 410 ++ python/mozperftest/mozperftest/test/xpcshell.py | 189 + python/mozperftest/mozperftest/tests/__init__.py | 1 + python/mozperftest/mozperftest/tests/conftest.py | 153 + .../mozperftest/tests/data/WPT_fakekey.txt | 0 .../browsertime-results-video/browsertime.json | 991 ++++ .../pages/www.bbc.com/data/video/1.mp4 | Bin 0 -> 212135 bytes .../world-middle-east-53598965/data/video/1.mp4 | Bin 0 -> 841128 bytes .../news/world-us-canada-53599363/data/video/1.mp4 | Bin 0 -> 510158 bytes .../data/browsertime-results/browsertime.json | 1 + .../perftest_doc_failure_example.js | 40 + .../mozperftest/mozperftest/tests/data/firefox.dmg | Bin 0 -> 18561 bytes .../mozperftest/tests/data/home_activity.txt | 2806 ++++++++++ python/mozperftest/mozperftest/tests/data/hook.py | 7 + .../mozperftest/tests/data/hook_raises.py | 3 + .../mozperftest/tests/data/hook_resume.py | 3 + .../mozperftest/tests/data/hooks_iteration.py | 2 + .../mozperftest/tests/data/hooks_state.py | 11 + python/mozperftest/mozperftest/tests/data/logcat | 5511 ++++++++++++++++++++ .../mozperftest/tests/data/mozinfo.json | 1 + .../test_transformer_1.py | 6 + .../test_transformer_1_copy.py | 6 + .../test_transformer_perftestetl_plugin_1.py | 6 + .../test_transformer_perftestetl_plugin_2.py | 6 + .../mozperftest/tests/data/samples/head.js | 7 + .../tests/data/samples/perftest_example.js | 46 + .../data/samples/test_perftest_WPT_init_file.js | 114 + .../data/samples/test_perftest_android_startup.js | 34 + .../tests/data/samples/test_xpcshell.js | 39 + .../tests/data/samples/test_xpcshell_flavor2.js | 35 + .../mozperftest/tests/data/samples/xpcshell.ini | 5 + python/mozperftest/mozperftest/tests/data/xpcshell | 1 + .../mozperftest/tests/fetched_artifact.zip | Bin 0 -> 728 bytes python/mozperftest/mozperftest/tests/support.py | 120 + .../mozperftest/mozperftest/tests/test_android.py | 254 + .../mozperftest/tests/test_android_startup.py | 226 + .../mozperftest/tests/test_androidlog.py | 81 + .../mozperftest/tests/test_argparser.py | 160 + .../mozperftest/tests/test_browsertime.py | 364 ++ .../mozperftest/tests/test_consoleoutput.py | 36 + .../mozperftest/mozperftest/tests/test_constant.py | 13 + .../mozperftest/tests/test_environment.py | 158 + python/mozperftest/mozperftest/tests/test_fzf.py | 59 + .../mozperftest/mozperftest/tests/test_influx.py | 121 + .../mozperftest/tests/test_ir_schema.py | 103 + .../mozperftest/mozperftest/tests/test_layers.py | 88 + .../mozperftest/tests/test_logcat_transformer.py | 125 + .../mozperftest/tests/test_mach_commands.py | 311 ++ python/mozperftest/mozperftest/tests/test_macos.py | 94 + .../mozperftest/tests/test_metrics_utils.py | 97 + .../mozperftest/tests/test_notebookupload.py | 121 + .../mozperftest/tests/test_perfherder.py | 579 ++ .../mozperftest/tests/test_perftestetl.py | 90 + .../mozperftest/tests/test_perftestnotebook.py | 76 + .../mozperftest/tests/test_pingserver.py | 38 + .../mozperftest/mozperftest/tests/test_profile.py | 52 + python/mozperftest/mozperftest/tests/test_proxy.py | 231 + .../mozperftest/mozperftest/tests/test_runner.py | 48 + .../mozperftest/mozperftest/tests/test_script.py | 99 + .../tests/test_single_json_transformer.py | 80 + .../mozperftest/tests/test_transformer.py | 161 + python/mozperftest/mozperftest/tests/test_utils.py | 233 + .../mozperftest/tests/test_visualmetrics.py | 103 + .../mozperftest/tests/test_visualtools.py | 47 + .../mozperftest/tests/test_webpagetest.py | 271 + .../mozperftest/mozperftest/tests/test_xpcshell.py | 164 + python/mozperftest/mozperftest/utils.py | 478 ++ python/mozperftest/perfdocs/config.yml | 44 + python/mozperftest/perfdocs/developing.rst | 154 + python/mozperftest/perfdocs/index.rst | 20 + python/mozperftest/perfdocs/running.rst | 46 + python/mozperftest/perfdocs/tools.rst | 21 + python/mozperftest/perfdocs/vision.rst | 66 + python/mozperftest/perfdocs/writing.rst | 176 + python/mozperftest/setup.cfg | 2 + python/mozperftest/setup.py | 37 + python/mozrelease/.isort.cfg | 3 + python/mozrelease/mozrelease/__init__.py | 0 python/mozrelease/mozrelease/balrog.py | 72 + python/mozrelease/mozrelease/buglist_creator.py | 262 + python/mozrelease/mozrelease/chunking.py | 27 + python/mozrelease/mozrelease/l10n.py | 17 + python/mozrelease/mozrelease/mach_commands.py | 141 + .../mozrelease/mozrelease/partner_attribution.py | 190 + python/mozrelease/mozrelease/partner_repack.py | 890 ++++ python/mozrelease/mozrelease/paths.py | 85 + python/mozrelease/mozrelease/platforms.py | 54 + .../mozrelease/mozrelease/scriptworker_canary.py | 108 + python/mozrelease/mozrelease/update_verify.py | 275 + python/mozrelease/mozrelease/util.py | 26 + python/mozrelease/mozrelease/versions.py | 114 + python/mozrelease/setup.py | 25 + .../test/data/Firefox-62.0.3.update.json | 74 + .../test/data/Firefox-62.0b11-update.json | 74 + .../test/data/Firefox-64.0b13.update.json | 9 + .../mozrelease/test/data/buglist_changesets.json | 94 + .../mozrelease/test/data/sample-update-verify.cfg | 4 + python/mozrelease/test/data/whatsnew-62.0.3.yml | 65 + python/mozrelease/test/data/whatsnew-release.yml | 65 + python/mozrelease/test/python.ini | 7 + python/mozrelease/test/test_balrog.py | 54 + python/mozrelease/test/test_buglist_creator.py | 178 + python/mozrelease/test/test_update_verify.py | 425 ++ python/mozrelease/test/test_versions.py | 101 + python/mozterm/.isort.cfg | 3 + python/mozterm/mozterm/__init__.py | 4 + python/mozterm/mozterm/terminal.py | 50 + python/mozterm/mozterm/widgets.py | 67 + python/mozterm/setup.cfg | 2 + python/mozterm/setup.py | 30 + python/mozterm/test/python.ini | 5 + python/mozterm/test/test_terminal.py | 35 + python/mozterm/test/test_widgets.py | 51 + python/mozversioncontrol/.isort.cfg | 3 + .../mozversioncontrol/__init__.py | 827 +++ .../mozversioncontrol/repoupdate.py | 37 + python/mozversioncontrol/setup.py | 28 + python/mozversioncontrol/test/conftest.py | 84 + python/mozversioncontrol/test/python.ini | 10 + python/mozversioncontrol/test/test_branch.py | 57 + python/mozversioncontrol/test/test_commit.py | 72 + .../mozversioncontrol/test/test_context_manager.py | 28 + python/mozversioncontrol/test/test_push_to_try.py | 81 + python/mozversioncontrol/test/test_update.py | 63 + .../test/test_workdir_outgoing.py | 108 + .../test/test_working_directory.py | 46 + python/sites/build.txt | 2 + python/sites/common.txt | 1 + python/sites/docs.txt | 60 + python/sites/ipython.txt | 1 + python/sites/lint.txt | 2 + python/sites/mach.txt | 144 + python/sites/perftest-side-by-side.txt | 2 + python/sites/perftest-test.txt | 2 + python/sites/python-test.txt | 2 + python/sites/upload-generated-sources.txt | 1 + python/sites/vendor.txt | 4 + python/sites/watch.txt | 1 + python/sites/webcompat.txt | 5 + python/sites/wpt.txt | 3 + 1338 files changed, 147295 insertions(+) create mode 100644 python/README create mode 100644 python/docs/index.rst create mode 100644 python/gdbpp/gdbpp/__init__.py create mode 100644 python/gdbpp/gdbpp/enumset.py create mode 100644 python/gdbpp/gdbpp/linkedlist.py create mode 100644 python/gdbpp/gdbpp/owningthread.py create mode 100644 python/gdbpp/gdbpp/smartptr.py create mode 100644 python/gdbpp/gdbpp/string.py create mode 100644 python/gdbpp/gdbpp/tarray.py create mode 100644 python/gdbpp/gdbpp/thashtable.py create mode 100644 python/l10n/fluent_migrations/__init__.py create mode 100644 python/l10n/fluent_migrations/bug_1347955_aboutLogging.py create mode 100644 python/l10n/fluent_migrations/bug_1552333_aboutCertError.py create mode 100644 python/l10n/fluent_migrations/bug_1577257_profiler_title.py create mode 100644 python/l10n/fluent_migrations/bug_1635548_browser_context.py create mode 100644 python/l10n/fluent_migrations/bug_1760029_tabbrowser.py create mode 100644 python/l10n/fluent_migrations/bug_1780585_pipFocusedstate.py create mode 100644 python/l10n/fluent_migrations/bug_1786186_mobile_aboutConfig.py create mode 100644 python/l10n/fluent_migrations/bug_1790387_featureCallout_a11y.py create mode 100644 python/l10n/fluent_migrations/bug_1791178_downloadUI.py create mode 100644 python/l10n/fluent_migrations/bug_1791178_downloadUtils.py create mode 100644 python/l10n/fluent_migrations/bug_1791178_nsContextMenu_saveHelper.py create mode 100644 python/l10n/fluent_migrations/bug_1793572_webrtc.py create mode 100644 python/l10n/fluent_migrations/bug_1801035_places_window_no_size.py create mode 100644 python/l10n/fluent_migrations/bug_1801915_confirmationHints.py create mode 100644 python/l10n/fluent_migrations/bug_1802128_langpack_defines.py create mode 100644 python/l10n/fluent_migrations/bug_1803010_downloads.py create mode 100644 python/l10n/fluent_migrations/bug_1805319_webrtc_indicator_typo.py create mode 100644 python/l10n/mozxchannel/__init__.py create mode 100644 python/l10n/mozxchannel/projectconfig.py create mode 100644 python/l10n/mozxchannel/source.py create mode 100644 python/l10n/test_fluent_migrations/__init__.py create mode 100644 python/l10n/test_fluent_migrations/fmt.py create mode 100644 python/lldbutils/.isort.cfg create mode 100644 python/lldbutils/README.txt create mode 100644 python/lldbutils/lldbutils/__init__.py create mode 100644 python/lldbutils/lldbutils/content.py create mode 100644 python/lldbutils/lldbutils/general.py create mode 100644 python/lldbutils/lldbutils/gfx.py create mode 100644 python/lldbutils/lldbutils/layout.py create mode 100644 python/lldbutils/lldbutils/utils.py create mode 100644 python/mach/.isort.cfg create mode 100644 python/mach/README.rst create mode 100644 python/mach/bash-completion.sh create mode 100644 python/mach/docs/commands.rst create mode 100644 python/mach/docs/driver.rst create mode 100644 python/mach/docs/faq.rst create mode 100644 python/mach/docs/index.rst create mode 100644 python/mach/docs/logging.rst create mode 100644 python/mach/docs/metrics.md create mode 100644 python/mach/docs/settings.rst create mode 100644 python/mach/docs/telemetry.rst create mode 100644 python/mach/docs/usage.rst create mode 100644 python/mach/docs/windows-usage-outside-mozillabuild.rst create mode 100644 python/mach/mach/__init__.py create mode 100644 python/mach/mach/base.py create mode 100644 python/mach/mach/commands/__init__.py create mode 100644 python/mach/mach/commands/commandinfo.py create mode 100644 python/mach/mach/commands/completion_templates/bash.template create mode 100644 python/mach/mach/commands/completion_templates/fish.template create mode 100644 python/mach/mach/commands/completion_templates/zsh.template create mode 100644 python/mach/mach/commands/settings.py create mode 100644 python/mach/mach/config.py create mode 100644 python/mach/mach/decorators.py create mode 100644 python/mach/mach/dispatcher.py create mode 100644 python/mach/mach/logging.py create mode 100644 python/mach/mach/main.py create mode 100644 python/mach/mach/mixin/__init__.py create mode 100644 python/mach/mach/mixin/logging.py create mode 100644 python/mach/mach/mixin/process.py create mode 100644 python/mach/mach/python_lockfile.py create mode 100644 python/mach/mach/registrar.py create mode 100644 python/mach/mach/requirements.py create mode 100644 python/mach/mach/sentry.py create mode 100644 python/mach/mach/site.py create mode 100644 python/mach/mach/telemetry.py create mode 100644 python/mach/mach/telemetry_interface.py create mode 100644 python/mach/mach/terminal.py create mode 100644 python/mach/mach/test/__init__.py create mode 100644 python/mach/mach/test/conftest.py create mode 100644 python/mach/mach/test/invoke_mach_command.py create mode 100644 python/mach/mach/test/providers/__init__.py create mode 100644 python/mach/mach/test/providers/basic.py create mode 100644 python/mach/mach/test/providers/commands.py create mode 100644 python/mach/mach/test/providers/conditions.py create mode 100644 python/mach/mach/test/providers/conditions_invalid.py create mode 100644 python/mach/mach/test/providers/throw.py create mode 100644 python/mach/mach/test/providers/throw2.py create mode 100644 python/mach/mach/test/python.ini create mode 100644 python/mach/mach/test/script_site_activation.py create mode 100644 python/mach/mach/test/test_commands.py create mode 100644 python/mach/mach/test/test_conditions.py create mode 100644 python/mach/mach/test/test_config.py create mode 100644 python/mach/mach/test/test_decorators.py create mode 100644 python/mach/mach/test/test_dispatcher.py create mode 100644 python/mach/mach/test/test_entry_point.py create mode 100644 python/mach/mach/test/test_error_output.py create mode 100644 python/mach/mach/test/test_logger.py create mode 100644 python/mach/mach/test/test_mach.py create mode 100644 python/mach/mach/test/test_site.py create mode 100644 python/mach/mach/test/test_site_activation.py create mode 100644 python/mach/mach/test/test_site_compatibility.py create mode 100644 python/mach/mach/test/zero_microseconds.py create mode 100644 python/mach/mach/util.py create mode 100644 python/mach/metrics.yaml create mode 100644 python/mach/pings.yaml create mode 100644 python/mach/setup.cfg create mode 100644 python/mach/setup.py create mode 100644 python/mach_commands.py create mode 100644 python/moz.build create mode 100644 python/mozboot/.isort.cfg create mode 100644 python/mozboot/README.rst create mode 100755 python/mozboot/bin/bootstrap.py create mode 100644 python/mozboot/mozboot/__init__.py create mode 100644 python/mozboot/mozboot/android-avds/arm.json create mode 100644 python/mozboot/mozboot/android-avds/arm64.json create mode 100644 python/mozboot/mozboot/android-avds/x86_64.json create mode 100644 python/mozboot/mozboot/android-emulator-packages.txt create mode 100644 python/mozboot/mozboot/android-packages.txt create mode 100644 python/mozboot/mozboot/android-system-images-packages.txt create mode 100644 python/mozboot/mozboot/android.py create mode 100644 python/mozboot/mozboot/archlinux.py create mode 100644 python/mozboot/mozboot/base.py create mode 100644 python/mozboot/mozboot/bootstrap.py create mode 100644 python/mozboot/mozboot/centosfedora.py create mode 100644 python/mozboot/mozboot/debian.py create mode 100644 python/mozboot/mozboot/freebsd.py create mode 100644 python/mozboot/mozboot/gentoo.py create mode 100644 python/mozboot/mozboot/linux_common.py create mode 100644 python/mozboot/mozboot/mach_commands.py create mode 100644 python/mozboot/mozboot/mozconfig.py create mode 100644 python/mozboot/mozboot/mozillabuild.py create mode 100644 python/mozboot/mozboot/openbsd.py create mode 100644 python/mozboot/mozboot/opensuse.py create mode 100644 python/mozboot/mozboot/osx.py create mode 100644 python/mozboot/mozboot/rust.py create mode 100644 python/mozboot/mozboot/sccache.py create mode 100644 python/mozboot/mozboot/solus.py create mode 100644 python/mozboot/mozboot/static_analysis.py create mode 100644 python/mozboot/mozboot/test/python.ini create mode 100644 python/mozboot/mozboot/test/test_mozconfig.py create mode 100644 python/mozboot/mozboot/util.py create mode 100644 python/mozboot/mozboot/void.py create mode 100644 python/mozboot/mozboot/windows.py create mode 100644 python/mozboot/setup.py create mode 100644 python/mozbuild/.isort.cfg create mode 100644 python/mozbuild/metrics.yaml create mode 100644 python/mozbuild/mozbuild/__init__.py create mode 100644 python/mozbuild/mozbuild/action/__init__.py create mode 100644 python/mozbuild/mozbuild/action/buildlist.py create mode 100644 python/mozbuild/mozbuild/action/check_binary.py create mode 100644 python/mozbuild/mozbuild/action/download_wpt_manifest.py create mode 100644 python/mozbuild/mozbuild/action/dump_env.py create mode 100644 python/mozbuild/mozbuild/action/dumpsymbols.py create mode 100644 python/mozbuild/mozbuild/action/exe_7z_archive.py create mode 100644 python/mozbuild/mozbuild/action/fat_aar.py create mode 100644 python/mozbuild/mozbuild/action/file_generate.py create mode 100644 python/mozbuild/mozbuild/action/generate_symbols_file.py create mode 100644 python/mozbuild/mozbuild/action/html_fragment_preprocesor.py create mode 100644 python/mozbuild/mozbuild/action/install.py create mode 100644 python/mozbuild/mozbuild/action/jar_maker.py create mode 100644 python/mozbuild/mozbuild/action/l10n_merge.py create mode 100644 python/mozbuild/mozbuild/action/langpack_localeNames.json create mode 100644 python/mozbuild/mozbuild/action/langpack_manifest.py create mode 100644 python/mozbuild/mozbuild/action/make_dmg.py create mode 100644 python/mozbuild/mozbuild/action/make_unzip.py create mode 100644 python/mozbuild/mozbuild/action/node.py create mode 100644 python/mozbuild/mozbuild/action/package_generated_sources.py create mode 100644 python/mozbuild/mozbuild/action/preprocessor.py create mode 100644 python/mozbuild/mozbuild/action/process_define_files.py create mode 100644 python/mozbuild/mozbuild/action/process_install_manifest.py create mode 100644 python/mozbuild/mozbuild/action/symbols_archive.py create mode 100644 python/mozbuild/mozbuild/action/test_archive.py create mode 100755 python/mozbuild/mozbuild/action/tooltool.py create mode 100644 python/mozbuild/mozbuild/action/unify_symbols.py create mode 100644 python/mozbuild/mozbuild/action/unify_tests.py create mode 100644 python/mozbuild/mozbuild/action/unpack_dmg.py create mode 100644 python/mozbuild/mozbuild/action/util.py create mode 100644 python/mozbuild/mozbuild/action/webidl.py create mode 100644 python/mozbuild/mozbuild/action/wrap_rustc.py create mode 100644 python/mozbuild/mozbuild/action/xpccheck.py create mode 100755 python/mozbuild/mozbuild/action/xpidl-process.py create mode 100644 python/mozbuild/mozbuild/action/zip.py create mode 100644 python/mozbuild/mozbuild/analyze/__init__.py create mode 100644 python/mozbuild/mozbuild/analyze/hg.py create mode 100644 python/mozbuild/mozbuild/android_version_code.py create mode 100644 python/mozbuild/mozbuild/artifact_builds.py create mode 100644 python/mozbuild/mozbuild/artifact_cache.py create mode 100644 python/mozbuild/mozbuild/artifact_commands.py create mode 100644 python/mozbuild/mozbuild/artifacts.py create mode 100644 python/mozbuild/mozbuild/backend/__init__.py create mode 100644 python/mozbuild/mozbuild/backend/base.py create mode 100644 python/mozbuild/mozbuild/backend/cargo_build_defs.py create mode 100644 python/mozbuild/mozbuild/backend/clangd.py create mode 100644 python/mozbuild/mozbuild/backend/common.py create mode 100644 python/mozbuild/mozbuild/backend/configenvironment.py create mode 100644 python/mozbuild/mozbuild/backend/cpp_eclipse.py create mode 100644 python/mozbuild/mozbuild/backend/fastermake.py create mode 100644 python/mozbuild/mozbuild/backend/mach_commands.py create mode 100644 python/mozbuild/mozbuild/backend/make.py create mode 100644 python/mozbuild/mozbuild/backend/recursivemake.py create mode 100644 python/mozbuild/mozbuild/backend/static_analysis.py create mode 100644 python/mozbuild/mozbuild/backend/test_manifest.py create mode 100644 python/mozbuild/mozbuild/backend/visualstudio.py create mode 100644 python/mozbuild/mozbuild/base.py create mode 100644 python/mozbuild/mozbuild/bootstrap.py create mode 100644 python/mozbuild/mozbuild/build_commands.py create mode 100644 python/mozbuild/mozbuild/chunkify.py create mode 100644 python/mozbuild/mozbuild/code_analysis/__init__.py create mode 100644 python/mozbuild/mozbuild/code_analysis/mach_commands.py create mode 100644 python/mozbuild/mozbuild/code_analysis/moz.build create mode 100644 python/mozbuild/mozbuild/code_analysis/utils.py create mode 100644 python/mozbuild/mozbuild/codecoverage/__init__.py create mode 100644 python/mozbuild/mozbuild/codecoverage/chrome_map.py create mode 100644 python/mozbuild/mozbuild/codecoverage/lcov_rewriter.py create mode 100644 python/mozbuild/mozbuild/codecoverage/manifest_handler.py create mode 100644 python/mozbuild/mozbuild/codecoverage/packager.py create mode 100644 python/mozbuild/mozbuild/compilation/__init__.py create mode 100644 python/mozbuild/mozbuild/compilation/codecomplete.py create mode 100644 python/mozbuild/mozbuild/compilation/database.py create mode 100644 python/mozbuild/mozbuild/compilation/util.py create mode 100644 python/mozbuild/mozbuild/compilation/warnings.py create mode 100644 python/mozbuild/mozbuild/config_status.py create mode 100644 python/mozbuild/mozbuild/configure/__init__.py create mode 100644 python/mozbuild/mozbuild/configure/check_debug_ranges.py create mode 100644 python/mozbuild/mozbuild/configure/constants.py create mode 100644 python/mozbuild/mozbuild/configure/help.py create mode 100644 python/mozbuild/mozbuild/configure/lint.py create mode 100644 python/mozbuild/mozbuild/configure/options.py create mode 100644 python/mozbuild/mozbuild/configure/util.py create mode 100644 python/mozbuild/mozbuild/controller/__init__.py create mode 100644 python/mozbuild/mozbuild/controller/building.py create mode 100644 python/mozbuild/mozbuild/controller/clobber.py create mode 100644 python/mozbuild/mozbuild/doctor.py create mode 100644 python/mozbuild/mozbuild/dotproperties.py create mode 100644 python/mozbuild/mozbuild/faster_daemon.py create mode 100644 python/mozbuild/mozbuild/frontend/__init__.py create mode 100644 python/mozbuild/mozbuild/frontend/context.py create mode 100644 python/mozbuild/mozbuild/frontend/data.py create mode 100644 python/mozbuild/mozbuild/frontend/emitter.py create mode 100644 python/mozbuild/mozbuild/frontend/gyp_reader.py create mode 100644 python/mozbuild/mozbuild/frontend/mach_commands.py create mode 100644 python/mozbuild/mozbuild/frontend/reader.py create mode 100644 python/mozbuild/mozbuild/frontend/sandbox.py create mode 100644 python/mozbuild/mozbuild/gen_test_backend.py create mode 100644 python/mozbuild/mozbuild/generated_sources.py create mode 100644 python/mozbuild/mozbuild/gn_processor.py create mode 100644 python/mozbuild/mozbuild/html_build_viewer.py create mode 100644 python/mozbuild/mozbuild/jar.py create mode 100644 python/mozbuild/mozbuild/mach_commands.py create mode 100644 python/mozbuild/mozbuild/makeutil.py create mode 100644 python/mozbuild/mozbuild/mozconfig.py create mode 100755 python/mozbuild/mozbuild/mozconfig_loader create mode 100644 python/mozbuild/mozbuild/mozinfo.py create mode 100644 python/mozbuild/mozbuild/nodeutil.py create mode 100644 python/mozbuild/mozbuild/preprocessor.py create mode 100644 python/mozbuild/mozbuild/pythonutil.py create mode 100644 python/mozbuild/mozbuild/repackaging/__init__.py create mode 100644 python/mozbuild/mozbuild/repackaging/application_ini.py create mode 100644 python/mozbuild/mozbuild/repackaging/deb.py create mode 100644 python/mozbuild/mozbuild/repackaging/dmg.py create mode 100644 python/mozbuild/mozbuild/repackaging/installer.py create mode 100644 python/mozbuild/mozbuild/repackaging/mar.py create mode 100644 python/mozbuild/mozbuild/repackaging/msi.py create mode 100644 python/mozbuild/mozbuild/repackaging/msix.py create mode 100644 python/mozbuild/mozbuild/repackaging/pkg.py create mode 100644 python/mozbuild/mozbuild/repackaging/test/python.ini create mode 100644 python/mozbuild/mozbuild/repackaging/test/test_msix.py create mode 100644 python/mozbuild/mozbuild/resources/html-build-viewer/build_resources.html create mode 100644 python/mozbuild/mozbuild/schedules.py create mode 100644 python/mozbuild/mozbuild/settings.py create mode 100644 python/mozbuild/mozbuild/shellutil.py create mode 100644 python/mozbuild/mozbuild/sphinx.py create mode 100644 python/mozbuild/mozbuild/telemetry.py create mode 100644 python/mozbuild/mozbuild/test/__init__.py create mode 100644 python/mozbuild/mozbuild/test/action/data/html_fragment_preprocesor/example_basic.xml create mode 100644 python/mozbuild/mozbuild/test/action/data/html_fragment_preprocesor/example_multiple_templates.xml create mode 100644 python/mozbuild/mozbuild/test/action/data/html_fragment_preprocesor/example_xul.xml create mode 100644 python/mozbuild/mozbuild/test/action/data/invalid/region.properties create mode 100644 python/mozbuild/mozbuild/test/action/data/node/node-test-script.js create mode 100644 python/mozbuild/mozbuild/test/action/test_buildlist.py create mode 100644 python/mozbuild/mozbuild/test/action/test_html_fragment_preprocessor.py create mode 100644 python/mozbuild/mozbuild/test/action/test_langpack_manifest.py create mode 100644 python/mozbuild/mozbuild/test/action/test_node.py create mode 100644 python/mozbuild/mozbuild/test/action/test_process_install_manifest.py create mode 100644 python/mozbuild/mozbuild/test/backend/__init__.py create mode 100644 python/mozbuild/mozbuild/test/backend/common.py create mode 100644 python/mozbuild/mozbuild/test/backend/data/build/app/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/build/bar.ini create mode 100644 python/mozbuild/mozbuild/test/backend/data/build/bar.js create mode 100644 python/mozbuild/mozbuild/test/backend/data/build/bar.jsm create mode 100644 python/mozbuild/mozbuild/test/backend/data/build/baz.ini create mode 100644 python/mozbuild/mozbuild/test/backend/data/build/baz.jsm create mode 100644 python/mozbuild/mozbuild/test/backend/data/build/components.manifest create mode 100644 python/mozbuild/mozbuild/test/backend/data/build/foo.css create mode 100644 python/mozbuild/mozbuild/test/backend/data/build/foo.ini create mode 100644 python/mozbuild/mozbuild/test/backend/data/build/foo.js create mode 100644 python/mozbuild/mozbuild/test/backend/data/build/foo.jsm create mode 100644 python/mozbuild/mozbuild/test/backend/data/build/jar.mn create mode 100644 python/mozbuild/mozbuild/test/backend/data/build/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/build/prefs.js create mode 100644 python/mozbuild/mozbuild/test/backend/data/build/qux.ini create mode 100644 python/mozbuild/mozbuild/test/backend/data/build/qux.jsm create mode 100644 python/mozbuild/mozbuild/test/backend/data/build/resource create mode 100644 python/mozbuild/mozbuild/test/backend/data/build/resource2 create mode 100644 python/mozbuild/mozbuild/test/backend/data/build/subdir/bar.js create mode 100644 python/mozbuild/mozbuild/test/backend/data/database/bar.c create mode 100644 python/mozbuild/mozbuild/test/backend/data/database/baz.cpp create mode 100644 python/mozbuild/mozbuild/test/backend/data/database/build/non-unified-compat create mode 100644 python/mozbuild/mozbuild/test/backend/data/database/foo.c create mode 100644 python/mozbuild/mozbuild/test/backend/data/database/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/database/qux.cpp create mode 100644 python/mozbuild/mozbuild/test/backend/data/defines/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/dist-files/install.rdf create mode 100644 python/mozbuild/mozbuild/test/backend/data/dist-files/main.js create mode 100644 python/mozbuild/mozbuild/test/backend/data/dist-files/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/exports-generated/dom1.h create mode 100644 python/mozbuild/mozbuild/test/backend/data/exports-generated/foo.h create mode 100644 python/mozbuild/mozbuild/test/backend/data/exports-generated/gfx.h create mode 100644 python/mozbuild/mozbuild/test/backend/data/exports-generated/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/exports-generated/mozilla1.h create mode 100644 python/mozbuild/mozbuild/test/backend/data/exports/dom1.h create mode 100644 python/mozbuild/mozbuild/test/backend/data/exports/dom2.h create mode 100644 python/mozbuild/mozbuild/test/backend/data/exports/foo.h create mode 100644 python/mozbuild/mozbuild/test/backend/data/exports/gfx.h create mode 100644 python/mozbuild/mozbuild/test/backend/data/exports/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/exports/mozilla1.h create mode 100644 python/mozbuild/mozbuild/test/backend/data/exports/mozilla2.h create mode 100644 python/mozbuild/mozbuild/test/backend/data/exports/pprio.h create mode 100644 python/mozbuild/mozbuild/test/backend/data/final-target-files-wildcard/bar.xyz create mode 100644 python/mozbuild/mozbuild/test/backend/data/final-target-files-wildcard/foo.xyz create mode 100644 python/mozbuild/mozbuild/test/backend/data/final-target-files-wildcard/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/final_target/both/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/final_target/dist-subdir/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/final_target/final-target/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/final_target/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/final_target/xpi-name/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/generated-files-force/foo-data create mode 100644 python/mozbuild/mozbuild/test/backend/data/generated-files-force/generate-bar.py create mode 100644 python/mozbuild/mozbuild/test/backend/data/generated-files-force/generate-foo.py create mode 100644 python/mozbuild/mozbuild/test/backend/data/generated-files-force/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/generated-files/foo-data create mode 100644 python/mozbuild/mozbuild/test/backend/data/generated-files/generate-bar.py create mode 100644 python/mozbuild/mozbuild/test/backend/data/generated-files/generate-foo.py create mode 100644 python/mozbuild/mozbuild/test/backend/data/generated-files/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/generated_includes/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/host-defines/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/host-rust-library-features/Cargo.toml create mode 100644 python/mozbuild/mozbuild/test/backend/data/host-rust-library-features/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/host-rust-library/Cargo.toml create mode 100644 python/mozbuild/mozbuild/test/backend/data/host-rust-library/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/install_substitute_config_files/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/install_substitute_config_files/sub/foo.h.in create mode 100644 python/mozbuild/mozbuild/test/backend/data/install_substitute_config_files/sub/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/ipdl_sources/bar/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/ipdl_sources/foo/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/ipdl_sources/ipdl/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/ipdl_sources/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/jar-manifests/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/linkage/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/linkage/prog/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/linkage/prog/qux/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/linkage/prog/qux/qux1.c create mode 100644 python/mozbuild/mozbuild/test/backend/data/linkage/real/foo/foo1.c create mode 100644 python/mozbuild/mozbuild/test/backend/data/linkage/real/foo/foo2.c create mode 100644 python/mozbuild/mozbuild/test/backend/data/linkage/real/foo/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/linkage/real/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/linkage/shared/baz/baz1.c create mode 100644 python/mozbuild/mozbuild/test/backend/data/linkage/shared/baz/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/linkage/shared/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/linkage/static/bar/bar1.cc create mode 100644 python/mozbuild/mozbuild/test/backend/data/linkage/static/bar/bar2.cc create mode 100644 python/mozbuild/mozbuild/test/backend/data/linkage/static/bar/bar_helper/bar_helper1.cpp create mode 100644 python/mozbuild/mozbuild/test/backend/data/linkage/static/bar/bar_helper/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/linkage/static/bar/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/linkage/static/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/linkage/templates.mozbuild create mode 100644 python/mozbuild/mozbuild/test/backend/data/local_includes/bar/baz/dummy_file_for_nonempty_directory create mode 100644 python/mozbuild/mozbuild/test/backend/data/local_includes/foo/dummy_file_for_nonempty_directory create mode 100644 python/mozbuild/mozbuild/test/backend/data/local_includes/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/localized-files/en-US/bar.ini create mode 100644 python/mozbuild/mozbuild/test/backend/data/localized-files/en-US/foo.js create mode 100644 python/mozbuild/mozbuild/test/backend/data/localized-files/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/localized-generated-files-AB_CD/en-US/localized-input create mode 100644 python/mozbuild/mozbuild/test/backend/data/localized-generated-files-AB_CD/foo-data create mode 100644 python/mozbuild/mozbuild/test/backend/data/localized-generated-files-AB_CD/generate-foo.py create mode 100644 python/mozbuild/mozbuild/test/backend/data/localized-generated-files-AB_CD/inner/locales/en-US/localized-input create mode 100644 python/mozbuild/mozbuild/test/backend/data/localized-generated-files-AB_CD/locales/en-US/localized-input create mode 100644 python/mozbuild/mozbuild/test/backend/data/localized-generated-files-AB_CD/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/localized-generated-files-AB_CD/non-localized-input create mode 100644 python/mozbuild/mozbuild/test/backend/data/localized-generated-files-force/en-US/localized-input create mode 100644 python/mozbuild/mozbuild/test/backend/data/localized-generated-files-force/foo-data create mode 100644 python/mozbuild/mozbuild/test/backend/data/localized-generated-files-force/generate-foo.py create mode 100644 python/mozbuild/mozbuild/test/backend/data/localized-generated-files-force/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/localized-generated-files-force/non-localized-input create mode 100644 python/mozbuild/mozbuild/test/backend/data/localized-generated-files/en-US/localized-input create mode 100644 python/mozbuild/mozbuild/test/backend/data/localized-generated-files/foo-data create mode 100644 python/mozbuild/mozbuild/test/backend/data/localized-generated-files/generate-foo.py create mode 100644 python/mozbuild/mozbuild/test/backend/data/localized-generated-files/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/localized-generated-files/non-localized-input create mode 100644 python/mozbuild/mozbuild/test/backend/data/localized-pp-files/en-US/bar.ini create mode 100644 python/mozbuild/mozbuild/test/backend/data/localized-pp-files/en-US/foo.js create mode 100644 python/mozbuild/mozbuild/test/backend/data/localized-pp-files/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/prog-lib-c-only/c-library/c-library.c create mode 100644 python/mozbuild/mozbuild/test/backend/data/prog-lib-c-only/c-library/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/prog-lib-c-only/c-program/c_test_program.c create mode 100644 python/mozbuild/mozbuild/test/backend/data/prog-lib-c-only/c-program/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/prog-lib-c-only/c-simple-programs/c_simple_program.c create mode 100644 python/mozbuild/mozbuild/test/backend/data/prog-lib-c-only/c-simple-programs/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/prog-lib-c-only/cxx-library/c-source.c create mode 100644 python/mozbuild/mozbuild/test/backend/data/prog-lib-c-only/cxx-library/cxx-library.cpp create mode 100644 python/mozbuild/mozbuild/test/backend/data/prog-lib-c-only/cxx-library/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/prog-lib-c-only/cxx-program/cxx_test_program.cpp create mode 100644 python/mozbuild/mozbuild/test/backend/data/prog-lib-c-only/cxx-program/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/prog-lib-c-only/cxx-simple-programs/cxx_simple_program.cpp create mode 100644 python/mozbuild/mozbuild/test/backend/data/prog-lib-c-only/cxx-simple-programs/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/prog-lib-c-only/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/prog-lib-c-only/simple-programs/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/program-paths/dist-bin/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/program-paths/dist-subdir/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/program-paths/final-target/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/program-paths/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/program-paths/not-installed/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/resources/bar.res.in create mode 100644 python/mozbuild/mozbuild/test/backend/data/resources/cursor.cur create mode 100644 python/mozbuild/mozbuild/test/backend/data/resources/desktop1.ttf create mode 100644 python/mozbuild/mozbuild/test/backend/data/resources/desktop2.ttf create mode 100644 python/mozbuild/mozbuild/test/backend/data/resources/extra.manifest create mode 100644 python/mozbuild/mozbuild/test/backend/data/resources/font1.ttf create mode 100644 python/mozbuild/mozbuild/test/backend/data/resources/font2.ttf create mode 100644 python/mozbuild/mozbuild/test/backend/data/resources/foo.res create mode 100644 python/mozbuild/mozbuild/test/backend/data/resources/mobile.ttf create mode 100644 python/mozbuild/mozbuild/test/backend/data/resources/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/resources/test.manifest create mode 100644 python/mozbuild/mozbuild/test/backend/data/rust-library-features/Cargo.toml create mode 100644 python/mozbuild/mozbuild/test/backend/data/rust-library-features/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/rust-library/Cargo.toml create mode 100644 python/mozbuild/mozbuild/test/backend/data/rust-library/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/rust-programs/code/Cargo.toml create mode 100644 python/mozbuild/mozbuild/test/backend/data/rust-programs/code/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/rust-programs/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/sources/bar.cpp create mode 100644 python/mozbuild/mozbuild/test/backend/data/sources/bar.s create mode 100644 python/mozbuild/mozbuild/test/backend/data/sources/baz.c create mode 100644 python/mozbuild/mozbuild/test/backend/data/sources/foo.asm create mode 100644 python/mozbuild/mozbuild/test/backend/data/sources/foo.cpp create mode 100644 python/mozbuild/mozbuild/test/backend/data/sources/fuga.mm create mode 100644 python/mozbuild/mozbuild/test/backend/data/sources/hoge.mm create mode 100644 python/mozbuild/mozbuild/test/backend/data/sources/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/sources/qux.c create mode 100644 python/mozbuild/mozbuild/test/backend/data/sources/titi.S create mode 100644 python/mozbuild/mozbuild/test/backend/data/sources/toto.S create mode 100644 python/mozbuild/mozbuild/test/backend/data/stub0/Makefile.in create mode 100644 python/mozbuild/mozbuild/test/backend/data/stub0/dir1/Makefile.in create mode 100644 python/mozbuild/mozbuild/test/backend/data/stub0/dir1/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/stub0/dir2/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/stub0/dir3/Makefile.in create mode 100644 python/mozbuild/mozbuild/test/backend/data/stub0/dir3/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/stub0/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/substitute_config_files/Makefile.in create mode 100644 python/mozbuild/mozbuild/test/backend/data/substitute_config_files/foo.in create mode 100644 python/mozbuild/mozbuild/test/backend/data/substitute_config_files/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifest-shared-support/child/another-file.sjs create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifest-shared-support/child/browser.ini create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifest-shared-support/child/data/one.txt create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifest-shared-support/child/data/two.txt create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifest-shared-support/child/test_sub.js create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifest-shared-support/mochitest.ini create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifest-shared-support/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifest-shared-support/support-file.txt create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifest-shared-support/test_foo.js create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifests-backend-sources/mochitest-common.ini create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifests-backend-sources/mochitest.ini create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifests-backend-sources/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifests-backend-sources/test_bar.js create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifests-backend-sources/test_foo.js create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifests-duplicate-support-files/mochitest1.ini create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifests-duplicate-support-files/mochitest2.ini create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifests-duplicate-support-files/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifests-duplicate-support-files/test_bar.js create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifests-duplicate-support-files/test_foo.js create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifests-package-tests/instrumentation.ini create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifests-package-tests/mochitest.ini create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifests-package-tests/mochitest.js create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifests-package-tests/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifests-package-tests/not_packaged.java create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifests-written/dir1/test_bar.js create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifests-written/dir1/xpcshell.ini create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifests-written/mochitest.ini create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifests-written/mochitest.js create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifests-written/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifests-written/xpcshell.ini create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-manifests-written/xpcshell.js create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-support-binaries-tracked/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-support-binaries-tracked/src/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-support-binaries-tracked/test/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-support-binaries-tracked/test/test-one.cpp create mode 100644 python/mozbuild/mozbuild/test/backend/data/test-support-binaries-tracked/test/test-two.cpp create mode 100644 python/mozbuild/mozbuild/test/backend/data/test_config/file.in create mode 100644 python/mozbuild/mozbuild/test/backend/data/test_config/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/variable_passthru/Makefile.in create mode 100644 python/mozbuild/mozbuild/test/backend/data/variable_passthru/baz.def create mode 100644 python/mozbuild/mozbuild/test/backend/data/variable_passthru/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/variable_passthru/test1.c create mode 100644 python/mozbuild/mozbuild/test/backend/data/variable_passthru/test1.cpp create mode 100644 python/mozbuild/mozbuild/test/backend/data/variable_passthru/test1.mm create mode 100644 python/mozbuild/mozbuild/test/backend/data/variable_passthru/test2.c create mode 100644 python/mozbuild/mozbuild/test/backend/data/variable_passthru/test2.cpp create mode 100644 python/mozbuild/mozbuild/test/backend/data/variable_passthru/test2.mm create mode 100644 python/mozbuild/mozbuild/test/backend/data/visual-studio/dir1/bar.cpp create mode 100644 python/mozbuild/mozbuild/test/backend/data/visual-studio/dir1/foo.cpp create mode 100644 python/mozbuild/mozbuild/test/backend/data/visual-studio/dir1/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/visual-studio/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/data/xpidl/bar.idl create mode 100644 python/mozbuild/mozbuild/test/backend/data/xpidl/config/makefiles/xpidl/Makefile.in create mode 100644 python/mozbuild/mozbuild/test/backend/data/xpidl/foo.idl create mode 100644 python/mozbuild/mozbuild/test/backend/data/xpidl/moz.build create mode 100644 python/mozbuild/mozbuild/test/backend/test_build.py create mode 100644 python/mozbuild/mozbuild/test/backend/test_configenvironment.py create mode 100644 python/mozbuild/mozbuild/test/backend/test_database.py create mode 100644 python/mozbuild/mozbuild/test/backend/test_fastermake.py create mode 100644 python/mozbuild/mozbuild/test/backend/test_partialconfigenvironment.py create mode 100644 python/mozbuild/mozbuild/test/backend/test_recursivemake.py create mode 100644 python/mozbuild/mozbuild/test/backend/test_test_manifest.py create mode 100644 python/mozbuild/mozbuild/test/backend/test_visualstudio.py create mode 100644 python/mozbuild/mozbuild/test/code_analysis/test_mach_commands.py create mode 100644 python/mozbuild/mozbuild/test/codecoverage/sample_lcov.info create mode 100644 python/mozbuild/mozbuild/test/codecoverage/test_lcov_rewrite.py create mode 100644 python/mozbuild/mozbuild/test/common.py create mode 100644 python/mozbuild/mozbuild/test/compilation/__init__.py create mode 100644 python/mozbuild/mozbuild/test/compilation/test_warnings.py create mode 100644 python/mozbuild/mozbuild/test/configure/common.py create mode 100644 python/mozbuild/mozbuild/test/configure/data/decorators.configure create mode 100644 python/mozbuild/mozbuild/test/configure/data/empty_mozconfig create mode 100644 python/mozbuild/mozbuild/test/configure/data/extra.configure create mode 100644 python/mozbuild/mozbuild/test/configure/data/imply_option/imm.configure create mode 100644 python/mozbuild/mozbuild/test/configure/data/imply_option/infer.configure create mode 100644 python/mozbuild/mozbuild/test/configure/data/imply_option/infer_ko.configure create mode 100644 python/mozbuild/mozbuild/test/configure/data/imply_option/negative.configure create mode 100644 python/mozbuild/mozbuild/test/configure/data/imply_option/simple.configure create mode 100644 python/mozbuild/mozbuild/test/configure/data/imply_option/values.configure create mode 100644 python/mozbuild/mozbuild/test/configure/data/included.configure create mode 100644 python/mozbuild/mozbuild/test/configure/data/moz.configure create mode 100644 python/mozbuild/mozbuild/test/configure/data/set_config.configure create mode 100644 python/mozbuild/mozbuild/test/configure/data/set_define.configure create mode 100644 python/mozbuild/mozbuild/test/configure/data/subprocess.configure create mode 100644 python/mozbuild/mozbuild/test/configure/lint.py create mode 100644 python/mozbuild/mozbuild/test/configure/macos_fake_sdk/SDKSettings.plist create mode 100644 python/mozbuild/mozbuild/test/configure/test_checks_configure.py create mode 100644 python/mozbuild/mozbuild/test/configure/test_compile_checks.py create mode 100644 python/mozbuild/mozbuild/test/configure/test_configure.py create mode 100644 python/mozbuild/mozbuild/test/configure/test_lint.py create mode 100644 python/mozbuild/mozbuild/test/configure/test_moz_configure.py create mode 100644 python/mozbuild/mozbuild/test/configure/test_options.py create mode 100644 python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py create mode 100644 python/mozbuild/mozbuild/test/configure/test_toolchain_helpers.py create mode 100644 python/mozbuild/mozbuild/test/configure/test_toolkit_moz_configure.py create mode 100644 python/mozbuild/mozbuild/test/configure/test_util.py create mode 100644 python/mozbuild/mozbuild/test/controller/__init__.py create mode 100644 python/mozbuild/mozbuild/test/controller/test_ccachestats.py create mode 100644 python/mozbuild/mozbuild/test/controller/test_clobber.py create mode 100644 python/mozbuild/mozbuild/test/data/Makefile create mode 100644 python/mozbuild/mozbuild/test/data/bad.properties create mode 100644 python/mozbuild/mozbuild/test/data/test-dir/Makefile create mode 100644 python/mozbuild/mozbuild/test/data/test-dir/with/Makefile create mode 100644 python/mozbuild/mozbuild/test/data/test-dir/with/without/with/Makefile create mode 100644 python/mozbuild/mozbuild/test/data/test-dir/without/with/Makefile create mode 100644 python/mozbuild/mozbuild/test/data/valid.properties create mode 100644 python/mozbuild/mozbuild/test/frontend/__init__.py create mode 100644 python/mozbuild/mozbuild/test/frontend/data/allow-compiler-warnings/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/allow-compiler-warnings/test1.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/asflags/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/asflags/test1.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/asflags/test2.S create mode 100644 python/mozbuild/mozbuild/test/frontend/data/branding-files/bar.ico create mode 100644 python/mozbuild/mozbuild/test/frontend/data/branding-files/baz.png create mode 100644 python/mozbuild/mozbuild/test/frontend/data/branding-files/foo.xpm create mode 100644 python/mozbuild/mozbuild/test/frontend/data/branding-files/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/branding-files/quux.icns create mode 100644 python/mozbuild/mozbuild/test/frontend/data/compile-defines/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/compile-defines/test1.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/compile-flags-field-validation/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/compile-flags-field-validation/test1.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/compile-flags-templates/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/compile-flags-templates/test1.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/compile-flags-type-validation/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/compile-flags-type-validation/test1.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/compile-flags/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/compile-flags/test1.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/compile-includes/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/compile-includes/subdir/header.h create mode 100644 python/mozbuild/mozbuild/test/frontend/data/compile-includes/test1.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/config-file-substitution/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/crate-dependency-path-resolution/Cargo.toml create mode 100644 python/mozbuild/mozbuild/test/frontend/data/crate-dependency-path-resolution/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/crate-dependency-path-resolution/shallow/Cargo.toml create mode 100644 python/mozbuild/mozbuild/test/frontend/data/crate-dependency-path-resolution/the/depths/Cargo.toml create mode 100644 python/mozbuild/mozbuild/test/frontend/data/defines/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/disable-compiler-warnings/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/disable-compiler-warnings/test1.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/disable-stl-wrapping/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/disable-stl-wrapping/test1.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/dist-files-missing/install.rdf create mode 100644 python/mozbuild/mozbuild/test/frontend/data/dist-files-missing/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/dist-files/install.rdf create mode 100644 python/mozbuild/mozbuild/test/frontend/data/dist-files/main.js create mode 100644 python/mozbuild/mozbuild/test/frontend/data/dist-files/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/exports-generated/foo.h create mode 100644 python/mozbuild/mozbuild/test/frontend/data/exports-generated/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/exports-generated/mozilla1.h create mode 100644 python/mozbuild/mozbuild/test/frontend/data/exports-missing-generated/foo.h create mode 100644 python/mozbuild/mozbuild/test/frontend/data/exports-missing-generated/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/exports-missing/foo.h create mode 100644 python/mozbuild/mozbuild/test/frontend/data/exports-missing/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/exports-missing/mozilla1.h create mode 100644 python/mozbuild/mozbuild/test/frontend/data/exports/bar.h create mode 100644 python/mozbuild/mozbuild/test/frontend/data/exports/baz.h create mode 100644 python/mozbuild/mozbuild/test/frontend/data/exports/dom1.h create mode 100644 python/mozbuild/mozbuild/test/frontend/data/exports/dom2.h create mode 100644 python/mozbuild/mozbuild/test/frontend/data/exports/dom3.h create mode 100644 python/mozbuild/mozbuild/test/frontend/data/exports/foo.h create mode 100644 python/mozbuild/mozbuild/test/frontend/data/exports/gfx.h create mode 100644 python/mozbuild/mozbuild/test/frontend/data/exports/mem.h create mode 100644 python/mozbuild/mozbuild/test/frontend/data/exports/mem2.h create mode 100644 python/mozbuild/mozbuild/test/frontend/data/exports/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/exports/mozilla1.h create mode 100644 python/mozbuild/mozbuild/test/frontend/data/exports/mozilla2.h create mode 100644 python/mozbuild/mozbuild/test/frontend/data/exports/pprio.h create mode 100644 python/mozbuild/mozbuild/test/frontend/data/exports/pprthred.h create mode 100644 python/mozbuild/mozbuild/test/frontend/data/files-info/bug_component/bad-assignment/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/files-info/bug_component/different-matchers/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/files-info/bug_component/final/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/files-info/bug_component/final/subcomponent/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/files-info/bug_component/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/files-info/bug_component/simple/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/files-info/bug_component/static/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/files-info/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/final-target-pp-files-non-srcdir/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/generated-files-absolute-script/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/generated-files-absolute-script/script.py create mode 100644 python/mozbuild/mozbuild/test/frontend/data/generated-files-force/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/generated-files-method-names/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/generated-files-method-names/script.py create mode 100644 python/mozbuild/mozbuild/test/frontend/data/generated-files-no-inputs/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/generated-files-no-inputs/script.py create mode 100644 python/mozbuild/mozbuild/test/frontend/data/generated-files-no-python-script/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/generated-files-no-python-script/script.rb create mode 100644 python/mozbuild/mozbuild/test/frontend/data/generated-files-no-script/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/generated-files/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/generated-sources/a.cpp create mode 100644 python/mozbuild/mozbuild/test/frontend/data/generated-sources/b.cc create mode 100644 python/mozbuild/mozbuild/test/frontend/data/generated-sources/c.cxx create mode 100644 python/mozbuild/mozbuild/test/frontend/data/generated-sources/d.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/generated-sources/e.m create mode 100644 python/mozbuild/mozbuild/test/frontend/data/generated-sources/f.mm create mode 100644 python/mozbuild/mozbuild/test/frontend/data/generated-sources/g.S create mode 100644 python/mozbuild/mozbuild/test/frontend/data/generated-sources/h.s create mode 100644 python/mozbuild/mozbuild/test/frontend/data/generated-sources/i.asm create mode 100644 python/mozbuild/mozbuild/test/frontend/data/generated-sources/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/generated_includes/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/host-compile-flags/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/host-compile-flags/test1.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/host-program-paths/final-target/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/host-program-paths/installed/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/host-program-paths/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/host-program-paths/not-installed/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/host-rust-libraries/Cargo.toml create mode 100644 python/mozbuild/mozbuild/test/frontend/data/host-rust-libraries/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/host-rust-program-no-cargo-toml/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/host-rust-program-nonexistent-name/Cargo.toml create mode 100644 python/mozbuild/mozbuild/test/frontend/data/host-rust-program-nonexistent-name/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/host-rust-programs/Cargo.toml create mode 100644 python/mozbuild/mozbuild/test/frontend/data/host-rust-programs/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/host-sources/a.cpp create mode 100644 python/mozbuild/mozbuild/test/frontend/data/host-sources/b.cc create mode 100644 python/mozbuild/mozbuild/test/frontend/data/host-sources/c.cxx create mode 100644 python/mozbuild/mozbuild/test/frontend/data/host-sources/d.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/host-sources/e.mm create mode 100644 python/mozbuild/mozbuild/test/frontend/data/host-sources/f.mm create mode 100644 python/mozbuild/mozbuild/test/frontend/data/host-sources/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/include-basic/included.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/include-basic/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/include-file-stack/included-1.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/include-file-stack/included-2.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/include-file-stack/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/include-missing/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/include-outside-topsrcdir/relative.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/include-relative-from-child/child/child.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/include-relative-from-child/child/child2.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/include-relative-from-child/child/grandchild/grandchild.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/include-relative-from-child/parent.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/include-topsrcdir-relative/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/include-topsrcdir-relative/sibling.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/inheriting-variables/bar/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/inheriting-variables/foo/baz/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/inheriting-variables/foo/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/inheriting-variables/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/ipdl_sources/bar/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/ipdl_sources/foo/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/ipdl_sources/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/jar-manifests-multiple-files/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/jar-manifests/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/library-defines/liba/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/library-defines/libb/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/library-defines/libc/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/library-defines/libd/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/library-defines/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/link-flags/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/link-flags/test1.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/local_includes-filename/foo.h create mode 100644 python/mozbuild/mozbuild/test/frontend/data/local_includes-filename/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/local_includes-invalid/objdir/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/local_includes-invalid/srcdir/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/local_includes/bar/baz/dummy_file_for_nonempty_directory create mode 100644 python/mozbuild/mozbuild/test/frontend/data/local_includes/foo/dummy_file_for_nonempty_directory create mode 100644 python/mozbuild/mozbuild/test/frontend/data/local_includes/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/localized-files-from-generated/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/localized-files-no-en-us/en-US/bar.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/localized-files-no-en-us/foo.js create mode 100644 python/mozbuild/mozbuild/test/frontend/data/localized-files-no-en-us/inner/locales/en-US/bar.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/localized-files-no-en-us/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/localized-files-not-localized-generated/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/localized-files/en-US/bar.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/localized-files/en-US/foo.js create mode 100644 python/mozbuild/mozbuild/test/frontend/data/localized-files/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/localized-generated-files-final-target-files/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/localized-generated-files-force/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/localized-generated-files/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/localized-pp-files/en-US/bar.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/localized-pp-files/en-US/foo.js create mode 100644 python/mozbuild/mozbuild/test/frontend/data/localized-pp-files/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/missing-local-includes/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/missing-xpidl/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/multiple-rust-libraries/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/multiple-rust-libraries/rust1/Cargo.toml create mode 100644 python/mozbuild/mozbuild/test/frontend/data/multiple-rust-libraries/rust1/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/multiple-rust-libraries/rust2/Cargo.toml create mode 100644 python/mozbuild/mozbuild/test/frontend/data/multiple-rust-libraries/rust2/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/object-conflicts/1/Test.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/object-conflicts/1/Test.cpp create mode 100644 python/mozbuild/mozbuild/test/frontend/data/object-conflicts/1/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/object-conflicts/2/Test.cpp create mode 100644 python/mozbuild/mozbuild/test/frontend/data/object-conflicts/2/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/object-conflicts/2/subdir/Test.cpp create mode 100644 python/mozbuild/mozbuild/test/frontend/data/object-conflicts/3/Test.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/object-conflicts/3/Test.cpp create mode 100644 python/mozbuild/mozbuild/test/frontend/data/object-conflicts/3/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/object-conflicts/4/Test.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/object-conflicts/4/Test.cpp create mode 100644 python/mozbuild/mozbuild/test/frontend/data/object-conflicts/4/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/program-paths/dist-bin/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/program-paths/dist-subdir/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/program-paths/final-target/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/program-paths/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/program-paths/not-installed/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/program/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/program/test_program1.cpp create mode 100644 python/mozbuild/mozbuild/test/frontend/data/program/test_program2.cpp create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-error-bad-dir/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-error-basic/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-error-empty-list/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-error-error-func/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-error-included-from/child.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-error-included-from/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-error-missing-include/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-error-outside-topsrcdir/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-error-read-unknown-global/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-error-repeated-dir/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-error-script-error/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-error-syntax/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-error-write-bad-value/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-error-write-unknown-global/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-relevant-mozbuild/d1/every-level/a/file create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-relevant-mozbuild/d1/every-level/a/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-relevant-mozbuild/d1/every-level/b/file create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-relevant-mozbuild/d1/every-level/b/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-relevant-mozbuild/d1/every-level/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-relevant-mozbuild/d1/file1 create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-relevant-mozbuild/d1/file2 create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-relevant-mozbuild/d1/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-relevant-mozbuild/d1/no-intermediate-moz-build/child/file create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-relevant-mozbuild/d1/no-intermediate-moz-build/child/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-relevant-mozbuild/d1/parent-is-far/dir1/dir2/dir3/file create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-relevant-mozbuild/d1/parent-is-far/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-relevant-mozbuild/d2/dir1/file create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-relevant-mozbuild/d2/dir1/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-relevant-mozbuild/d2/dir2/file create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-relevant-mozbuild/d2/dir2/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-relevant-mozbuild/d2/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-relevant-mozbuild/file create mode 100644 python/mozbuild/mozbuild/test/frontend/data/reader-relevant-mozbuild/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/resolved-flags-error/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/resolved-flags-error/test1.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/rust-library-dash-folding/Cargo.toml create mode 100644 python/mozbuild/mozbuild/test/frontend/data/rust-library-dash-folding/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/rust-library-duplicate-features/Cargo.toml create mode 100644 python/mozbuild/mozbuild/test/frontend/data/rust-library-duplicate-features/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/rust-library-features/Cargo.toml create mode 100644 python/mozbuild/mozbuild/test/frontend/data/rust-library-features/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/rust-library-invalid-crate-type/Cargo.toml create mode 100644 python/mozbuild/mozbuild/test/frontend/data/rust-library-invalid-crate-type/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/rust-library-name-mismatch/Cargo.toml create mode 100644 python/mozbuild/mozbuild/test/frontend/data/rust-library-name-mismatch/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/rust-library-no-cargo-toml/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/rust-library-no-lib-section/Cargo.toml create mode 100644 python/mozbuild/mozbuild/test/frontend/data/rust-library-no-lib-section/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/rust-program-no-cargo-toml/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/rust-program-nonexistent-name/Cargo.toml create mode 100644 python/mozbuild/mozbuild/test/frontend/data/rust-program-nonexistent-name/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/rust-programs/Cargo.toml create mode 100644 python/mozbuild/mozbuild/test/frontend/data/rust-programs/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/schedules/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/schedules/subd/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/sources-just-c/d.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/sources-just-c/e.m create mode 100644 python/mozbuild/mozbuild/test/frontend/data/sources-just-c/g.S create mode 100644 python/mozbuild/mozbuild/test/frontend/data/sources-just-c/h.s create mode 100644 python/mozbuild/mozbuild/test/frontend/data/sources-just-c/i.asm create mode 100644 python/mozbuild/mozbuild/test/frontend/data/sources-just-c/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/sources/a.cpp create mode 100644 python/mozbuild/mozbuild/test/frontend/data/sources/b.cc create mode 100644 python/mozbuild/mozbuild/test/frontend/data/sources/c.cxx create mode 100644 python/mozbuild/mozbuild/test/frontend/data/sources/d.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/sources/e.m create mode 100644 python/mozbuild/mozbuild/test/frontend/data/sources/f.mm create mode 100644 python/mozbuild/mozbuild/test/frontend/data/sources/g.S create mode 100644 python/mozbuild/mozbuild/test/frontend/data/sources/h.s create mode 100644 python/mozbuild/mozbuild/test/frontend/data/sources/i.asm create mode 100644 python/mozbuild/mozbuild/test/frontend/data/sources/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/templates/templates.mozbuild create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-harness-files-root/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-harness-files/mochitest.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-harness-files/mochitest.py create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-harness-files/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-harness-files/runtests.py create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-harness-files/utils.py create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-install-shared-lib/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-linkables-cxx-link/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-linkables-cxx-link/one/foo.cpp create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-linkables-cxx-link/one/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-linkables-cxx-link/three/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-linkables-cxx-link/two/foo.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-linkables-cxx-link/two/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-absolute-support/absolute-support.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-absolute-support/foo.txt create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-absolute-support/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-absolute-support/test_file.js create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-dupes/bar.js create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-dupes/foo.js create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-dupes/mochitest.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-dupes/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-dupes/test_baz.js create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-emitted-includes/included-reftest.list create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-emitted-includes/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-emitted-includes/reftest.list create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-empty/empty.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-empty/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-inactive-ignored/test_inactive.html create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-install-includes/common.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-install-includes/mochitest.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-install-includes/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-install-includes/test_foo.html create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-just-support/foo.txt create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-just-support/just-support.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-just-support/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/a11y-support/dir1/bar create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/a11y-support/foo create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/a11y.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/browser.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/chrome.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/crashtest.list create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/metro.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/mochitest.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/python.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/reftest.list create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/test_a11y.js create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/test_browser.js create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/test_chrome.js create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/test_foo.py create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/test_metro.js create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/test_mochitest.js create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/test_xpcshell.js create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/xpcshell.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-manifest/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-test-file-unfiltered/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-test-file-unfiltered/xpcshell.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-test-file/mochitest.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-test-file/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-parent-support-files-dir/child/mochitest.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-parent-support-files-dir/child/test_foo.js create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-parent-support-files-dir/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-parent-support-files-dir/support-file.txt create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-missing/child/another-file.sjs create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-missing/child/browser.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-missing/child/data/one.txt create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-missing/child/data/two.txt create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-missing/child/test_sub.js create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-missing/mochitest.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-missing/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-missing/support-file.txt create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-missing/test_foo.js create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-support/child/another-file.sjs create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-support/child/browser.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-support/child/data/one.txt create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-support/child/data/two.txt create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-support/child/test_sub.js create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-support/mochitest.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-support/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-support/support-file.txt create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-support/test_foo.js create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-unmatched-generated/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-unmatched-generated/test.ini create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-manifest-unmatched-generated/test_foo create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-symbols-file-objdir-missing-generated/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-symbols-file-objdir/foo.py create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-symbols-file-objdir/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-symbols-file/foo.symbols create mode 100644 python/mozbuild/mozbuild/test/frontend/data/test-symbols-file/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/traversal-all-vars/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/traversal-all-vars/parallel/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/traversal-all-vars/regular/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/traversal-all-vars/test/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/traversal-outside-topsrcdir/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/traversal-relative-dirs/bar/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/traversal-relative-dirs/foo/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/traversal-relative-dirs/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/traversal-repeated-dirs/bar/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/traversal-repeated-dirs/foo/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/traversal-repeated-dirs/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/traversal-simple/bar/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/traversal-simple/foo/biz/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/traversal-simple/foo/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/traversal-simple/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/unified-sources-non-unified/bar.cxx create mode 100644 python/mozbuild/mozbuild/test/frontend/data/unified-sources-non-unified/c1.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/unified-sources-non-unified/c2.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/unified-sources-non-unified/foo.cpp create mode 100644 python/mozbuild/mozbuild/test/frontend/data/unified-sources-non-unified/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/unified-sources-non-unified/objc1.mm create mode 100644 python/mozbuild/mozbuild/test/frontend/data/unified-sources-non-unified/objc2.mm create mode 100644 python/mozbuild/mozbuild/test/frontend/data/unified-sources-non-unified/quux.cc create mode 100644 python/mozbuild/mozbuild/test/frontend/data/unified-sources/bar.cxx create mode 100644 python/mozbuild/mozbuild/test/frontend/data/unified-sources/c1.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/unified-sources/c2.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/unified-sources/foo.cpp create mode 100644 python/mozbuild/mozbuild/test/frontend/data/unified-sources/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/unified-sources/objc1.mm create mode 100644 python/mozbuild/mozbuild/test/frontend/data/unified-sources/objc2.mm create mode 100644 python/mozbuild/mozbuild/test/frontend/data/unified-sources/quux.cc create mode 100644 python/mozbuild/mozbuild/test/frontend/data/use-nasm/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/use-nasm/test1.S create mode 100644 python/mozbuild/mozbuild/test/frontend/data/variable-passthru/bans.S create mode 100644 python/mozbuild/mozbuild/test/frontend/data/variable-passthru/baz.def create mode 100644 python/mozbuild/mozbuild/test/frontend/data/variable-passthru/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/variable-passthru/test1.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/variable-passthru/test1.cpp create mode 100644 python/mozbuild/mozbuild/test/frontend/data/variable-passthru/test1.mm create mode 100644 python/mozbuild/mozbuild/test/frontend/data/variable-passthru/test2.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/variable-passthru/test2.cpp create mode 100644 python/mozbuild/mozbuild/test/frontend/data/variable-passthru/test2.mm create mode 100644 python/mozbuild/mozbuild/test/frontend/data/visibility-flags/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/visibility-flags/test1.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/wasm-compile-flags/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/wasm-compile-flags/test1.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/wasm-sources/a.cpp create mode 100644 python/mozbuild/mozbuild/test/frontend/data/wasm-sources/b.cc create mode 100644 python/mozbuild/mozbuild/test/frontend/data/wasm-sources/c.cxx create mode 100644 python/mozbuild/mozbuild/test/frontend/data/wasm-sources/d.c create mode 100644 python/mozbuild/mozbuild/test/frontend/data/wasm-sources/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/data/xpidl-module-no-sources/moz.build create mode 100644 python/mozbuild/mozbuild/test/frontend/test_context.py create mode 100644 python/mozbuild/mozbuild/test/frontend/test_emitter.py create mode 100644 python/mozbuild/mozbuild/test/frontend/test_namespaces.py create mode 100644 python/mozbuild/mozbuild/test/frontend/test_reader.py create mode 100644 python/mozbuild/mozbuild/test/frontend/test_sandbox.py create mode 100644 python/mozbuild/mozbuild/test/python.ini create mode 100644 python/mozbuild/mozbuild/test/test_android_version_code.py create mode 100644 python/mozbuild/mozbuild/test/test_artifact_cache.py create mode 100644 python/mozbuild/mozbuild/test/test_artifacts.py create mode 100644 python/mozbuild/mozbuild/test/test_base.py create mode 100644 python/mozbuild/mozbuild/test/test_containers.py create mode 100644 python/mozbuild/mozbuild/test/test_dotproperties.py create mode 100644 python/mozbuild/mozbuild/test/test_expression.py create mode 100644 python/mozbuild/mozbuild/test/test_jarmaker.py create mode 100644 python/mozbuild/mozbuild/test/test_licenses.py create mode 100644 python/mozbuild/mozbuild/test/test_line_endings.py create mode 100644 python/mozbuild/mozbuild/test/test_makeutil.py create mode 100644 python/mozbuild/mozbuild/test/test_manifest.py create mode 100644 python/mozbuild/mozbuild/test/test_mozconfig.py create mode 100755 python/mozbuild/mozbuild/test/test_mozinfo.py create mode 100644 python/mozbuild/mozbuild/test/test_preprocessor.py create mode 100644 python/mozbuild/mozbuild/test/test_pythonutil.py create mode 100644 python/mozbuild/mozbuild/test/test_rewrite_mozbuild.py create mode 100644 python/mozbuild/mozbuild/test/test_telemetry.py create mode 100644 python/mozbuild/mozbuild/test/test_telemetry_settings.py create mode 100644 python/mozbuild/mozbuild/test/test_util.py create mode 100644 python/mozbuild/mozbuild/test/test_util_fileavoidwrite.py create mode 100644 python/mozbuild/mozbuild/test/test_vendor.py create mode 100644 python/mozbuild/mozbuild/test/vendor_requirements.in create mode 100644 python/mozbuild/mozbuild/test/vendor_requirements.txt create mode 100644 python/mozbuild/mozbuild/testing.py create mode 100644 python/mozbuild/mozbuild/toolchains.py create mode 100644 python/mozbuild/mozbuild/util.py create mode 100644 python/mozbuild/mozbuild/vendor/__init__.py create mode 100644 python/mozbuild/mozbuild/vendor/host_angle.py create mode 100644 python/mozbuild/mozbuild/vendor/host_base.py create mode 100644 python/mozbuild/mozbuild/vendor/host_github.py create mode 100644 python/mozbuild/mozbuild/vendor/host_gitlab.py create mode 100644 python/mozbuild/mozbuild/vendor/host_googlesource.py create mode 100644 python/mozbuild/mozbuild/vendor/mach_commands.py create mode 100644 python/mozbuild/mozbuild/vendor/moz.build create mode 100644 python/mozbuild/mozbuild/vendor/moz_yaml.py create mode 100644 python/mozbuild/mozbuild/vendor/rewrite_mozbuild.py create mode 100755 python/mozbuild/mozbuild/vendor/test_vendor_changes.sh create mode 100644 python/mozbuild/mozbuild/vendor/vendor_manifest.py create mode 100644 python/mozbuild/mozbuild/vendor/vendor_python.py create mode 100644 python/mozbuild/mozbuild/vendor/vendor_rust.py create mode 100644 python/mozbuild/mozpack/__init__.py create mode 100644 python/mozbuild/mozpack/apple_pkg/Distribution.template create mode 100644 python/mozbuild/mozpack/apple_pkg/PackageInfo.template create mode 100644 python/mozbuild/mozpack/archive.py create mode 100644 python/mozbuild/mozpack/chrome/__init__.py create mode 100644 python/mozbuild/mozpack/chrome/flags.py create mode 100644 python/mozbuild/mozpack/chrome/manifest.py create mode 100644 python/mozbuild/mozpack/copier.py create mode 100644 python/mozbuild/mozpack/dmg.py create mode 100644 python/mozbuild/mozpack/errors.py create mode 100644 python/mozbuild/mozpack/executables.py create mode 100644 python/mozbuild/mozpack/files.py create mode 100644 python/mozbuild/mozpack/manifests.py create mode 100644 python/mozbuild/mozpack/mozjar.py create mode 100644 python/mozbuild/mozpack/packager/__init__.py create mode 100644 python/mozbuild/mozpack/packager/formats.py create mode 100644 python/mozbuild/mozpack/packager/l10n.py create mode 100644 python/mozbuild/mozpack/packager/unpack.py create mode 100644 python/mozbuild/mozpack/path.py create mode 100644 python/mozbuild/mozpack/pkg.py create mode 100644 python/mozbuild/mozpack/test/__init__.py create mode 100644 python/mozbuild/mozpack/test/data/test_data create mode 100644 python/mozbuild/mozpack/test/python.ini create mode 100644 python/mozbuild/mozpack/test/support/minify_js_verify.py create mode 100644 python/mozbuild/mozpack/test/test_archive.py create mode 100644 python/mozbuild/mozpack/test/test_chrome_flags.py create mode 100644 python/mozbuild/mozpack/test/test_chrome_manifest.py create mode 100644 python/mozbuild/mozpack/test/test_copier.py create mode 100644 python/mozbuild/mozpack/test/test_errors.py create mode 100644 python/mozbuild/mozpack/test/test_files.py create mode 100644 python/mozbuild/mozpack/test/test_manifests.py create mode 100644 python/mozbuild/mozpack/test/test_mozjar.py create mode 100644 python/mozbuild/mozpack/test/test_packager.py create mode 100644 python/mozbuild/mozpack/test/test_packager_formats.py create mode 100644 python/mozbuild/mozpack/test/test_packager_l10n.py create mode 100644 python/mozbuild/mozpack/test/test_packager_unpack.py create mode 100644 python/mozbuild/mozpack/test/test_path.py create mode 100644 python/mozbuild/mozpack/test/test_pkg.py create mode 100644 python/mozbuild/mozpack/test/test_unify.py create mode 100644 python/mozbuild/mozpack/unify.py create mode 100644 python/mozbuild/setup.py create mode 100644 python/mozlint/.isort.cfg create mode 100644 python/mozlint/mozlint/__init__.py create mode 100644 python/mozlint/mozlint/cli.py create mode 100644 python/mozlint/mozlint/editor.py create mode 100644 python/mozlint/mozlint/errors.py create mode 100644 python/mozlint/mozlint/formatters/__init__.py create mode 100644 python/mozlint/mozlint/formatters/compact.py create mode 100644 python/mozlint/mozlint/formatters/stylish.py create mode 100644 python/mozlint/mozlint/formatters/summary.py create mode 100644 python/mozlint/mozlint/formatters/treeherder.py create mode 100644 python/mozlint/mozlint/formatters/unix.py create mode 100644 python/mozlint/mozlint/parser.py create mode 100644 python/mozlint/mozlint/pathutils.py create mode 100644 python/mozlint/mozlint/result.py create mode 100644 python/mozlint/mozlint/roller.py create mode 100644 python/mozlint/mozlint/types.py create mode 100644 python/mozlint/mozlint/util/__init__.py create mode 100644 python/mozlint/mozlint/util/implementation.py create mode 100644 python/mozlint/mozlint/util/string.py create mode 100644 python/mozlint/setup.py create mode 100644 python/mozlint/test/__init__.py create mode 100644 python/mozlint/test/conftest.py create mode 100644 python/mozlint/test/files/foobar.js create mode 100644 python/mozlint/test/files/foobar.py create mode 100644 python/mozlint/test/files/irrelevant/file.txt create mode 100644 python/mozlint/test/files/no_foobar.js create mode 100644 python/mozlint/test/filter/a.js create mode 100644 python/mozlint/test/filter/a.py create mode 100644 python/mozlint/test/filter/foo/empty.txt create mode 100644 python/mozlint/test/filter/foobar/empty.txt create mode 100644 python/mozlint/test/filter/subdir1/b.js create mode 100644 python/mozlint/test/filter/subdir1/b.py create mode 100644 python/mozlint/test/filter/subdir1/subdir3/d.js create mode 100644 python/mozlint/test/filter/subdir1/subdir3/d.py create mode 100644 python/mozlint/test/filter/subdir2/c.js create mode 100644 python/mozlint/test/filter/subdir2/c.py create mode 100644 python/mozlint/test/linters/badreturncode.yml create mode 100644 python/mozlint/test/linters/excludes.yml create mode 100644 python/mozlint/test/linters/excludes_empty.yml create mode 100644 python/mozlint/test/linters/explicit_path.yml create mode 100644 python/mozlint/test/linters/external.py create mode 100644 python/mozlint/test/linters/external.yml create mode 100644 python/mozlint/test/linters/global.yml create mode 100644 python/mozlint/test/linters/global_payload.py create mode 100644 python/mozlint/test/linters/global_skipped.yml create mode 100644 python/mozlint/test/linters/invalid_exclude.yml create mode 100644 python/mozlint/test/linters/invalid_extension.ym create mode 100644 python/mozlint/test/linters/invalid_include.yml create mode 100644 python/mozlint/test/linters/invalid_include_with_glob.yml create mode 100644 python/mozlint/test/linters/invalid_support_files.yml create mode 100644 python/mozlint/test/linters/invalid_type.yml create mode 100644 python/mozlint/test/linters/missing_attrs.yml create mode 100644 python/mozlint/test/linters/missing_definition.yml create mode 100644 python/mozlint/test/linters/multiple.yml create mode 100644 python/mozlint/test/linters/non_existing_exclude.yml create mode 100644 python/mozlint/test/linters/non_existing_include.yml create mode 100644 python/mozlint/test/linters/non_existing_support_files.yml create mode 100644 python/mozlint/test/linters/raises.yml create mode 100644 python/mozlint/test/linters/regex.yml create mode 100644 python/mozlint/test/linters/setup.yml create mode 100644 python/mozlint/test/linters/setupfailed.yml create mode 100644 python/mozlint/test/linters/setupraised.yml create mode 100644 python/mozlint/test/linters/slow.yml create mode 100644 python/mozlint/test/linters/string.yml create mode 100644 python/mozlint/test/linters/structured.yml create mode 100644 python/mozlint/test/linters/support_files.yml create mode 100644 python/mozlint/test/linters/warning.yml create mode 100644 python/mozlint/test/linters/warning_no_code_review.yml create mode 100644 python/mozlint/test/python.ini create mode 100644 python/mozlint/test/runcli.py create mode 100644 python/mozlint/test/test_cli.py create mode 100644 python/mozlint/test/test_editor.py create mode 100644 python/mozlint/test/test_formatters.py create mode 100644 python/mozlint/test/test_parser.py create mode 100644 python/mozlint/test/test_pathutils.py create mode 100644 python/mozlint/test/test_result.py create mode 100644 python/mozlint/test/test_roller.py create mode 100644 python/mozlint/test/test_types.py create mode 100644 python/mozperftest/.isort.cfg create mode 100644 python/mozperftest/README.rst create mode 100644 python/mozperftest/mozperftest/.coveragerc create mode 100644 python/mozperftest/mozperftest/__init__.py create mode 100644 python/mozperftest/mozperftest/argparser.py create mode 100644 python/mozperftest/mozperftest/environment.py create mode 100644 python/mozperftest/mozperftest/fzf/__init__.py create mode 100644 python/mozperftest/mozperftest/fzf/fzf.py create mode 100644 python/mozperftest/mozperftest/fzf/preview.py create mode 100644 python/mozperftest/mozperftest/hooks.py create mode 100644 python/mozperftest/mozperftest/layers.py create mode 100644 python/mozperftest/mozperftest/mach_commands.py create mode 100644 python/mozperftest/mozperftest/metadata.py create mode 100644 python/mozperftest/mozperftest/metrics/__init__.py create mode 100644 python/mozperftest/mozperftest/metrics/common.py create mode 100644 python/mozperftest/mozperftest/metrics/consoleoutput.py create mode 100644 python/mozperftest/mozperftest/metrics/exceptions.py create mode 100644 python/mozperftest/mozperftest/metrics/notebook/__init__.py create mode 100644 python/mozperftest/mozperftest/metrics/notebook/constant.py create mode 100644 python/mozperftest/mozperftest/metrics/notebook/notebook-sections/compare create mode 100644 python/mozperftest/mozperftest/metrics/notebook/notebook-sections/header create mode 100644 python/mozperftest/mozperftest/metrics/notebook/notebook-sections/scatterplot create mode 100644 python/mozperftest/mozperftest/metrics/notebook/perftestetl.py create mode 100644 python/mozperftest/mozperftest/metrics/notebook/perftestnotebook.py create mode 100644 python/mozperftest/mozperftest/metrics/notebook/template_upload_file.html create mode 100644 python/mozperftest/mozperftest/metrics/notebook/transformer.py create mode 100644 python/mozperftest/mozperftest/metrics/notebook/transforms/__init__.py create mode 100644 python/mozperftest/mozperftest/metrics/notebook/transforms/logcattime.py create mode 100644 python/mozperftest/mozperftest/metrics/notebook/transforms/single_json.py create mode 100644 python/mozperftest/mozperftest/metrics/notebook/utilities.py create mode 100644 python/mozperftest/mozperftest/metrics/notebookupload.py create mode 100644 python/mozperftest/mozperftest/metrics/perfboard/__init__.py create mode 100644 python/mozperftest/mozperftest/metrics/perfboard/dashboard.json create mode 100644 python/mozperftest/mozperftest/metrics/perfboard/grafana.py create mode 100644 python/mozperftest/mozperftest/metrics/perfboard/influx.py create mode 100644 python/mozperftest/mozperftest/metrics/perfboard/panel.json create mode 100644 python/mozperftest/mozperftest/metrics/perfboard/target.json create mode 100644 python/mozperftest/mozperftest/metrics/perfherder.py create mode 100644 python/mozperftest/mozperftest/metrics/utils.py create mode 100644 python/mozperftest/mozperftest/metrics/visualmetrics.py create mode 100644 python/mozperftest/mozperftest/runner.py create mode 100644 python/mozperftest/mozperftest/schemas/intermediate-results-schema.json create mode 100644 python/mozperftest/mozperftest/schemas/transformer_schema.json create mode 100644 python/mozperftest/mozperftest/script.py create mode 100644 python/mozperftest/mozperftest/system/__init__.py create mode 100644 python/mozperftest/mozperftest/system/android.py create mode 100644 python/mozperftest/mozperftest/system/android_perf_tuner.py create mode 100644 python/mozperftest/mozperftest/system/android_startup.py create mode 100644 python/mozperftest/mozperftest/system/example.zip create mode 100644 python/mozperftest/mozperftest/system/macos.py create mode 100644 python/mozperftest/mozperftest/system/pingserver.py create mode 100644 python/mozperftest/mozperftest/system/profile.py create mode 100644 python/mozperftest/mozperftest/system/proxy.py create mode 100644 python/mozperftest/mozperftest/test/__init__.py create mode 100644 python/mozperftest/mozperftest/test/androidlog.py create mode 100644 python/mozperftest/mozperftest/test/browsertime/__init__.py create mode 100644 python/mozperftest/mozperftest/test/browsertime/package-lock.json create mode 100644 python/mozperftest/mozperftest/test/browsertime/package.json create mode 100644 python/mozperftest/mozperftest/test/browsertime/runner.py create mode 100644 python/mozperftest/mozperftest/test/browsertime/visualtools.py create mode 100644 python/mozperftest/mozperftest/test/noderunner.py create mode 100644 python/mozperftest/mozperftest/test/webpagetest.py create mode 100644 python/mozperftest/mozperftest/test/xpcshell.py create mode 100644 python/mozperftest/mozperftest/tests/__init__.py create mode 100644 python/mozperftest/mozperftest/tests/conftest.py create mode 100644 python/mozperftest/mozperftest/tests/data/WPT_fakekey.txt create mode 100644 python/mozperftest/mozperftest/tests/data/browsertime-results-video/browsertime.json create mode 100644 python/mozperftest/mozperftest/tests/data/browsertime-results-video/pages/www.bbc.com/data/video/1.mp4 create mode 100644 python/mozperftest/mozperftest/tests/data/browsertime-results-video/pages/www.bbc.com/news/world-middle-east-53598965/data/video/1.mp4 create mode 100644 python/mozperftest/mozperftest/tests/data/browsertime-results-video/pages/www.bbc.com/news/world-us-canada-53599363/data/video/1.mp4 create mode 100644 python/mozperftest/mozperftest/tests/data/browsertime-results/browsertime.json create mode 100644 python/mozperftest/mozperftest/tests/data/failing-samples/perftest_doc_failure_example.js create mode 100644 python/mozperftest/mozperftest/tests/data/firefox.dmg create mode 100644 python/mozperftest/mozperftest/tests/data/home_activity.txt create mode 100644 python/mozperftest/mozperftest/tests/data/hook.py create mode 100644 python/mozperftest/mozperftest/tests/data/hook_raises.py create mode 100644 python/mozperftest/mozperftest/tests/data/hook_resume.py create mode 100644 python/mozperftest/mozperftest/tests/data/hooks_iteration.py create mode 100644 python/mozperftest/mozperftest/tests/data/hooks_state.py create mode 100644 python/mozperftest/mozperftest/tests/data/logcat create mode 100644 python/mozperftest/mozperftest/tests/data/mozinfo.json create mode 100644 python/mozperftest/mozperftest/tests/data/multiple_transforms_error/test_transformer_1.py create mode 100644 python/mozperftest/mozperftest/tests/data/multiple_transforms_error/test_transformer_1_copy.py create mode 100644 python/mozperftest/mozperftest/tests/data/perftestetl_plugin/test_transformer_perftestetl_plugin_1.py create mode 100644 python/mozperftest/mozperftest/tests/data/perftestetl_plugin/test_transformer_perftestetl_plugin_2.py create mode 100644 python/mozperftest/mozperftest/tests/data/samples/head.js create mode 100644 python/mozperftest/mozperftest/tests/data/samples/perftest_example.js create mode 100644 python/mozperftest/mozperftest/tests/data/samples/test_perftest_WPT_init_file.js create mode 100644 python/mozperftest/mozperftest/tests/data/samples/test_perftest_android_startup.js create mode 100644 python/mozperftest/mozperftest/tests/data/samples/test_xpcshell.js create mode 100644 python/mozperftest/mozperftest/tests/data/samples/test_xpcshell_flavor2.js create mode 100644 python/mozperftest/mozperftest/tests/data/samples/xpcshell.ini create mode 100644 python/mozperftest/mozperftest/tests/data/xpcshell create mode 100644 python/mozperftest/mozperftest/tests/fetched_artifact.zip create mode 100644 python/mozperftest/mozperftest/tests/support.py create mode 100644 python/mozperftest/mozperftest/tests/test_android.py create mode 100644 python/mozperftest/mozperftest/tests/test_android_startup.py create mode 100644 python/mozperftest/mozperftest/tests/test_androidlog.py create mode 100644 python/mozperftest/mozperftest/tests/test_argparser.py create mode 100644 python/mozperftest/mozperftest/tests/test_browsertime.py create mode 100644 python/mozperftest/mozperftest/tests/test_consoleoutput.py create mode 100644 python/mozperftest/mozperftest/tests/test_constant.py create mode 100644 python/mozperftest/mozperftest/tests/test_environment.py create mode 100644 python/mozperftest/mozperftest/tests/test_fzf.py create mode 100644 python/mozperftest/mozperftest/tests/test_influx.py create mode 100644 python/mozperftest/mozperftest/tests/test_ir_schema.py create mode 100644 python/mozperftest/mozperftest/tests/test_layers.py create mode 100644 python/mozperftest/mozperftest/tests/test_logcat_transformer.py create mode 100644 python/mozperftest/mozperftest/tests/test_mach_commands.py create mode 100644 python/mozperftest/mozperftest/tests/test_macos.py create mode 100644 python/mozperftest/mozperftest/tests/test_metrics_utils.py create mode 100644 python/mozperftest/mozperftest/tests/test_notebookupload.py create mode 100644 python/mozperftest/mozperftest/tests/test_perfherder.py create mode 100644 python/mozperftest/mozperftest/tests/test_perftestetl.py create mode 100644 python/mozperftest/mozperftest/tests/test_perftestnotebook.py create mode 100644 python/mozperftest/mozperftest/tests/test_pingserver.py create mode 100644 python/mozperftest/mozperftest/tests/test_profile.py create mode 100644 python/mozperftest/mozperftest/tests/test_proxy.py create mode 100644 python/mozperftest/mozperftest/tests/test_runner.py create mode 100644 python/mozperftest/mozperftest/tests/test_script.py create mode 100644 python/mozperftest/mozperftest/tests/test_single_json_transformer.py create mode 100644 python/mozperftest/mozperftest/tests/test_transformer.py create mode 100644 python/mozperftest/mozperftest/tests/test_utils.py create mode 100644 python/mozperftest/mozperftest/tests/test_visualmetrics.py create mode 100644 python/mozperftest/mozperftest/tests/test_visualtools.py create mode 100644 python/mozperftest/mozperftest/tests/test_webpagetest.py create mode 100644 python/mozperftest/mozperftest/tests/test_xpcshell.py create mode 100644 python/mozperftest/mozperftest/utils.py create mode 100644 python/mozperftest/perfdocs/config.yml create mode 100644 python/mozperftest/perfdocs/developing.rst create mode 100644 python/mozperftest/perfdocs/index.rst create mode 100644 python/mozperftest/perfdocs/running.rst create mode 100644 python/mozperftest/perfdocs/tools.rst create mode 100644 python/mozperftest/perfdocs/vision.rst create mode 100644 python/mozperftest/perfdocs/writing.rst create mode 100644 python/mozperftest/setup.cfg create mode 100644 python/mozperftest/setup.py create mode 100644 python/mozrelease/.isort.cfg create mode 100644 python/mozrelease/mozrelease/__init__.py create mode 100644 python/mozrelease/mozrelease/balrog.py create mode 100644 python/mozrelease/mozrelease/buglist_creator.py create mode 100644 python/mozrelease/mozrelease/chunking.py create mode 100644 python/mozrelease/mozrelease/l10n.py create mode 100644 python/mozrelease/mozrelease/mach_commands.py create mode 100644 python/mozrelease/mozrelease/partner_attribution.py create mode 100644 python/mozrelease/mozrelease/partner_repack.py create mode 100644 python/mozrelease/mozrelease/paths.py create mode 100644 python/mozrelease/mozrelease/platforms.py create mode 100644 python/mozrelease/mozrelease/scriptworker_canary.py create mode 100644 python/mozrelease/mozrelease/update_verify.py create mode 100644 python/mozrelease/mozrelease/util.py create mode 100644 python/mozrelease/mozrelease/versions.py create mode 100644 python/mozrelease/setup.py create mode 100644 python/mozrelease/test/data/Firefox-62.0.3.update.json create mode 100644 python/mozrelease/test/data/Firefox-62.0b11-update.json create mode 100644 python/mozrelease/test/data/Firefox-64.0b13.update.json create mode 100644 python/mozrelease/test/data/buglist_changesets.json create mode 100644 python/mozrelease/test/data/sample-update-verify.cfg create mode 100644 python/mozrelease/test/data/whatsnew-62.0.3.yml create mode 100644 python/mozrelease/test/data/whatsnew-release.yml create mode 100644 python/mozrelease/test/python.ini create mode 100644 python/mozrelease/test/test_balrog.py create mode 100644 python/mozrelease/test/test_buglist_creator.py create mode 100644 python/mozrelease/test/test_update_verify.py create mode 100644 python/mozrelease/test/test_versions.py create mode 100644 python/mozterm/.isort.cfg create mode 100644 python/mozterm/mozterm/__init__.py create mode 100644 python/mozterm/mozterm/terminal.py create mode 100644 python/mozterm/mozterm/widgets.py create mode 100644 python/mozterm/setup.cfg create mode 100644 python/mozterm/setup.py create mode 100644 python/mozterm/test/python.ini create mode 100644 python/mozterm/test/test_terminal.py create mode 100644 python/mozterm/test/test_widgets.py create mode 100644 python/mozversioncontrol/.isort.cfg create mode 100644 python/mozversioncontrol/mozversioncontrol/__init__.py create mode 100644 python/mozversioncontrol/mozversioncontrol/repoupdate.py create mode 100644 python/mozversioncontrol/setup.py create mode 100644 python/mozversioncontrol/test/conftest.py create mode 100644 python/mozversioncontrol/test/python.ini create mode 100644 python/mozversioncontrol/test/test_branch.py create mode 100644 python/mozversioncontrol/test/test_commit.py create mode 100644 python/mozversioncontrol/test/test_context_manager.py create mode 100644 python/mozversioncontrol/test/test_push_to_try.py create mode 100644 python/mozversioncontrol/test/test_update.py create mode 100644 python/mozversioncontrol/test/test_workdir_outgoing.py create mode 100644 python/mozversioncontrol/test/test_working_directory.py create mode 100644 python/sites/build.txt create mode 100644 python/sites/common.txt create mode 100644 python/sites/docs.txt create mode 100644 python/sites/ipython.txt create mode 100644 python/sites/lint.txt create mode 100644 python/sites/mach.txt create mode 100644 python/sites/perftest-side-by-side.txt create mode 100644 python/sites/perftest-test.txt create mode 100644 python/sites/python-test.txt create mode 100644 python/sites/upload-generated-sources.txt create mode 100644 python/sites/vendor.txt create mode 100644 python/sites/watch.txt create mode 100644 python/sites/webcompat.txt create mode 100644 python/sites/wpt.txt (limited to 'python') diff --git a/python/README b/python/README new file mode 100644 index 0000000000..e7de122d5c --- /dev/null +++ b/python/README @@ -0,0 +1,16 @@ +This directory contains common Python code. + +The basic rule is that if Python code is cross-module (that's "module" in the +Mozilla meaning - as in "module ownership") and is MPL-compatible, it should +go here. + +What should not go here: + +* Vendored python modules (use third_party/python instead) +* Python that is not MPL-compatible (see other-licenses/) +* Python that has good reason to remain close to its "owning" (Mozilla) + module (e.g. it is only being consumed from there). + +Historical information can be found at +https://bugzilla.mozilla.org/show_bug.cgi?id=775243 +https://bugzilla.mozilla.org/show_bug.cgi?id=1346025 diff --git a/python/docs/index.rst b/python/docs/index.rst new file mode 100644 index 0000000000..2d1167a135 --- /dev/null +++ b/python/docs/index.rst @@ -0,0 +1,228 @@ +================================= +Using third-party Python packages +================================= + +Mach and its associated commands have a variety of 3rd-party Python dependencies. Many of these +are vendored in ``third_party/python``, while others are installed at runtime via ``pip``. + +The dependencies of Mach itself can be found at ``python/sites/mach.txt``. Mach commands +may have additional dependencies which are specified at ``python/sites/.txt``. + +For example, the following Mach command would have its 3rd-party dependencies declared at +``python/sites/foo.txt``. + +.. code:: python + + @Command( + "foo-it", + virtualenv_name="foo", + ) + # ... + def foo_it_command(): + import specific_dependency + +The format of ``_virtualenv_requirements.txt`` files are documented further in the +:py:class:`~mach.requirements.MachEnvRequirements` class. + +Adding a Python package +======================= + +There's two ways of using 3rd-party Python dependencies: + +* :ref:`pip install the packages `. Python dependencies with native code must + be installed using ``pip``. This is the recommended technique for adding new Python dependencies. +* :ref:`Vendor the source of the Python package in-tree `. Dependencies of the Mach + core logic or of building Firefox itself must be vendored. + +.. note:: + + For dependencies that meet both restrictions (dependency of Mach/build, *and* has + native code), see the :ref:`mach-and-build-native-dependencies` section below. + +.. _python-pip-install: + +``pip install`` the package +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To add a ``pip install``-d package dependency, add it to your site's +``python/sites/.txt`` manifest file: + +.. code:: + + ... + pypi:new-package== + ... + +.. note:: + + Some tasks are not permitted to use external resources, and for those we can + publish packages to an internal PyPI mirror. + See `how to upload to internal PyPI `_ + for more details. + +.. _python-vendor: + +Vendoring Python packages +~~~~~~~~~~~~~~~~~~~~~~~~~ + +To vendor a Python package, add it to ``third_party/python/requirements.in`` +and then run ``mach vendor python``. This will update the tree of pinned +dependencies in ``third_party/python/requirements.txt`` and download them all +into the ``third_party/python`` directory. + +Next, add that package and any new transitive dependencies (you'll see them added in +``third_party/python/requirements.txt``) to the associated site's dependency manifest in +``python/sites/.txt``: + +.. code:: + + ... + vendored:third_party/python/new-package + vendored:third_party/python/new-package-dependency-foo + vendored:third_party/python/new-package-dependency-bar + ... + +.. note:: + + The following policy applies to **ALL** vendored packages: + + * Vendored PyPI libraries **MUST NOT** be modified + * Vendored libraries **SHOULD** be released copies of libraries available on + PyPI. + + * When considering manually vendoring a package, discuss the situation with + the ``#build`` team to ensure that other, more maintainable options are exhausted. + +.. note:: + + We require that it is possible to build Firefox using only a checkout of the source, + without depending on a package index. This ensures that building Firefox is + deterministic and dependable, avoids packages from changing out from under us, + and means we’re not affected when 3rd party services are offline. We don't want a + DoS against PyPI or a random package maintainer removing an old tarball to delay + a Firefox chemspill. Therefore, packages required by Mach core logic or for building + Firefox itself must be vendored. + +.. _mach-and-build-native-dependencies: + +Mach/Build Native 3rd-party Dependencies +======================================== + +There are cases where Firefox is built without being able to ``pip install``, but where +native 3rd party Python dependencies enable optional functionality. This can't be solved +by vendoring the platform-specific libraries, as then each one would have to be stored +multiple times in-tree according to how many platforms we wish to support. + +Instead, this is solved by pre-installing such native packages onto the host system +in advance, then having Mach attempt to use such packages directly from the system. +This feature is only viable in very specific environments, as the system Python packages +have to be compatible with Mach's vendored packages. + +.. note: + + All of these native build-specific dependencies **MUST** be optional requirements + as to support the "no strings attached" builds that only use vendored packages. + +To control this behaviour, the ``MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE`` environment +variable can be used: + +.. list-table:: ``MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE`` + :header-rows: 1 + + * - ``MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE`` + - Behaviour + * - ``"pip"`` + - Mach will ``pip install`` all needed dependencies from PyPI at runtime into a Python + virtual environment that's reused in future Mach invocations. + * - ``"none"`` + - Mach will perform the build using only vendored packages. No Python virtual environment + will be created for Mach. + * - ``"system"`` + - Mach will use the host system's Python packages as part of doing the build. This option + allows the usage of native Python packages without leaning on a ``pip install`` at + build-time. This is generally slower because the system Python packages have to + be asserted to be compatible with Mach. Additionally, dependency lockfiles are ignored, + so there's higher risk of breakage. Finally, as with ``"none"``, no Python virtualenv + environment is created for Mach. + * - ```` + - Same behaviour as ``"pip"`` if ``MOZ_AUTOMATION`` isn't set. Otherwise, uses + the same behaviour as ``"none"``. + +There's a couple restrictions here: + +* ``MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE`` only applies to the top-level ``"mach"`` site, + the ``"common"`` site and the ``"build"`` site. All other sites will use ``pip install`` at + run-time as needed. + +* ``MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="system"`` is not allowed when using any site other + than ``"mach"``, ``"common"`` or ``"build"``, because: + + * As described in :ref:`package-compatibility` below, packages used by Mach are still + in scope when commands are run, and + * The host system is practically guaranteed to be incompatible with commands' dependency + lockfiles. + +The ``MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE`` environment variable fits into the following use +cases: + +Mozilla CI Builds +~~~~~~~~~~~~~~~~~ + +We need access to the native packages of ``zstandard`` and ``psutil`` to extract archives and +get OS information respectively. Use ``MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="system"``. + +Mozilla CI non-Build Tasks +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +We generally don't want to create a Mach virtual environment to avoid redundant processing, +but it's ok to ``pip install`` for specific command sites as needed, so leave +``MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE`` unset (``MOZ_AUTOMATION`` implies the default +behaviour of ``MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="none"``). + +In cases where native packages *are* needed by Mach, use +``MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="pip"``. + +Downstream CI Builds +~~~~~~~~~~~~~~~~~~~~ + +Sometimes these builds happen in sandboxed, network-less environments, and usually these builds +don't need any of the behaviour enabled by installing native Python dependencies. +Use ``MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="none"``. + +Gentoo Builds +~~~~~~~~~~~~~ + +When installing Firefox via the package manager, Gentoo generally builds it from source rather than +distributing a compiled binary artifact. Accordingly, users doing a build of Firefox in this +context don't want stray files created in ``~/.mozbuild`` or unnecessary ``pip install`` calls. +Use ``MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE="none"``. + +Firefox Developers +~~~~~~~~~~~~~~~~~~ + +Leave ``MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE`` unset so that all Mach commands can be run, +Python dependency lockfiles are respected, and optional behaviour is enabled by installing +native packages. + +.. _package-compatibility: + +Package compatibility +===================== + +Mach requires that all commands' package requirements be compatible with those of Mach itself. +(This is because functions and state created by Mach are still usable from within the commands, and +they may still need access to their associated 3rd-party modules). + +However, it is OK for Mach commands to have package requirements which are incompatible with each +other. This allows the flexibility for some Mach commands to depend on modern dependencies while +other, more mature commands may still only be compatible with a much older version. + +.. note:: + + Only one version of a package may be vendored at any given time. If two Mach commands need to + have conflicting packages, then at least one of them must ``pip install`` the package instead + of vendoring. + + If a Mach command's dependency conflicts with a vendored package, and that vendored package + isn't needed by Mach itself, then that vendored dependency should be moved from + ``python/sites/mach.txt`` to its associated environment. diff --git a/python/gdbpp/gdbpp/__init__.py b/python/gdbpp/gdbpp/__init__.py new file mode 100644 index 0000000000..7a7681aa6d --- /dev/null +++ b/python/gdbpp/gdbpp/__init__.py @@ -0,0 +1,31 @@ +# -*- 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/. + +import gdb +import gdb.printing + + +class GeckoPrettyPrinter(object): + pp = gdb.printing.RegexpCollectionPrettyPrinter("GeckoPrettyPrinters") + + def __init__(self, name, regexp): + self.name = name + self.regexp = regexp + + def __call__(self, wrapped): + GeckoPrettyPrinter.pp.add_printer(self.name, self.regexp, wrapped) + return wrapped + + +import gdbpp.enumset # NOQA: F401 +import gdbpp.linkedlist # NOQA: F401 +import gdbpp.owningthread # NOQA: F401 +import gdbpp.smartptr # NOQA: F401 +import gdbpp.string # NOQA: F401 +import gdbpp.tarray # NOQA: F401 +import gdbpp.thashtable # NOQA: F401 + +gdb.printing.register_pretty_printer(None, GeckoPrettyPrinter.pp) diff --git a/python/gdbpp/gdbpp/enumset.py b/python/gdbpp/gdbpp/enumset.py new file mode 100644 index 0000000000..6023364eb9 --- /dev/null +++ b/python/gdbpp/gdbpp/enumset.py @@ -0,0 +1,30 @@ +# -*- 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/. + +import gdb +from gdbpp import GeckoPrettyPrinter + + +@GeckoPrettyPrinter("mozilla::EnumSet", "^mozilla::EnumSet<.*>$") +class enumset_printer(object): + def __init__(self, value): + self.value = value + self.enum_type = value.type.template_argument(0) + + def children(self): + bitfield = self.value["mBitField"] + max_bit = (self.enum_type.sizeof * 8) - 1 + return ( + ("flag", gdb.Value(i).cast(self.enum_type)) + for i in range(0, max_bit) + if ((bitfield & (2 ** i)) != 0) + ) + + def to_string(self): + return str(self.value.type) + + def display_hint(self): + return "array" diff --git a/python/gdbpp/gdbpp/linkedlist.py b/python/gdbpp/gdbpp/linkedlist.py new file mode 100644 index 0000000000..1ba25a1cf0 --- /dev/null +++ b/python/gdbpp/gdbpp/linkedlist.py @@ -0,0 +1,48 @@ +# -*- 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/. + +from gdbpp import GeckoPrettyPrinter + + +# mfbt's LinkedList is a doubly-linked list where the items in the list store +# the next/prev pointers as part of themselves rather than the list structure be +# its own independent data structure. This means: +# - Every item may belong to at most one LinkedList instance. +# - For our pretty printer, we only want to pretty-print the LinkedList object +# itself. We do not want to start printing every item in the list whenever +# we run into a LinkedListElement. +@GeckoPrettyPrinter("mozilla::LinkedList", "^mozilla::LinkedList<.*>$") +class linkedlist_printer(object): + def __init__(self, value): + self.value = value + # mfbt's LinkedList has the elements of the linked list subclass from + # LinkedListElement. We want its pointer type for casting purposes. + # + # (We want to list pointers since we expect all of these objects to be + # complex enough that we don't want to automatically expand them. The + # LinkedListElement type itself isn't small.) + self.t_ptr_type = value.type.template_argument(0).pointer() + + def children(self): + # Walk mNext until we loop back around to the sentinel. The sentinel + # item always exists and in the zero-length base-case mNext == sentinel, + # so extract that immediately and update it throughout the loop. + sentinel = self.value["sentinel"] + pSentinel = sentinel.address + pNext = sentinel["mNext"] + i = 0 + while pSentinel != pNext: + list_elem = pNext.dereference() + list_value = pNext.cast(self.t_ptr_type) + yield ("%d" % i, list_value) + pNext = list_elem["mNext"] + i += 1 + + def to_string(self): + return str(self.value.type) + + def display_hint(self): + return "array" diff --git a/python/gdbpp/gdbpp/owningthread.py b/python/gdbpp/gdbpp/owningthread.py new file mode 100644 index 0000000000..cdf0b30c82 --- /dev/null +++ b/python/gdbpp/gdbpp/owningthread.py @@ -0,0 +1,25 @@ +# -*- 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/. + +import gdb +from gdbpp import GeckoPrettyPrinter + + +@GeckoPrettyPrinter("nsAutoOwningThread", "^nsAutoOwningThread$") +class owning_thread_printer(object): + def __init__(self, value): + self.value = value + + def to_string(self): + prthread_type = gdb.lookup_type("PRThread").pointer() + prthread = self.value["mThread"].cast(prthread_type) + name = prthread["name"] + + # if the thread doesn't have a name try to get its thread id (might not + # work on !linux) + name = prthread["tid"] + + return name if name else "(PRThread *) %s" % prthread diff --git a/python/gdbpp/gdbpp/smartptr.py b/python/gdbpp/gdbpp/smartptr.py new file mode 100644 index 0000000000..ecc35bee28 --- /dev/null +++ b/python/gdbpp/gdbpp/smartptr.py @@ -0,0 +1,60 @@ +# -*- 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/. + +from gdbpp import GeckoPrettyPrinter + + +@GeckoPrettyPrinter("nsWeakPtr", "^nsCOMPtr$") +class weak_ptr_printer(object): + def __init__(self, value): + self.value = value + + def to_string(self): + proxy = self.value["mRawPtr"] + if not proxy: + return "[(%s) 0x0]" % proxy.type + + ref_type = proxy.dynamic_type + weak_ptr = proxy.cast(ref_type).dereference()["mReferent"] + if not weak_ptr: + return "[(%s) %s]" % (weak_ptr.type, weak_ptr) + + return "[(%s) %s]" % (weak_ptr.dynamic_type, weak_ptr) + + +@GeckoPrettyPrinter("mozilla::StaticAutoPtr", "^mozilla::StaticAutoPtr<.*>$") +@GeckoPrettyPrinter("mozilla::StaticRefPtr", "^mozilla::StaticRefPtr<.*>$") +@GeckoPrettyPrinter("nsAutoPtr", "^nsAutoPtr<.*>$") +@GeckoPrettyPrinter("nsCOMPtr", "^nsCOMPtr<.*>$") +@GeckoPrettyPrinter("RefPtr", "^RefPtr<.*>$") +class smartptr_printer(object): + def __init__(self, value): + self.value = value["mRawPtr"] + + def children(self): + yield ("mRawPtr", self.value) + + def to_string(self): + if not self.value: + type_name = str(self.value.type) + else: + type_name = str(self.value.dereference().dynamic_type.pointer()) + + return "[(%s)]" % (type_name) + + +@GeckoPrettyPrinter("UniquePtr", "^mozilla::UniquePtr<.*>$") +class uniqueptr_printer(object): + def __init__(self, value): + self.value = value["mTuple"]["mFirstA"] + + def to_string(self): + if not self.value: + type_name = str(self.value.type) + else: + type_name = str(self.value.dereference().dynamic_type.pointer()) + + return "[(%s) %s]" % (type_name, str(self.value)) diff --git a/python/gdbpp/gdbpp/string.py b/python/gdbpp/gdbpp/string.py new file mode 100644 index 0000000000..b5722f2c62 --- /dev/null +++ b/python/gdbpp/gdbpp/string.py @@ -0,0 +1,21 @@ +# -*- 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/. + +from gdbpp import GeckoPrettyPrinter + + +@GeckoPrettyPrinter("nsTSubstring", "^nsTSubstring<.*>$") +@GeckoPrettyPrinter("nsTAutoStringN", "^nsTAutoStringN<.*>$") +@GeckoPrettyPrinter("nsString", "^nsTString<.*>$") +class string_printer(object): + def __init__(self, value): + self.value = value + + def to_string(self): + return self.value["mData"] + + def display_hint(self): + return "string" diff --git a/python/gdbpp/gdbpp/tarray.py b/python/gdbpp/gdbpp/tarray.py new file mode 100644 index 0000000000..a5c82253b9 --- /dev/null +++ b/python/gdbpp/gdbpp/tarray.py @@ -0,0 +1,29 @@ +# -*- 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/. + +from gdbpp import GeckoPrettyPrinter + + +@GeckoPrettyPrinter("InfallibleTArray", "^InfallibleTArray<.*>$") +@GeckoPrettyPrinter("FallibleTArray", "^FallibleTArray<.*>$") +@GeckoPrettyPrinter("AutoTArray", "^AutoTArray<.*>$") +@GeckoPrettyPrinter("nsTArray", "^nsTArray<.*>$") +class tarray_printer(object): + def __init__(self, value): + self.value = value + self.elem_type = value.type.template_argument(0) + + def children(self): + length = self.value["mHdr"].dereference()["mLength"] + data = self.value["mHdr"] + 1 + elements = data.cast(self.elem_type.pointer()) + return (("%d" % i, (elements + i).dereference()) for i in range(0, int(length))) + + def to_string(self): + return str(self.value.type) + + def display_hint(self): + return "array" diff --git a/python/gdbpp/gdbpp/thashtable.py b/python/gdbpp/gdbpp/thashtable.py new file mode 100644 index 0000000000..5775f29947 --- /dev/null +++ b/python/gdbpp/gdbpp/thashtable.py @@ -0,0 +1,151 @@ +# -*- 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/. + +import gdb +from gdbpp import GeckoPrettyPrinter + + +def walk_template_to_given_base(value, desired_tag_prefix): + """Given a value of some template subclass, walk up its ancestry until we + hit the desired type, then return the appropriate value (which will then + have that type). + """ + # Base case + t = value.type + # It's possible that we're dealing with an alias template that looks like: + # template + # using ManagedContainer = nsTHashtable>; + # In which case we want to strip the indirection, and strip_typedefs() + # accomplishes this. (Disclaimer: I tried it and it worked and it didn't + # break my other use cases, if things start exploding, do reconsider.) + t = t.strip_typedefs() + if t.tag.startswith(desired_tag_prefix): + return value + for f in t.fields(): + # we only care about the inheritance hierarchy + if not f.is_base_class: + continue + # This is the answer or something we're going to need to recurse into. + fv = value[f] + ft = fv.type + # slightly optimize by checking the tag rather than in the recursion + if ft.tag.startswith(desired_tag_prefix): + # found it! + return fv + return walk_template_to_given_base(fv, desired_tag_prefix) + return None + + +# The templates and their inheritance hierarchy form an onion of types around +# the nsTHashtable core at the center. All we care about is that nsTHashtable, +# but we register for the descendant types in order to avoid the default pretty +# printers having to unwrap those onion layers, wasting precious lines. +@GeckoPrettyPrinter("nsClassHashtable", "^nsClassHashtable<.*>$") +@GeckoPrettyPrinter("nsDataHashtable", "^nsDataHashtable<.*>$") +@GeckoPrettyPrinter("nsInterfaceHashtable", "^nsInterfaceHashtable<.*>$") +@GeckoPrettyPrinter("nsRefPtrHashtable", "^nsRefPtrHashtable<.*>$") +@GeckoPrettyPrinter("nsBaseHashtable", "^nsBaseHashtable<.*>$") +@GeckoPrettyPrinter("nsTHashtable", "^nsTHashtable<.*>$") +class thashtable_printer(object): + def __init__(self, outer_value): + self.outermost_type = outer_value.type + + value = walk_template_to_given_base(outer_value, "nsTHashtable<") + self.value = value + + self.entry_type = value.type.template_argument(0) + + # -- Determine whether we're a hashTABLE or a hashSET + # If we're a table, the entry type will be a nsBaseHashtableET template. + # If we're a set, it will be something like nsPtrHashKey. + # + # So, assume we're a set if we're not nsBaseHashtableET< + # (It should ideally also be true that the type ends with HashKey, but + # since nsBaseHashtableET causes us to assume "mData" exists, let's + # pivot based on that.) + self.is_table = self.entry_type.tag.startswith("nsBaseHashtableET<") + + # While we know that it has a field `mKeyHash` for the hash-code and + # book-keeping, and a DataType field mData for the value (if we're a + # table), the key field frustratingly varies by key type. + # + # So we want to walk its key type to figure out the field name. And we + # do mean field name. The field object is no good for subscripting the + # value unless the field was directly owned by that value's type. But + # by using a string name, we save ourselves all that fanciness. + + if self.is_table: + # For nsBaseHashtableET, we want the KeyClass + key_type = self.entry_type.template_argument(0) + else: + # If we're a set, our entry type is the key class already! + key_type = self.entry_type + self.key_field_name = None + for f in key_type.fields(): + # No need to traverse up the type hierarchy... + if f.is_base_class: + continue + # ...just to skip the fields we know exist... + if f.name == "mKeyHash" or f.name == "mData": + continue + # ...and assume the first one we find is the key. + self.key_field_name = f.name + break + + def children(self): + table = self.value["mTable"] + + # mEntryCount is the number of occupied slots/entries in the table. + # We can use this to avoid doing wasted memory reads. + entryCount = table["mEntryCount"] + if entryCount == 0: + return + + # The table capacity is tracked "cleverly" in terms of how many bits + # the hash needs to be shifted. CapacityFromHashShift calculates this + # quantity, but may be inlined, so we replicate the calculation here. + hashType = gdb.lookup_type("mozilla::HashNumber") + hashBits = hashType.sizeof * 8 + capacity = 1 << (hashBits - table["mHashShift"]) + + # Pierce generation-tracking EntryStore class to get at buffer. The + # class instance always exists, but this char* may be null. + store = table["mEntryStore"]["mEntryStore"] + + key_field_name = self.key_field_name + + # The entry store is laid out with hashes for all possible entries + # first, followed by all the entries. + pHashes = store.cast(hashType.pointer()) + pEntries = pHashes + capacity + pEntries = pEntries.cast(self.entry_type.pointer()) + seenCount = 0 + for i in range(0, int(capacity)): + entryHash = (pHashes + i).dereference() + # An entry hash of 0 means empty, 1 means deleted sentinel, so skip + # if that's the case. + if entryHash <= 1: + continue + + entry = (pEntries + i).dereference() + yield ("%d" % i, entry[key_field_name]) + if self.is_table: + yield ("%d" % i, entry["mData"]) + + # Stop iterating if we know there are no more occupied slots. + seenCount += 1 + if seenCount >= entryCount: + break + + def to_string(self): + # The most specific template type is the most interesting. + return str(self.outermost_type) + + def display_hint(self): + if self.is_table: + return "map" + else: + return "array" diff --git a/python/l10n/fluent_migrations/__init__.py b/python/l10n/fluent_migrations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/python/l10n/fluent_migrations/bug_1347955_aboutLogging.py b/python/l10n/fluent_migrations/bug_1347955_aboutLogging.py new file mode 100644 index 0000000000..a10aa1ae8d --- /dev/null +++ b/python/l10n/fluent_migrations/bug_1347955_aboutLogging.py @@ -0,0 +1,35 @@ +# coding=utf8 + +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + + +from fluent.migrate.helpers import transforms_from +from fluent.migrate import COPY_PATTERN + + +def migrate(ctx): + """Bug 1347955 - Move the logging sub-page of about:networking to about:logging, part {index}""" + ctx.add_transforms( + "toolkit/toolkit/about/aboutLogging.ftl", + "toolkit/toolkit/about/aboutLogging.ftl", + transforms_from( + """ +about-logging-current-log-file = + {COPY_PATTERN(from_path, "about-networking-current-log-file")} +about-logging-current-log-modules = + {COPY_PATTERN(from_path, "about-networking-current-log-modules")} +about-logging-set-log-file = + {COPY_PATTERN(from_path, "about-networking-set-log-file")} +about-logging-set-log-modules = + {COPY_PATTERN(from_path, "about-networking-set-log-modules")} +about-logging-start-logging = + {COPY_PATTERN(from_path, "about-networking-start-logging")} +about-logging-stop-logging = + {COPY_PATTERN(from_path, "about-networking-stop-logging")} +about-logging-log-tutorial = + {COPY_PATTERN(from_path, "about-networking-log-tutorial")} + """, + from_path="toolkit/toolkit/about/aboutNetworking.ftl", + ), + ) diff --git a/python/l10n/fluent_migrations/bug_1552333_aboutCertError.py b/python/l10n/fluent_migrations/bug_1552333_aboutCertError.py new file mode 100644 index 0000000000..5c8300e01f --- /dev/null +++ b/python/l10n/fluent_migrations/bug_1552333_aboutCertError.py @@ -0,0 +1,40 @@ +# coding=utf8 + +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + +import fluent.syntax.ast as FTL +from fluent.migrate.helpers import transforms_from +from fluent.migrate.helpers import VARIABLE_REFERENCE +from fluent.migrate import COPY, REPLACE + + +def migrate(ctx): + """Bug 1552333 - Migrate strings from pipnss.properties to aboutCertError.ftl""" + ctx.add_transforms( + "browser/browser/aboutCertError.ftl", + "browser/browser/aboutCertError.ftl", + transforms_from( + """ +cert-error-symantec-distrust-admin = { COPY(from_path, "certErrorSymantecDistrustAdministrator") } +""", + from_path="security/manager/chrome/pipnss/pipnss.properties", + ), + ) + ctx.add_transforms( + "browser/browser/aboutCertError.ftl", + "browser/browser/aboutCertError.ftl", + [ + FTL.Message( + id=FTL.Identifier("cert-error-symantec-distrust-description"), + value=REPLACE( + "security/manager/chrome/pipnss/pipnss.properties", + "certErrorSymantecDistrustDescription1", + { + "%1$S": VARIABLE_REFERENCE("hostname"), + }, + normalize_printf=True, + ), + ), + ], + ) diff --git a/python/l10n/fluent_migrations/bug_1577257_profiler_title.py b/python/l10n/fluent_migrations/bug_1577257_profiler_title.py new file mode 100644 index 0000000000..4091e596da --- /dev/null +++ b/python/l10n/fluent_migrations/bug_1577257_profiler_title.py @@ -0,0 +1,22 @@ +# coding=utf8 + +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + +from fluent.migrate.helpers import transforms_from +from fluent.migrate import COPY_PATTERN + + +def migrate(ctx): + """Bug 1577257 - Share logic behind panel headers across the UI, part {index}""" + ctx.add_transforms( + "browser/browser/appmenu.ftl", + "browser/browser/appmenu.ftl", + transforms_from( + """ +profiler-popup-header-text = + { COPY_PATTERN(from_path, "profiler-popup-title.value") } +""", + from_path="browser/browser/appmenu.ftl", + ), + ) diff --git a/python/l10n/fluent_migrations/bug_1635548_browser_context.py b/python/l10n/fluent_migrations/bug_1635548_browser_context.py new file mode 100644 index 0000000000..33bd0efc95 --- /dev/null +++ b/python/l10n/fluent_migrations/bug_1635548_browser_context.py @@ -0,0 +1,82 @@ +# coding=utf8 + +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + +import fluent.syntax.ast as FTL +from fluent.migrate.helpers import transforms_from, VARIABLE_REFERENCE +from fluent.migrate import REPLACE, COPY + + +def migrate(ctx): + """Bug 1635548 - Migrate browser-context.inc to Fluent, part {index}""" + target = "toolkit/toolkit/global/textActions.ftl" + reference = "toolkit/toolkit/global/textActions.ftl" + ctx.add_transforms( + target, + reference, + transforms_from( + """ +text-action-spell-add-to-dictionary = + .label = { COPY(from_path, "spellAddToDictionary.label") } + .accesskey = { COPY(from_path, "spellAddToDictionary.accesskey") } + +text-action-spell-undo-add-to-dictionary = + .label = { COPY(from_path, "spellUndoAddToDictionary.label") } + .accesskey = { COPY(from_path, "spellUndoAddToDictionary.accesskey") } + +text-action-spell-check-toggle = + .label = { COPY(from_path, "spellCheckToggle.label") } + .accesskey = { COPY(from_path, "spellCheckToggle.accesskey") } + +text-action-spell-dictionaries = + .label = { COPY(from_path, "spellDictionaries.label") } + .accesskey = { COPY(from_path, "spellDictionaries.accesskey") } +""", + from_path="toolkit/chrome/global/textcontext.dtd", + ), + ) + + target = "toolkit/toolkit/global/textActions.ftl" + reference = "toolkit/toolkit/global/textActions.ftl" + ctx.add_transforms( + target, + reference, + transforms_from( + """ +text-action-spell-add-dictionaries = + .label = { COPY(from_path, "spellAddDictionaries.label") } + .accesskey = { COPY(from_path, "spellAddDictionaries.accesskey") } +""", + from_path="browser/chrome/browser/browser.dtd", + ), + ) + + target = "browser/browser/browserContext.ftl" + reference = "browser/browser/browserContext.ftl" + ctx.add_transforms( + target, + reference, + [ + FTL.Message( + id=FTL.Identifier("main-context-menu-open-link-in-container-tab"), + attributes=[ + FTL.Attribute( + FTL.Identifier("label"), + REPLACE( + "browser/chrome/browser/browser.properties", + "userContextOpenLink.label", + {"%1$S": VARIABLE_REFERENCE("containerName")}, + ), + ), + FTL.Attribute( + FTL.Identifier("accesskey"), + COPY( + "browser/chrome/browser/browser.dtd", + "openLinkCmdInTab.accesskey", + ), + ), + ], + ) + ], + ) diff --git a/python/l10n/fluent_migrations/bug_1760029_tabbrowser.py b/python/l10n/fluent_migrations/bug_1760029_tabbrowser.py new file mode 100644 index 0000000000..9fe8cf3a7d --- /dev/null +++ b/python/l10n/fluent_migrations/bug_1760029_tabbrowser.py @@ -0,0 +1,399 @@ +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + +import fluent.syntax.ast as FTL +from fluent.migrate.helpers import TERM_REFERENCE, VARIABLE_REFERENCE +from fluent.migrate.transforms import COPY, PLURALS, REPLACE, REPLACE_IN_TEXT, Transform + + +def migrate(ctx): + """Bug 1760029 - Migrate tabbrowser to Fluent, part {index}.""" + + source = "browser/chrome/browser/tabbrowser.properties" + target = "browser/browser/tabbrowser.ftl" + + browser_source = "browser/chrome/browser/browser.properties" + browser_target = "browser/browser/browser.ftl" + + ctx.add_transforms( + target, + target, + [ + FTL.Message( + id=FTL.Identifier("tabbrowser-empty-tab-title"), + value=COPY(source, "tabs.emptyTabTitle"), + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-empty-private-tab-title"), + value=COPY(source, "tabs.emptyPrivateTabTitle2"), + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-menuitem-close-tab"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), value=COPY(source, "tabs.closeTab") + ) + ], + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-menuitem-close"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), value=COPY(source, "tabs.close") + ) + ], + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-container-tab-title"), + value=REPLACE( + source, + "tabs.containers.tooltip", + { + "%1$S": VARIABLE_REFERENCE("title"), + "%2$S": VARIABLE_REFERENCE("containerName"), + }, + ), + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-tab-tooltip"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=FTL.Pattern([FTL.Placeable(VARIABLE_REFERENCE("title"))]), + ) + ], + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-close-tabs-tooltip"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=PLURALS( + source, + "tabs.closeTabs.tooltip", + VARIABLE_REFERENCE("tabCount"), + foreach=lambda n: REPLACE_IN_TEXT( + n, + {"#1": VARIABLE_REFERENCE("tabCount")}, + ), + ), + ) + ], + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-mute-tab-audio-tooltip"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=PLURALS( + source, + "tabs.muteAudio2.tooltip", + VARIABLE_REFERENCE("tabCount"), + foreach=lambda text: REPLACE_IN_TEXT( + text, + { + "#1": VARIABLE_REFERENCE("tabCount"), + "%S": VARIABLE_REFERENCE("shortcut"), + }, + ), + ), + ) + ], + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-unmute-tab-audio-tooltip"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=PLURALS( + source, + "tabs.unmuteAudio2.tooltip", + VARIABLE_REFERENCE("tabCount"), + foreach=lambda text: REPLACE_IN_TEXT( + text, + { + "#1": VARIABLE_REFERENCE("tabCount"), + "%S": VARIABLE_REFERENCE("shortcut"), + }, + ), + ), + ) + ], + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-mute-tab-audio-background-tooltip"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=PLURALS( + source, + "tabs.muteAudio2.background.tooltip", + VARIABLE_REFERENCE("tabCount"), + foreach=lambda n: REPLACE_IN_TEXT( + n, + {"#1": VARIABLE_REFERENCE("tabCount")}, + ), + ), + ) + ], + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-unmute-tab-audio-background-tooltip"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=PLURALS( + source, + "tabs.unmuteAudio2.background.tooltip", + VARIABLE_REFERENCE("tabCount"), + foreach=lambda n: REPLACE_IN_TEXT( + n, + {"#1": VARIABLE_REFERENCE("tabCount")}, + ), + ), + ) + ], + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-unblock-tab-audio-tooltip"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=PLURALS( + source, + "tabs.unblockAudio2.tooltip", + VARIABLE_REFERENCE("tabCount"), + foreach=lambda n: REPLACE_IN_TEXT( + n, + {"#1": VARIABLE_REFERENCE("tabCount")}, + ), + ), + ) + ], + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-confirm-close-tabs-title"), + value=PLURALS( + source, + "tabs.closeTabsTitle", + VARIABLE_REFERENCE("tabCount"), + foreach=lambda n: REPLACE_IN_TEXT( + n, + {"#1": VARIABLE_REFERENCE("tabCount")}, + ), + ), + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-confirm-close-tabs-button"), + value=COPY(source, "tabs.closeButtonMultiple"), + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-confirm-close-tabs-checkbox"), + value=COPY(source, "tabs.closeTabsConfirmCheckbox"), + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-confirm-close-windows-title"), + value=PLURALS( + source, + "tabs.closeWindowsTitle", + VARIABLE_REFERENCE("windowCount"), + foreach=lambda n: REPLACE_IN_TEXT( + n, + {"#1": VARIABLE_REFERENCE("windowCount")}, + ), + ), + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-confirm-close-windows-button"), + value=Transform.pattern_of( + FTL.SelectExpression( + selector=FTL.FunctionReference( + id=FTL.Identifier("PLATFORM"), arguments=FTL.CallArguments() + ), + variants=[ + FTL.Variant( + key=FTL.Identifier("windows"), + value=COPY(source, "tabs.closeWindowsButtonWin"), + ), + FTL.Variant( + key=FTL.Identifier("other"), + value=COPY(source, "tabs.closeWindowsButton"), + default=True, + ), + ], + ) + ), + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-confirm-close-tabs-with-key-title"), + value=REPLACE( + source, + "tabs.closeTabsWithKeyTitle", + {"%1$S": TERM_REFERENCE("brand-short-name")}, + ), + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-confirm-close-tabs-with-key-button"), + value=REPLACE( + source, + "tabs.closeTabsWithKeyButton", + {"%1$S": TERM_REFERENCE("brand-short-name")}, + ), + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-confirm-close-tabs-with-key-checkbox"), + value=REPLACE( + source, + "tabs.closeTabsWithKeyConfirmCheckbox", + {"%1$S": VARIABLE_REFERENCE("quitKey")}, + ), + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-confirm-open-multiple-tabs-title"), + value=COPY(source, "tabs.openWarningTitle"), + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-confirm-open-multiple-tabs-message"), + value=Transform.pattern_of( + FTL.SelectExpression( + selector=VARIABLE_REFERENCE("tabCount"), + variants=[ + FTL.Variant( + key=FTL.Identifier("other"), + value=REPLACE( + source, + "tabs.openWarningMultipleBranded", + { + "%1$S": VARIABLE_REFERENCE("tabCount"), + "%2$S": TERM_REFERENCE("brand-short-name"), + ". ": FTL.TextElement(". "), + }, + ), + default=True, + ), + ], + ) + ), + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-confirm-open-multiple-tabs-button"), + value=COPY(source, "tabs.openButtonMultiple"), + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-confirm-open-multiple-tabs-checkbox"), + value=REPLACE( + source, + "tabs.openWarningPromptMeBranded", + {"%1$S": TERM_REFERENCE("brand-short-name")}, + ), + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-confirm-caretbrowsing-title"), + value=COPY(source, "browsewithcaret.checkWindowTitle"), + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-confirm-caretbrowsing-message"), + value=COPY(source, "browsewithcaret.checkLabel"), + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-confirm-caretbrowsing-checkbox"), + value=COPY(source, "browsewithcaret.checkMsg"), + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-customizemode-tab-title"), + value=REPLACE( + browser_source, + "customizeMode.tabTitle", + {"%1$S": TERM_REFERENCE("brand-short-name")}, + ), + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-context-mute-tab"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=COPY(browser_source, "muteTab.label"), + ), + FTL.Attribute( + id=FTL.Identifier("accesskey"), + value=COPY(browser_source, "muteTab.accesskey"), + ), + ], + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-context-unmute-tab"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=COPY(browser_source, "unmuteTab.label"), + ), + FTL.Attribute( + id=FTL.Identifier("accesskey"), + value=COPY(browser_source, "unmuteTab.accesskey"), + ), + ], + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-context-mute-selected-tabs"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=COPY(browser_source, "muteSelectedTabs2.label"), + ), + FTL.Attribute( + id=FTL.Identifier("accesskey"), + value=COPY(browser_source, "muteSelectedTabs2.accesskey"), + ), + ], + ), + FTL.Message( + id=FTL.Identifier("tabbrowser-context-unmute-selected-tabs"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=COPY(browser_source, "unmuteSelectedTabs2.label"), + ), + FTL.Attribute( + id=FTL.Identifier("accesskey"), + value=COPY(browser_source, "unmuteSelectedTabs2.accesskey"), + ), + ], + ), + ], + ) + + ctx.add_transforms( + browser_target, + browser_target, + [ + FTL.Message( + id=FTL.Identifier("refresh-blocked-refresh-label"), + value=REPLACE( + browser_source, + "refreshBlocked.refreshLabel", + {"%1$S": TERM_REFERENCE("brand-short-name")}, + ), + ), + FTL.Message( + id=FTL.Identifier("refresh-blocked-redirect-label"), + value=REPLACE( + browser_source, + "refreshBlocked.redirectLabel", + {"%1$S": TERM_REFERENCE("brand-short-name")}, + ), + ), + FTL.Message( + id=FTL.Identifier("refresh-blocked-allow"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=COPY(browser_source, "refreshBlocked.goButton"), + ), + FTL.Attribute( + id=FTL.Identifier("accesskey"), + value=COPY(browser_source, "refreshBlocked.goButton.accesskey"), + ), + ], + ), + ], + ) diff --git a/python/l10n/fluent_migrations/bug_1780585_pipFocusedstate.py b/python/l10n/fluent_migrations/bug_1780585_pipFocusedstate.py new file mode 100644 index 0000000000..6b1e706918 --- /dev/null +++ b/python/l10n/fluent_migrations/bug_1780585_pipFocusedstate.py @@ -0,0 +1,54 @@ +# coding=utf8 + +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + +from fluent.migrate import COPY_PATTERN +from fluent.migrate.helpers import transforms_from + + +def migrate(ctx): + """Bug 1780585 - Enhanced focused states on PiP controls, part {index}.""" + + ctx.add_transforms( + "toolkit/toolkit/pictureinpicture/pictureinpicture.ftl", + "toolkit/toolkit/pictureinpicture/pictureinpicture.ftl", + transforms_from( + """ +pictureinpicture-pause-btn = + .aria-label = {COPY_PATTERN(from_path, "pictureinpicture-pause-cmd.aria-label")} + .tooltip = {COPY_PATTERN(from_path, "pictureinpicture-pause-cmd.title")} +pictureinpicture-play-btn = + .aria-label = {COPY_PATTERN(from_path, "pictureinpicture-play-cmd.aria-label")} + .tooltip = {COPY_PATTERN(from_path, "pictureinpicture-play-cmd.title")} +pictureinpicture-mute-btn = + .aria-label = {COPY_PATTERN(from_path, "pictureinpicture-mute-cmd.aria-label")} + .tooltip = {COPY_PATTERN(from_path, "pictureinpicture-mute-cmd.title")} +pictureinpicture-unmute-btn = + .aria-label = {COPY_PATTERN(from_path, "pictureinpicture-unmute-cmd.aria-label")} + .tooltip = {COPY_PATTERN(from_path, "pictureinpicture-unmute-cmd.title")} +pictureinpicture-unpip-btn = + .aria-label = {COPY_PATTERN(from_path, "pictureinpicture-unpip-cmd.aria-label")} + .tooltip = {COPY_PATTERN(from_path, "pictureinpicture-unpip-cmd.title")} +pictureinpicture-close-btn = + .aria-label = {COPY_PATTERN(from_path, "pictureinpicture-close-cmd.aria-label")} + .tooltip = {COPY_PATTERN(from_path, "pictureinpicture-close-cmd.title")} +pictureinpicture-subtitles-btn = + .aria-label = {COPY_PATTERN(from_path, "pictureinpicture-subtitles-cmd.aria-label")} + .tooltip = {COPY_PATTERN(from_path, "pictureinpicture-subtitles-cmd.title")} +pictureinpicture-fullscreen-btn = + .aria-label = {COPY_PATTERN(from_path, "pictureinpicture-fullscreen-cmd.aria-label")} + .tooltip = {COPY_PATTERN(from_path, "pictureinpicture-fullscreen-cmd.title")} +pictureinpicture-exit-fullscreen-btn = + .aria-label = {COPY_PATTERN(from_path, "pictureinpicture-exit-fullscreen-cmd.aria-label")} + .tooltip = {COPY_PATTERN(from_path, "pictureinpicture-exit-fullscreen-cmd.title")} +pictureinpicture-seekbackward-btn = + .aria-label = {COPY_PATTERN(from_path, "pictureinpicture-seekbackward-cmd.aria-label")} + .tooltip = {COPY_PATTERN(from_path, "pictureinpicture-seekbackward-cmd.title")} +pictureinpicture-seekforward-btn = + .aria-label = {COPY_PATTERN(from_path, "pictureinpicture-seekforward-cmd.aria-label")} + .tooltip = {COPY_PATTERN(from_path, "pictureinpicture-seekforward-cmd.title")} + """, + from_path="toolkit/toolkit/pictureinpicture/pictureinpicture.ftl", + ), + ) diff --git a/python/l10n/fluent_migrations/bug_1786186_mobile_aboutConfig.py b/python/l10n/fluent_migrations/bug_1786186_mobile_aboutConfig.py new file mode 100644 index 0000000000..99c6673f92 --- /dev/null +++ b/python/l10n/fluent_migrations/bug_1786186_mobile_aboutConfig.py @@ -0,0 +1,65 @@ +# coding=utf8 + +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + +import fluent.syntax.ast as FTL +from fluent.migrate.helpers import transforms_from +from fluent.migrate.transforms import COPY + + +def migrate(ctx): + """Bug 1786186 - Migrate mobile about:config to Fluent, part {index}""" + + target = "mobile/android/mobile/android/aboutConfig.ftl" + + ctx.add_transforms( + target, + target, + transforms_from( + """ + +config-toolbar-search = + .placeholder = { COPY(path1, "toolbar.searchPlaceholder") } +config-new-pref-name = + .placeholder = { COPY(path1, "newPref.namePlaceholder") } +config-new-pref-value-boolean = { COPY(path1, "newPref.valueBoolean") } +config-new-pref-value-string = { COPY(path1, "newPref.valueString") } +config-new-pref-value-integer = { COPY(path1, "newPref.valueInteger") } +config-new-pref-string = + .placeholder = { COPY(path1, "newPref.stringPlaceholder") } +config-new-pref-number = + .placeholder = { COPY(path1, "newPref.numberPlaceholder") } +config-new-pref-cancel-button = { COPY(path1, "newPref.cancelButton") } +config-context-menu-copy-pref-name = + .label = { COPY(path1, "contextMenu.copyPrefName") } +config-context-menu-copy-pref-value = + .label = { COPY(path1, "contextMenu.copyPrefValue") } +""", + path1="mobile/android/chrome/config.dtd", + ), + ) + + source = "mobile/android/chrome/config.properties" + ctx.add_transforms( + target, + target, + [ + FTL.Message( + id=FTL.Identifier("config-new-pref-create-button"), + value=COPY(source, "newPref.createButton"), + ), + FTL.Message( + id=FTL.Identifier("config-new-pref-change-button"), + value=COPY(source, "newPref.changeButton"), + ), + FTL.Message( + id=FTL.Identifier("config-pref-toggle-button"), + value=COPY(source, "pref.toggleButton"), + ), + FTL.Message( + id=FTL.Identifier("config-pref-reset-button"), + value=COPY(source, "pref.resetButton"), + ), + ], + ) diff --git a/python/l10n/fluent_migrations/bug_1790387_featureCallout_a11y.py b/python/l10n/fluent_migrations/bug_1790387_featureCallout_a11y.py new file mode 100644 index 0000000000..0d6d839acd --- /dev/null +++ b/python/l10n/fluent_migrations/bug_1790387_featureCallout_a11y.py @@ -0,0 +1,22 @@ +# coding=utf8 + +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + +from fluent.migrate import COPY_PATTERN +from fluent.migrate.helpers import transforms_from + + +def migrate(ctx): + """Bug 1790387 - A11y improvements for the Feature Callout step indicator, part {index}""" + ctx.add_transforms( + "browser/browser/newtab/onboarding.ftl", + "browser/browser/newtab/onboarding.ftl", + transforms_from( + """ +onboarding-welcome-steps-indicator-label = + .aria-label = { COPY_PATTERN(from_path, "onboarding-welcome-steps-indicator2.aria-valuetext") } +""", + from_path="browser/browser/newtab/onboarding.ftl", + ), + ) diff --git a/python/l10n/fluent_migrations/bug_1791178_downloadUI.py b/python/l10n/fluent_migrations/bug_1791178_downloadUI.py new file mode 100644 index 0000000000..d6256889f2 --- /dev/null +++ b/python/l10n/fluent_migrations/bug_1791178_downloadUI.py @@ -0,0 +1,187 @@ +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + +import fluent.syntax.ast as FTL +from fluent.migrate.helpers import VARIABLE_REFERENCE +from fluent.migrate.transforms import COPY, REPLACE, Transform + + +def migrate(ctx): + """Bug 1791178 - Convert DownloadUIHelper.jsm to Fluent, part {index}.""" + + source = "toolkit/chrome/mozapps/downloads/downloads.properties" + target = "toolkit/toolkit/downloads/downloadUI.ftl" + ctx.add_transforms( + target, + target, + [ + FTL.Message( + id=FTL.Identifier("download-ui-confirm-title"), + value=COPY(source, "quitCancelDownloadsAlertTitle"), + ), + FTL.Message( + id=FTL.Identifier("download-ui-confirm-quit-cancel-downloads"), + value=Transform.pattern_of( + FTL.SelectExpression( + selector=VARIABLE_REFERENCE("downloadsCount"), + variants=[ + FTL.Variant( + key=FTL.Identifier("1"), + value=COPY(source, "quitCancelDownloadsAlertMsg"), + ), + FTL.Variant( + key=FTL.Identifier("other"), + default=True, + value=REPLACE( + source, + "quitCancelDownloadsAlertMsgMultiple", + {"%1$S": VARIABLE_REFERENCE("downloadsCount")}, + ), + ), + ], + ) + ), + ), + FTL.Message( + id=FTL.Identifier("download-ui-confirm-quit-cancel-downloads-mac"), + value=Transform.pattern_of( + FTL.SelectExpression( + selector=VARIABLE_REFERENCE("downloadsCount"), + variants=[ + FTL.Variant( + key=FTL.Identifier("1"), + value=COPY(source, "quitCancelDownloadsAlertMsgMac"), + ), + FTL.Variant( + key=FTL.Identifier("other"), + default=True, + value=REPLACE( + source, + "quitCancelDownloadsAlertMsgMacMultiple", + {"%1$S": VARIABLE_REFERENCE("downloadsCount")}, + ), + ), + ], + ) + ), + ), + FTL.Message( + id=FTL.Identifier("download-ui-confirm-offline-cancel-downloads"), + value=Transform.pattern_of( + FTL.SelectExpression( + selector=VARIABLE_REFERENCE("downloadsCount"), + variants=[ + FTL.Variant( + key=FTL.Identifier("1"), + value=COPY(source, "offlineCancelDownloadsAlertMsg"), + ), + FTL.Variant( + key=FTL.Identifier("other"), + default=True, + value=REPLACE( + source, + "offlineCancelDownloadsAlertMsgMultiple", + {"%1$S": VARIABLE_REFERENCE("downloadsCount")}, + ), + ), + ], + ) + ), + ), + FTL.Message( + id=FTL.Identifier( + "download-ui-confirm-leave-private-browsing-windows-cancel-downloads" + ), + value=Transform.pattern_of( + FTL.SelectExpression( + selector=VARIABLE_REFERENCE("downloadsCount"), + variants=[ + FTL.Variant( + key=FTL.Identifier("1"), + value=COPY( + source, + "leavePrivateBrowsingWindowsCancelDownloadsAlertMsg2", + ), + ), + FTL.Variant( + key=FTL.Identifier("other"), + default=True, + value=REPLACE( + source, + "leavePrivateBrowsingWindowsCancelDownloadsAlertMsgMultiple2", + {"%1$S": VARIABLE_REFERENCE("downloadsCount")}, + ), + ), + ], + ) + ), + ), + FTL.Message( + id=FTL.Identifier("download-ui-cancel-downloads-ok"), + value=Transform.pattern_of( + FTL.SelectExpression( + selector=VARIABLE_REFERENCE("downloadsCount"), + variants=[ + FTL.Variant( + key=FTL.Identifier("1"), + value=COPY(source, "cancelDownloadsOKText"), + ), + FTL.Variant( + key=FTL.Identifier("other"), + default=True, + value=REPLACE( + source, + "cancelDownloadsOKTextMultiple", + {"%1$S": VARIABLE_REFERENCE("downloadsCount")}, + ), + ), + ], + ) + ), + ), + FTL.Message( + id=FTL.Identifier("download-ui-dont-quit-button"), + value=Transform.pattern_of( + FTL.SelectExpression( + selector=FTL.FunctionReference( + id=FTL.Identifier("PLATFORM"), arguments=FTL.CallArguments() + ), + variants=[ + FTL.Variant( + key=FTL.Identifier("mac"), + value=COPY(source, "dontQuitButtonMac"), + ), + FTL.Variant( + key=FTL.Identifier("other"), + default=True, + value=COPY(source, "dontQuitButtonWin"), + ), + ], + ) + ), + ), + FTL.Message( + id=FTL.Identifier("download-ui-dont-go-offline-button"), + value=COPY(source, "dontGoOfflineButton"), + ), + FTL.Message( + id=FTL.Identifier("download-ui-dont-leave-private-browsing-button"), + value=COPY(source, "dontLeavePrivateBrowsingButton2"), + ), + FTL.Message( + id=FTL.Identifier("download-ui-file-executable-security-warning-title"), + value=COPY(source, "fileExecutableSecurityWarningTitle"), + ), + FTL.Message( + id=FTL.Identifier("download-ui-file-executable-security-warning"), + value=REPLACE( + source, + "fileExecutableSecurityWarning", + { + "%1$S": VARIABLE_REFERENCE("executable"), + "%2$S": VARIABLE_REFERENCE("executable"), + }, + ), + ), + ], + ) diff --git a/python/l10n/fluent_migrations/bug_1791178_downloadUtils.py b/python/l10n/fluent_migrations/bug_1791178_downloadUtils.py new file mode 100644 index 0000000000..d6cb174a86 --- /dev/null +++ b/python/l10n/fluent_migrations/bug_1791178_downloadUtils.py @@ -0,0 +1,172 @@ +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + +import fluent.syntax.ast as FTL +from fluent.migrate.helpers import VARIABLE_REFERENCE +from fluent.migrate.transforms import COPY, PLURALS, REPLACE + + +def migrate(ctx): + """Bug 1791178 - Convert DownloadUtils.jsm to Fluent, part {index}.""" + + source = "toolkit/chrome/mozapps/downloads/downloads.properties" + target = "toolkit/toolkit/downloads/downloadUtils.ftl" + ctx.add_transforms( + target, + target, + [ + FTL.Message( + id=FTL.Identifier("download-utils-short-seconds"), + value=PLURALS(source, "shortSeconds", VARIABLE_REFERENCE("timeValue")), + ), + FTL.Message( + id=FTL.Identifier("download-utils-short-minutes"), + value=PLURALS(source, "shortMinutes", VARIABLE_REFERENCE("timeValue")), + ), + FTL.Message( + id=FTL.Identifier("download-utils-short-hours"), + value=PLURALS(source, "shortHours", VARIABLE_REFERENCE("timeValue")), + ), + FTL.Message( + id=FTL.Identifier("download-utils-short-days"), + value=PLURALS(source, "shortDays", VARIABLE_REFERENCE("timeValue")), + ), + FTL.Message( + id=FTL.Identifier("download-utils-status"), + value=REPLACE( + source, + "statusFormat3", + { + "%4$S": VARIABLE_REFERENCE("timeLeft"), + "%1$S": VARIABLE_REFERENCE("transfer"), + "%2$S": VARIABLE_REFERENCE("rate"), + "%3$S": VARIABLE_REFERENCE("unit"), + }, + ), + ), + FTL.Message( + id=FTL.Identifier("download-utils-status-infinite-rate"), + value=REPLACE( + source, + "statusFormatInfiniteRate", + { + "%3$S": VARIABLE_REFERENCE("timeLeft"), + "%1$S": VARIABLE_REFERENCE("transfer"), + "%2$S": COPY(source, "infiniteRate"), + }, + ), + ), + FTL.Message( + id=FTL.Identifier("download-utils-status-no-rate"), + value=REPLACE( + source, + "statusFormatNoRate", + { + "%2$S": VARIABLE_REFERENCE("timeLeft"), + "%1$S": VARIABLE_REFERENCE("transfer"), + }, + ), + ), + FTL.Message( + id=FTL.Identifier("download-utils-bytes"), value=COPY(source, "bytes") + ), + FTL.Message( + id=FTL.Identifier("download-utils-kilobyte"), + value=COPY(source, "kilobyte"), + ), + FTL.Message( + id=FTL.Identifier("download-utils-megabyte"), + value=COPY(source, "megabyte"), + ), + FTL.Message( + id=FTL.Identifier("download-utils-gigabyte"), + value=COPY(source, "gigabyte"), + ), + FTL.Message( + id=FTL.Identifier("download-utils-transfer-same-units"), + value=REPLACE( + source, + "transferSameUnits2", + { + "%1$S": VARIABLE_REFERENCE("progress"), + "%2$S": VARIABLE_REFERENCE("total"), + "%3$S": VARIABLE_REFERENCE("totalUnits"), + }, + ), + ), + FTL.Message( + id=FTL.Identifier("download-utils-transfer-diff-units"), + value=REPLACE( + source, + "transferDiffUnits2", + { + "%1$S": VARIABLE_REFERENCE("progress"), + "%2$S": VARIABLE_REFERENCE("progressUnits"), + "%3$S": VARIABLE_REFERENCE("total"), + "%4$S": VARIABLE_REFERENCE("totalUnits"), + }, + ), + ), + FTL.Message( + id=FTL.Identifier("download-utils-transfer-no-total"), + value=REPLACE( + source, + "transferNoTotal2", + { + "%1$S": VARIABLE_REFERENCE("progress"), + "%2$S": VARIABLE_REFERENCE("progressUnits"), + }, + ), + ), + FTL.Message( + id=FTL.Identifier("download-utils-time-pair"), + value=REPLACE( + source, + "timePair3", + { + "%1$S": VARIABLE_REFERENCE("time"), + "%2$S": VARIABLE_REFERENCE("unit"), + }, + ), + ), + FTL.Message( + id=FTL.Identifier("download-utils-time-left-single"), + value=REPLACE( + source, "timeLeftSingle3", {"%1$S": VARIABLE_REFERENCE("time")} + ), + ), + FTL.Message( + id=FTL.Identifier("download-utils-time-left-double"), + value=REPLACE( + source, + "timeLeftDouble3", + { + "%1$S": VARIABLE_REFERENCE("time1"), + "%2$S": VARIABLE_REFERENCE("time2"), + }, + ), + ), + FTL.Message( + id=FTL.Identifier("download-utils-time-few-seconds"), + value=COPY(source, "timeFewSeconds2"), + ), + FTL.Message( + id=FTL.Identifier("download-utils-time-unknown"), + value=COPY(source, "timeUnknown2"), + ), + FTL.Message( + id=FTL.Identifier("download-utils-done-scheme"), + value=REPLACE( + source, "doneScheme2", {"%1$S": VARIABLE_REFERENCE("scheme")} + ), + ), + FTL.Message( + id=FTL.Identifier("download-utils-done-file-scheme"), + value=COPY(source, "doneFileScheme"), + ), + FTL.Message( + id=FTL.Identifier("download-utils-yesterday"), + value=COPY(source, "yesterday"), + ), + ], + ) diff --git a/python/l10n/fluent_migrations/bug_1791178_nsContextMenu_saveHelper.py b/python/l10n/fluent_migrations/bug_1791178_nsContextMenu_saveHelper.py new file mode 100644 index 0000000000..d12533be9a --- /dev/null +++ b/python/l10n/fluent_migrations/bug_1791178_nsContextMenu_saveHelper.py @@ -0,0 +1,39 @@ +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + +import fluent.syntax.ast as FTL +from fluent.migrate.helpers import VARIABLE_REFERENCE +from fluent.migrate.transforms import COPY, REPLACE + + +def migrate(ctx): + """Bug 1791178 - Convert nsContextMenu saveHelper() localization to Fluent, part {index}.""" + + source = "toolkit/chrome/mozapps/downloads/downloads.properties" + target = "browser/browser/downloads.ftl" + ctx.add_transforms( + target, + target, + [ + FTL.Message( + id=FTL.Identifier("downloads-error-alert-title"), + value=COPY(source, "downloadErrorAlertTitle"), + ), + FTL.Message( + id=FTL.Identifier("downloads-error-blocked-by"), + value=REPLACE( + source, + "downloadErrorBlockedBy", + {"%1$S": VARIABLE_REFERENCE("extension")}, + ), + ), + FTL.Message( + id=FTL.Identifier("downloads-error-extension"), + value=COPY(source, "downloadErrorExtension"), + ), + FTL.Message( + id=FTL.Identifier("downloads-error-generic"), + value=COPY(source, "downloadErrorGeneric"), + ), + ], + ) diff --git a/python/l10n/fluent_migrations/bug_1793572_webrtc.py b/python/l10n/fluent_migrations/bug_1793572_webrtc.py new file mode 100644 index 0000000000..eb07f939a8 --- /dev/null +++ b/python/l10n/fluent_migrations/bug_1793572_webrtc.py @@ -0,0 +1,771 @@ +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + +import fluent.syntax.ast as FTL +from fluent.migrate.helpers import TERM_REFERENCE, VARIABLE_REFERENCE +from fluent.migrate.transforms import ( + COPY, + COPY_PATTERN, + PLURALS, + REPLACE, + REPLACE_IN_TEXT, +) + + +def migrate(ctx): + """Bug 1793572 - Convert WebRTC strings to Fluent, part {index}.""" + + source = "browser/chrome/browser/webrtcIndicator.properties" + browser = "browser/chrome/browser/browser.properties" + browser_ftl = "browser/browser/browser.ftl" + target = "browser/browser/webrtcIndicator.ftl" + + ctx.add_transforms( + target, + target, + [ + FTL.Message( + id=FTL.Identifier("webrtc-indicator-window"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("title"), + value=COPY_PATTERN(target, "webrtc-indicator-title"), + ) + ], + ), + FTL.Message( + id=FTL.Identifier("webrtc-indicator-sharing-camera-and-microphone"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("tooltiptext"), + value=COPY( + source, "webrtcIndicator.sharingCameraAndMicrophone.tooltip" + ), + ) + ], + ), + FTL.Message( + id=FTL.Identifier("webrtc-indicator-sharing-camera"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("tooltiptext"), + value=COPY(source, "webrtcIndicator.sharingCamera.tooltip"), + ) + ], + ), + FTL.Message( + id=FTL.Identifier("webrtc-indicator-sharing-microphone"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("tooltiptext"), + value=COPY(source, "webrtcIndicator.sharingMicrophone.tooltip"), + ) + ], + ), + FTL.Message( + id=FTL.Identifier("webrtc-indicator-sharing-application"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("tooltiptext"), + value=COPY( + source, "webrtcIndicator.sharingApplication.tooltip" + ), + ) + ], + ), + FTL.Message( + id=FTL.Identifier("webrtc-indicator-sharing-screen"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("tooltiptext"), + value=COPY(source, "webrtcIndicator.sharingScreen.tooltip"), + ) + ], + ), + FTL.Message( + id=FTL.Identifier("webrtc-indicator-sharing-window"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("tooltiptext"), + value=COPY(source, "webrtcIndicator.sharingWindow.tooltip"), + ) + ], + ), + FTL.Message( + id=FTL.Identifier("webrtc-indicator-sharing-browser"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("tooltiptext"), + value=COPY(source, "webrtcIndicator.sharingBrowser.tooltip"), + ) + ], + ), + FTL.Message( + id=FTL.Identifier("webrtc-indicator-menuitem-control-sharing"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=COPY(source, "webrtcIndicator.controlSharing.menuitem"), + ) + ], + ), + FTL.Message( + id=FTL.Identifier("webrtc-indicator-menuitem-control-sharing-on"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=REPLACE( + source, + "webrtcIndicator.controlSharingOn.menuitem", + {"%1$S": VARIABLE_REFERENCE("streamTitle")}, + ), + ) + ], + ), + FTL.Message( + id=FTL.Identifier("webrtc-indicator-menuitem-sharing-camera-with"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=REPLACE( + source, + "webrtcIndicator.sharingCameraWith.menuitem", + {"%1$S": VARIABLE_REFERENCE("streamTitle")}, + ), + ) + ], + ), + FTL.Message( + id=FTL.Identifier("webrtc-indicator-menuitem-sharing-microphone-with"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=REPLACE( + source, + "webrtcIndicator.sharingMicrophoneWith.menuitem", + {"%1$S": VARIABLE_REFERENCE("streamTitle")}, + ), + ) + ], + ), + FTL.Message( + id=FTL.Identifier("webrtc-indicator-menuitem-sharing-application-with"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=REPLACE( + source, + "webrtcIndicator.sharingApplicationWith.menuitem", + {"%1$S": VARIABLE_REFERENCE("streamTitle")}, + ), + ) + ], + ), + FTL.Message( + id=FTL.Identifier("webrtc-indicator-menuitem-sharing-screen-with"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=REPLACE( + source, + "webrtcIndicator.sharingScreenWith.menuitem", + {"%1$S": VARIABLE_REFERENCE("streamTitle")}, + ), + ) + ], + ), + FTL.Message( + id=FTL.Identifier("webrtc-indicator-menuitem-sharing-window-with"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=REPLACE( + source, + "webrtcIndicator.sharingWindowWith.menuitem", + {"%1$S": VARIABLE_REFERENCE("streamTitle")}, + ), + ) + ], + ), + FTL.Message( + id=FTL.Identifier("webrtc-indicator-menuitem-sharing-browser-with"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=REPLACE( + source, + "webrtcIndicator.sharingBrowserWith.menuitem", + {"%1$S": VARIABLE_REFERENCE("streamTitle")}, + ), + ) + ], + ), + FTL.Message( + id=FTL.Identifier( + "webrtc-indicator-menuitem-sharing-camera-with-n-tabs" + ), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=PLURALS( + source, + "webrtcIndicator.sharingCameraWithNTabs.menuitem", + VARIABLE_REFERENCE("tabCount"), + foreach=lambda n: REPLACE_IN_TEXT( + n, + {"#1": VARIABLE_REFERENCE("tabCount")}, + ), + ), + ) + ], + ), + FTL.Message( + id=FTL.Identifier( + "webrtc-indicator-menuitem-sharing-microphone-with-n-tabs" + ), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=PLURALS( + source, + "webrtcIndicator.sharingMicrophoneWithNTabs.menuitem", + VARIABLE_REFERENCE("tabCount"), + foreach=lambda n: REPLACE_IN_TEXT( + n, + {"#1": VARIABLE_REFERENCE("tabCount")}, + ), + ), + ) + ], + ), + FTL.Message( + id=FTL.Identifier( + "webrtc-indicator-menuitem-sharing-application-with-n-tabs" + ), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=PLURALS( + source, + "webrtcIndicator.sharingApplicationWithNTabs.menuitem", + VARIABLE_REFERENCE("tabCount"), + foreach=lambda n: REPLACE_IN_TEXT( + n, + {"#1": VARIABLE_REFERENCE("tabCount")}, + ), + ), + ) + ], + ), + FTL.Message( + id=FTL.Identifier( + "webrtc-indicator-menuitem-sharing-screen-with-n-tabs" + ), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=PLURALS( + source, + "webrtcIndicator.sharingScreenWithNTabs.menuitem", + VARIABLE_REFERENCE("tabCount"), + foreach=lambda n: REPLACE_IN_TEXT( + n, + {"#1": VARIABLE_REFERENCE("tabCount")}, + ), + ), + ) + ], + ), + FTL.Message( + id=FTL.Identifier( + "webrtc-indicator-menuitem-sharing-window-with-n-tabs" + ), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=PLURALS( + source, + "webrtcIndicator.sharingWindowWithNTabs.menuitem", + VARIABLE_REFERENCE("tabCount"), + foreach=lambda n: REPLACE_IN_TEXT( + n, + {"#1": VARIABLE_REFERENCE("tabCount")}, + ), + ), + ) + ], + ), + FTL.Message( + id=FTL.Identifier( + "webrtc-indicator-menuitem-sharing-browser-with-n-tabs" + ), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=PLURALS( + source, + "webrtcIndicator.sharingBrowserWithNTabs.menuitem", + VARIABLE_REFERENCE("tabCount"), + foreach=lambda n: REPLACE_IN_TEXT( + n, + {"#1": VARIABLE_REFERENCE("tabCount")}, + ), + ), + ) + ], + ), + FTL.Message( + id=FTL.Identifier("webrtc-item-camera"), + value=REPLACE( + browser, + "getUserMedia.sharingMenuCamera", + { + "%1$S (": FTL.TextElement(""), + "%1$S(": FTL.TextElement(""), + ")": FTL.TextElement(""), + ")": FTL.TextElement(""), + }, + ), + ), + FTL.Message( + id=FTL.Identifier("webrtc-item-microphone"), + value=REPLACE( + browser, + "getUserMedia.sharingMenuMicrophone", + { + "%1$S (": FTL.TextElement(""), + "%1$S(": FTL.TextElement(""), + ")": FTL.TextElement(""), + ")": FTL.TextElement(""), + }, + ), + ), + FTL.Message( + id=FTL.Identifier("webrtc-item-audio-capture"), + value=REPLACE( + browser, + "getUserMedia.sharingMenuAudioCapture", + { + "%1$S (": FTL.TextElement(""), + "%1$S(": FTL.TextElement(""), + ")": FTL.TextElement(""), + ")": FTL.TextElement(""), + }, + ), + ), + FTL.Message( + id=FTL.Identifier("webrtc-item-application"), + value=REPLACE( + browser, + "getUserMedia.sharingMenuApplication", + { + "%1$S (": FTL.TextElement(""), + "%1$S(": FTL.TextElement(""), + ")": FTL.TextElement(""), + ")": FTL.TextElement(""), + }, + ), + ), + FTL.Message( + id=FTL.Identifier("webrtc-item-screen"), + value=REPLACE( + browser, + "getUserMedia.sharingMenuScreen", + { + "%1$S (": FTL.TextElement(""), + "%1$S(": FTL.TextElement(""), + ")": FTL.TextElement(""), + ")": FTL.TextElement(""), + }, + ), + ), + FTL.Message( + id=FTL.Identifier("webrtc-item-window"), + value=REPLACE( + browser, + "getUserMedia.sharingMenuWindow", + { + "%1$S (": FTL.TextElement(""), + "%1$S(": FTL.TextElement(""), + ")": FTL.TextElement(""), + ")": FTL.TextElement(""), + }, + ), + ), + FTL.Message( + id=FTL.Identifier("webrtc-item-browser"), + value=REPLACE( + browser, + "getUserMedia.sharingMenuBrowser", + { + "%1$S (": FTL.TextElement(""), + "%1$S(": FTL.TextElement(""), + ")": FTL.TextElement(""), + ")": FTL.TextElement(""), + }, + ), + ), + FTL.Message( + id=FTL.Identifier("webrtc-sharing-menuitem-unknown-host"), + value=COPY(browser, "getUserMedia.sharingMenuUnknownHost"), + ), + FTL.Message( + id=FTL.Identifier("webrtc-sharing-menuitem"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=FTL.Pattern( + [FTL.TextElement("{ $origin } ({ $itemList })")] + ), + ), + ], + ), + FTL.Message( + id=FTL.Identifier("webrtc-sharing-menu"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=COPY(browser, "getUserMedia.sharingMenu.label"), + ), + FTL.Attribute( + id=FTL.Identifier("accesskey"), + value=COPY(browser, "getUserMedia.sharingMenu.accesskey"), + ), + ], + ), + FTL.Message( + id=FTL.Identifier("webrtc-allow-share-camera"), + value=REPLACE( + browser, + "getUserMedia.shareCamera3.message", + {"%1$S": VARIABLE_REFERENCE("origin")}, + ), + ), + FTL.Message( + id=FTL.Identifier("webrtc-allow-share-microphone"), + value=REPLACE( + browser, + "getUserMedia.shareMicrophone3.message", + {"%1$S": VARIABLE_REFERENCE("origin")}, + ), + ), + FTL.Message( + id=FTL.Identifier("webrtc-allow-share-screen"), + value=REPLACE( + browser, + "getUserMedia.shareScreen4.message", + {"%1$S": VARIABLE_REFERENCE("origin")}, + ), + ), + FTL.Message( + id=FTL.Identifier("webrtc-allow-share-camera-and-microphone"), + value=REPLACE( + browser, + "getUserMedia.shareCameraAndMicrophone3.message", + {"%1$S": VARIABLE_REFERENCE("origin")}, + ), + ), + FTL.Message( + id=FTL.Identifier("webrtc-allow-share-camera-and-audio-capture"), + value=REPLACE( + browser, + "getUserMedia.shareCameraAndAudioCapture3.message", + {"%1$S": VARIABLE_REFERENCE("origin")}, + ), + ), + FTL.Message( + id=FTL.Identifier("webrtc-allow-share-screen-and-microphone"), + value=REPLACE( + browser, + "getUserMedia.shareScreenAndMicrophone4.message", + {"%1$S": VARIABLE_REFERENCE("origin")}, + ), + ), + FTL.Message( + id=FTL.Identifier("webrtc-allow-share-screen-and-audio-capture"), + value=REPLACE( + browser, + "getUserMedia.shareScreenAndAudioCapture4.message", + {"%1$S": VARIABLE_REFERENCE("origin")}, + ), + ), + FTL.Message( + id=FTL.Identifier("webrtc-allow-share-audio-capture"), + value=REPLACE( + browser, + "getUserMedia.shareAudioCapture3.message", + {"%1$S": VARIABLE_REFERENCE("origin")}, + ), + ), + FTL.Message( + id=FTL.Identifier("webrtc-allow-share-speaker"), + value=REPLACE( + browser, + "selectAudioOutput.shareSpeaker.message", + {"%1$S": VARIABLE_REFERENCE("origin")}, + ), + ), + FTL.Message( + id=FTL.Identifier("webrtc-allow-share-camera-unsafe-delegation"), + value=REPLACE( + browser, + "getUserMedia.shareCameraUnsafeDelegation2.message", + { + "%1$S": VARIABLE_REFERENCE("origin"), + "%2$S": VARIABLE_REFERENCE("thirdParty"), + }, + ), + ), + FTL.Message( + id=FTL.Identifier("webrtc-allow-share-microphone-unsafe-delegations"), + value=REPLACE( + browser, + "getUserMedia.shareMicrophoneUnsafeDelegations2.message", + { + "%1$S": VARIABLE_REFERENCE("origin"), + "%2$S": VARIABLE_REFERENCE("thirdParty"), + }, + ), + ), + FTL.Message( + id=FTL.Identifier("webrtc-allow-share-screen-unsafe-delegation"), + value=REPLACE( + browser, + "getUserMedia.shareScreenUnsafeDelegation2.message", + { + "%1$S": VARIABLE_REFERENCE("origin"), + "%2$S": VARIABLE_REFERENCE("thirdParty"), + }, + ), + ), + FTL.Message( + id=FTL.Identifier( + "webrtc-allow-share-camera-and-microphone-unsafe-delegation" + ), + value=REPLACE( + browser, + "getUserMedia.shareCameraAndMicrophoneUnsafeDelegation2.message", + { + "%1$S": VARIABLE_REFERENCE("origin"), + "%2$S": VARIABLE_REFERENCE("thirdParty"), + }, + ), + ), + FTL.Message( + id=FTL.Identifier( + "webrtc-allow-share-camera-and-audio-capture-unsafe-delegation" + ), + value=REPLACE( + browser, + "getUserMedia.shareCameraAndAudioCaptureUnsafeDelegation2.message", + { + "%1$S": VARIABLE_REFERENCE("origin"), + "%2$S": VARIABLE_REFERENCE("thirdParty"), + }, + ), + ), + FTL.Message( + id=FTL.Identifier( + "webrtc-allow-share-screen-and-microphone-unsafe-delegation" + ), + value=REPLACE( + browser, + "getUserMedia.shareScreenAndMicrophoneUnsafeDelegation2.message", + { + "%1$S": VARIABLE_REFERENCE("origin"), + "%2$S": VARIABLE_REFERENCE("thirdParty"), + }, + ), + ), + FTL.Message( + id=FTL.Identifier( + "webrtc-allow-share-screen-and-audio-capture-unsafe-delegation" + ), + value=REPLACE( + browser, + "getUserMedia.shareScreenAndAudioCaptureUnsafeDelegation2.message", + { + "%1$S": VARIABLE_REFERENCE("origin"), + "%2$S": VARIABLE_REFERENCE("thirdParty"), + }, + ), + ), + FTL.Message( + id=FTL.Identifier("webrtc-allow-share-speaker-unsafe-delegation"), + value=REPLACE( + browser, + "selectAudioOutput.shareSpeakerUnsafeDelegation.message", + { + "%1$S": VARIABLE_REFERENCE("origin"), + "%2$S": VARIABLE_REFERENCE("thirdParty"), + }, + ), + ), + FTL.Message( + id=FTL.Identifier("webrtc-share-screen-warning"), + value=COPY(browser, "getUserMedia.shareScreenWarning2.message"), + ), + FTL.Message( + id=FTL.Identifier("webrtc-share-browser-warning"), + value=REPLACE( + browser, + "getUserMedia.shareFirefoxWarning2.message", + {"%1$S": TERM_REFERENCE("brand-short-name")}, + ), + ), + FTL.Message( + id=FTL.Identifier("webrtc-share-screen-learn-more"), + value=COPY(browser, "getUserMedia.shareScreen.learnMoreLabel"), + ), + FTL.Message( + id=FTL.Identifier("webrtc-pick-window-or-screen"), + value=COPY(browser, "getUserMedia.pickWindowOrScreen.label"), + ), + FTL.Message( + id=FTL.Identifier("webrtc-share-entire-screen"), + value=COPY(browser, "getUserMedia.shareEntireScreen.label"), + ), + FTL.Message( + id=FTL.Identifier("webrtc-share-pipe-wire-portal"), + value=COPY(browser, "getUserMedia.sharePipeWirePortal.label"), + ), + FTL.Message( + id=FTL.Identifier("webrtc-share-monitor"), + value=REPLACE( + browser, + "getUserMedia.shareMonitor.label", + {"%1$S": VARIABLE_REFERENCE("monitorIndex")}, + ), + ), + FTL.Message( + id=FTL.Identifier("webrtc-share-application"), + value=PLURALS( + browser, + "getUserMedia.shareApplicationWindowCount.label", + VARIABLE_REFERENCE("windowCount"), + foreach=lambda n: REPLACE_IN_TEXT( + n, + { + "#1": VARIABLE_REFERENCE("appName"), + "#2": VARIABLE_REFERENCE("windowCount"), + }, + ), + ), + ), + FTL.Message( + id=FTL.Identifier("webrtc-action-allow"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=COPY(browser, "getUserMedia.allow.label"), + ), + FTL.Attribute( + id=FTL.Identifier("accesskey"), + value=COPY(browser, "getUserMedia.allow.accesskey"), + ), + ], + ), + FTL.Message( + id=FTL.Identifier("webrtc-action-block"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=COPY_PATTERN( + browser_ftl, "popup-screen-sharing-block.label" + ), + ), + FTL.Attribute( + id=FTL.Identifier("accesskey"), + value=COPY_PATTERN( + browser_ftl, "popup-screen-sharing-block.accesskey" + ), + ), + ], + ), + FTL.Message( + id=FTL.Identifier("webrtc-action-always-block"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=COPY_PATTERN( + browser_ftl, "popup-screen-sharing-always-block.label" + ), + ), + FTL.Attribute( + id=FTL.Identifier("accesskey"), + value=COPY_PATTERN( + browser_ftl, + "popup-screen-sharing-always-block.accesskey", + ), + ), + ], + ), + FTL.Message( + id=FTL.Identifier("webrtc-action-not-now"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=COPY(browser, "getUserMedia.notNow.label"), + ), + FTL.Attribute( + id=FTL.Identifier("accesskey"), + value=COPY(browser, "getUserMedia.notNow.accesskey"), + ), + ], + ), + FTL.Message( + id=FTL.Identifier("webrtc-remember-allow-checkbox"), + value=COPY(browser, "getUserMedia.remember"), + ), + FTL.Message( + id=FTL.Identifier("webrtc-mute-notifications-checkbox"), + value=COPY_PATTERN(browser_ftl, "popup-mute-notifications-checkbox"), + ), + FTL.Message( + id=FTL.Identifier("webrtc-reason-for-no-permanent-allow-screen"), + value=REPLACE( + browser, + "getUserMedia.reasonForNoPermanentAllow.screen3", + {"%1$S": TERM_REFERENCE("brand-short-name")}, + ), + ), + FTL.Message( + id=FTL.Identifier("webrtc-reason-for-no-permanent-allow-audio"), + value=REPLACE( + browser, + "getUserMedia.reasonForNoPermanentAllow.audio", + {"%1$S": TERM_REFERENCE("brand-short-name")}, + ), + ), + FTL.Message( + id=FTL.Identifier("webrtc-reason-for-no-permanent-allow-insecure"), + value=REPLACE( + browser, + "getUserMedia.reasonForNoPermanentAllow.insecure", + {"%1$S": TERM_REFERENCE("brand-short-name")}, + ), + ), + ], + ) + + ctx.add_transforms( + browser_ftl, + browser_ftl, + [ + FTL.Message( + id=FTL.Identifier("popup-select-window-or-screen"), + attributes=[ + FTL.Attribute( + id=FTL.Identifier("label"), + value=COPY(browser, "getUserMedia.selectWindowOrScreen2.label"), + ), + FTL.Attribute( + id=FTL.Identifier("accesskey"), + value=COPY( + browser, "getUserMedia.selectWindowOrScreen2.accesskey" + ), + ), + ], + ), + ], + ) diff --git a/python/l10n/fluent_migrations/bug_1801035_places_window_no_size.py b/python/l10n/fluent_migrations/bug_1801035_places_window_no_size.py new file mode 100644 index 0000000000..072d22cdd8 --- /dev/null +++ b/python/l10n/fluent_migrations/bug_1801035_places_window_no_size.py @@ -0,0 +1,21 @@ +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + +from fluent.migrate import COPY_PATTERN +from fluent.migrate.helpers import transforms_from + + +def migrate(ctx): + """Bug 1801035 - Stop localizing places window style, part {index}.""" + + ctx.add_transforms( + "browser/browser/places.ftl", + "browser/browser/places.ftl", + transforms_from( + """ +places-library3 = + .title = {{COPY_PATTERN(from_path, "places-library2.title")}} + """, + from_path="browser/browser/places.ftl", + ), + ) diff --git a/python/l10n/fluent_migrations/bug_1801915_confirmationHints.py b/python/l10n/fluent_migrations/bug_1801915_confirmationHints.py new file mode 100644 index 0000000000..69b9cff67d --- /dev/null +++ b/python/l10n/fluent_migrations/bug_1801915_confirmationHints.py @@ -0,0 +1,29 @@ +# coding=utf8 + +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + +import fluent.syntax.ast as FTL +from fluent.migrate.helpers import transforms_from +from fluent.migrate.helpers import VARIABLE_REFERENCE +from fluent.migrate import COPY, REPLACE + + +def migrate(ctx): + """Bug 1801915 - Migrate confirmation Hints to Fluent""" + ctx.add_transforms( + "browser/browser/confirmationHints.ftl", + "browser/browser/confirmationHints.ftl", + transforms_from( + """ +confirmation-hint-breakage-report-sent = { COPY(from_path, "confirmationHint.breakageReport.label") } +confirmation-hint-login-removed = { COPY(from_path, "confirmationHint.loginRemoved.label") } +confirmation-hint-page-bookmarked = { COPY(from_path, "confirmationHint.pageBookmarked2.label") } +confirmation-hint-password-saved = { COPY(from_path, "confirmationHint.passwordSaved.label") } +confirmation-hint-pin-tab = { COPY(from_path, "confirmationHint.pinTab.label") } +confirmation-hint-pin-tab-description = { COPY(from_path, "confirmationHint.pinTab.description") } +confirmation-hint-send-to-device = { COPY(from_path, "confirmationHint.sendToDevice.label") } +""", + from_path="browser/chrome/browser/browser.properties", + ), + ) diff --git a/python/l10n/fluent_migrations/bug_1802128_langpack_defines.py b/python/l10n/fluent_migrations/bug_1802128_langpack_defines.py new file mode 100644 index 0000000000..d1755307bd --- /dev/null +++ b/python/l10n/fluent_migrations/bug_1802128_langpack_defines.py @@ -0,0 +1,43 @@ +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + +import fluent.syntax.ast as FTL +from fluent.migrate.transforms import COPY, LegacySource, Transform + + +class CONTRIB(LegacySource): + """Custom transform converting a list of contributors from the old RDF based + list of entries into a comma delimited list. + + Based on code from python/mozbuild/mozbuild/action/langpack_manifest.py + """ + + def __call__(self, ctx): + element: FTL.TextElement = super(CONTRIB, self).__call__(ctx) + str: str = element.value.replace("", "") + tokens = str.split("") + tokens = map(lambda t: t.strip(), tokens) + tokens = filter(lambda t: t != "", tokens) + element.value = ", ".join(tokens) + return Transform.pattern_of(element) + + +def migrate(ctx): + """Bug 1802128 - Convert langpack defines.inc to Fluent, part {index}.""" + + browser = "browser/defines.inc" + target = "browser/langpack-metadata.ftl" + ctx.add_transforms( + target, + target, + [ + FTL.Message( + id=FTL.Identifier("langpack-creator"), + value=COPY(browser, "MOZ_LANGPACK_CREATOR"), + ), + FTL.Message( + id=FTL.Identifier("langpack-contributors"), + value=CONTRIB(browser, "MOZ_LANGPACK_CONTRIBUTORS"), + ), + ], + ) diff --git a/python/l10n/fluent_migrations/bug_1803010_downloads.py b/python/l10n/fluent_migrations/bug_1803010_downloads.py new file mode 100644 index 0000000000..bfea61b564 --- /dev/null +++ b/python/l10n/fluent_migrations/bug_1803010_downloads.py @@ -0,0 +1,30 @@ +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + +from fluent.migrate import COPY_PATTERN +from fluent.migrate.helpers import transforms_from + + +def migrate(ctx): + """Bug 1803010 - Use .value consistently in downloads.ftl, part {index}.""" + + for string in [ + "downloading-file-opens-in-hours-and-minutes", + "downloading-file-opens-in-minutes", + "downloading-file-opens-in-minutes-and-seconds", + "downloading-file-opens-in-seconds", + "downloading-file-opens-in-some-time", + ]: + ctx.add_transforms( + "browser/browser/downloads.ftl", + "browser/browser/downloads.ftl", + transforms_from( + """ +{0}-2 = + .value = {{COPY_PATTERN(from_path, "{0}")}} + """.format( + string + ), + from_path="browser/browser/downloads.ftl", + ), + ) diff --git a/python/l10n/fluent_migrations/bug_1805319_webrtc_indicator_typo.py b/python/l10n/fluent_migrations/bug_1805319_webrtc_indicator_typo.py new file mode 100644 index 0000000000..e37ad5da68 --- /dev/null +++ b/python/l10n/fluent_migrations/bug_1805319_webrtc_indicator_typo.py @@ -0,0 +1,23 @@ +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + +from fluent.migrate import COPY_PATTERN +import fluent.syntax.ast as FTL + + +def migrate(ctx): + """Bug 1805319 - Fix typo in webrtc indicator message id, part {index}.""" + + path = "browser/browser/webrtcIndicator.ftl" + ctx.add_transforms( + path, + path, + [ + FTL.Message( + id=FTL.Identifier("webrtc-allow-share-microphone-unsafe-delegation"), + value=COPY_PATTERN( + path, "webrtc-allow-share-microphone-unsafe-delegations" + ), + ), + ], + ) diff --git a/python/l10n/mozxchannel/__init__.py b/python/l10n/mozxchannel/__init__.py new file mode 100644 index 0000000000..66ee3966ca --- /dev/null +++ b/python/l10n/mozxchannel/__init__.py @@ -0,0 +1,150 @@ +# 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/. + +import os +import shutil +from collections import defaultdict +from dataclasses import dataclass, field +from datetime import datetime +from pathlib import Path + +import hglib +from compare_locales import merge +from mozpack import path as mozpath + +from . import projectconfig, source + + +def get_default_config(topsrcdir, strings_path): + assert isinstance(topsrcdir, Path) + assert isinstance(strings_path, Path) + return { + "strings": { + "path": strings_path, + "url": "https://hg.mozilla.org/l10n/gecko-strings-quarantine/", + "heads": {"default": "default"}, + "update_on_pull": True, + "push_url": "ssh://hg.mozilla.org/l10n/gecko-strings-quarantine/", + }, + "source": { + "mozilla-unified": { + "path": topsrcdir, + "url": "https://hg.mozilla.org/mozilla-unified/", + "heads": { + # This list of repositories is ordered, starting with the + # one with the most recent content (central) to the oldest + # (ESR). In case two ESR versions are supported, the oldest + # ESR goes last (e.g. esr78 goes after esr91). + "central": "mozilla-central", + "beta": "releases/mozilla-beta", + "release": "releases/mozilla-release", + "esr102": "releases/mozilla-esr102", + }, + "config_files": [ + "browser/locales/l10n.toml", + "mobile/android/locales/l10n.toml", + ], + }, + }, + } + + +@dataclass +class TargetRevs: + target: bytes = None + revs: list = field(default_factory=list) + + +@dataclass +class CommitRev: + repo: str + rev: bytes + + @property + def message(self): + return ( + f"X-Channel-Repo: {self.repo}\n" + f'X-Channel-Revision: {self.rev.decode("ascii")}' + ) + + +class CrossChannelCreator: + def __init__(self, config): + self.config = config + self.strings_path = config["strings"]["path"] + self.message = ( + f"cross-channel content for {datetime.utcnow().strftime('%Y-%m-%d %H:%M')}" + ) + + def create_content(self): + self.prune_target() + revs = [] + for repo_name, repo_config in self.config["source"].items(): + with hglib.open(repo_config["path"]) as repo: + revs.extend(self.create_for_repo(repo, repo_name, repo_config)) + self.commit(revs) + return 0 + + def prune_target(self): + for leaf in self.config["strings"]["path"].iterdir(): + if leaf.name == ".hg": + continue + shutil.rmtree(leaf) + + def create_for_repo(self, repo, repo_name, repo_config): + print(f"Processing {repo_name} in {repo_config['path']}") + source_target_revs = defaultdict(TargetRevs) + revs_for_commit = [] + parse_kwargs = { + "env": {"l10n_base": str(self.strings_path.parent)}, + "ignore_missing_includes": True, + } + for head, head_name in repo_config["heads"].items(): + print(f"Gathering files for {head}") + rev = repo.log(revrange=head)[0].node + revs_for_commit.append(CommitRev(head_name, rev)) + p = source.HgTOMLParser(repo, rev) + project_configs = [] + for config_file in repo_config["config_files"]: + project_configs.append(p.parse(config_file, **parse_kwargs)) + project_configs[-1].set_locales(["en-US"], deep=True) + hgfiles = source.HGFiles(repo, rev, project_configs) + for targetpath, refpath, _, _ in hgfiles: + source_target_revs[refpath].revs.append(rev) + source_target_revs[refpath].target = targetpath + root = repo.root() + print(f"Writing {repo_name} content to target") + for refpath, targetrevs in source_target_revs.items(): + local_ref = mozpath.relpath(refpath, root) + content = self.get_content(local_ref, repo, targetrevs.revs) + target_dir = mozpath.dirname(targetrevs.target) + if not os.path.isdir(target_dir): + os.makedirs(target_dir) + with open(targetrevs.target, "wb") as fh: + fh.write(content) + return revs_for_commit + + def commit(self, revs): + message = self.message + "\n\n" + if "TASK_ID" in os.environ: + message += f"X-Task-ID: {os.environ['TASK_ID']}\n\n" + message += "\n".join(rev.message for rev in revs) + with hglib.open(self.strings_path) as repo: + repo.commit(message=message, addremove=True) + + def get_content(self, local_ref, repo, revs): + if local_ref.endswith(b".toml"): + return self.get_config_content(local_ref, repo, revs) + if len(revs) < 2: + return repo.cat([b"path:" + local_ref], rev=revs[0]) + contents = [repo.cat([b"path:" + local_ref], rev=rev) for rev in revs] + try: + return merge.merge_channels(local_ref.decode("utf-8"), contents) + except merge.MergeNotSupportedError: + return contents[0] + + def get_config_content(self, local_ref, repo, revs): + # We don't support merging toml files + content = repo.cat([b"path:" + local_ref], rev=revs[0]) + return projectconfig.process_config(content) diff --git a/python/l10n/mozxchannel/projectconfig.py b/python/l10n/mozxchannel/projectconfig.py new file mode 100644 index 0000000000..23d8120a3c --- /dev/null +++ b/python/l10n/mozxchannel/projectconfig.py @@ -0,0 +1,77 @@ +# 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/. + +import re + +from compare_locales import mozpath + +# The local path where we write the config files to +TARGET_PATH = b"_configs" + + +def process_config(toml_content): + """Process TOML configuration content to match the l10n setup for + the reference localization, return target_path and content. + + The code adjusts basepath, [[paths]], and [[includes]] + """ + # adjust basepath in content. '.' works in practice, also in theory? + new_base = mozpath.relpath(b".", TARGET_PATH) + if not new_base: + new_base = b"." # relpath to '.' is '', sadly + base_line = b'\nbasepath = "%s"' % new_base + content1 = re.sub(br"^\s*basepath\s*=\s*.+", base_line, toml_content, flags=re.M) + + # process [[paths]] + start = 0 + content2 = b"" + for m in re.finditer( + br"\[\[\s*paths\s*\]\].+?(?=\[|\Z)", content1, re.M | re.DOTALL + ): + content2 += content1[start : m.start()] + path_content = m.group() + l10n_line = re.search(br"^\s*l10n\s*=.*$", path_content, flags=re.M).group() + # remove variable expansions + new_reference = re.sub(br"{\s*\S+\s*}", b"", l10n_line) + # make the l10n a reference line + new_reference = re.sub(br"^(\s*)l10n(\s*=)", br"\1reference\2", new_reference) + content2 += re.sub( + br"^\s*reference\s*=.*$", new_reference, path_content, flags=re.M + ) + start = m.end() + content2 += content1[start:] + + start = 0 + content3 = b"" + for m in re.finditer( + br"\[\[\s*includes\s*\]\].+?(?=\[|\Z)", content2, re.M | re.DOTALL + ): + content3 += content2[start : m.start()] + include_content = m.group() + m_ = re.search(br'^\s*path = "(.+?)"', include_content, flags=re.M) + content3 += ( + include_content[: m_.start(1)] + + generate_filename(m_.group(1)) + + include_content[m_.end(1) :] + ) + start = m.end() + content3 += content2[start:] + + return content3 + + +def generate_filename(path): + segs = path.split(b"/") + # strip /locales/ from filename + segs = [seg for seg in segs if seg != b"locales"] + # strip variables from filename + segs = [seg for seg in segs if not seg.startswith(b"{") and not seg.endswith(b"}")] + if segs[-1] == b"l10n.toml": + segs.pop() + segs[-1] += b".toml" + outpath = b"-".join(segs) + if TARGET_PATH != b".": + # prepend the target path, if it's not '.' + outpath = mozpath.join(TARGET_PATH, outpath) + return outpath diff --git a/python/l10n/mozxchannel/source.py b/python/l10n/mozxchannel/source.py new file mode 100644 index 0000000000..683a7b0640 --- /dev/null +++ b/python/l10n/mozxchannel/source.py @@ -0,0 +1,84 @@ +# 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/. + +import pytoml as toml +from compare_locales import mozpath, paths +from compare_locales.paths.matcher import expand + +from .projectconfig import generate_filename + + +class HGFiles(paths.ProjectFiles): + def __init__(self, repo, rev, projects): + self.repo = repo + self.ctx = repo[rev] + self.root = repo.root() + self.manifest = None + self.configs_map = {} + # get paths for our TOML files + for p in projects: + all_configpaths = { + mozpath.abspath(c.path).encode("utf-8") for c in p.configs + } + for refpath in all_configpaths: + local_path = mozpath.relpath(refpath, self.root) + if local_path not in self.ctx: + print("ignoring", refpath) + continue + targetpath = b"/".join( + ( + expand(None, "{l10n_base}", p.environ).encode("utf-8"), + b"en-US", + generate_filename(local_path), + ) + ) + self.configs_map[refpath] = targetpath + super(HGFiles, self).__init__("en-US", projects) + for m in self.matchers: + m["l10n"].encoding = "utf-8" + if "reference" in m: + m["reference"].encoding = "utf-8" + if self.exclude: + for m in self.exclude.matchers: + m["l10n"].encoding = "utf-8" + if "reference" in m: + m["reference"].encoding = "utf-8" + + def _files(self, matcher): + for f in self.ctx.manifest(): + f = mozpath.join(self.root, f) + if matcher.match(f): + yield f + + def __iter__(self): + for t in super(HGFiles, self).__iter__(): + yield t + for refpath, targetpath in self.configs_map.items(): + yield targetpath, refpath, None, set() + + def match(self, path): + m = super(HGFiles, self).match(path) + if m: + return m + for refpath, targetpath in self.configs_map.items(): + if path in [refpath, targetpath]: + return targetpath, refpath, None, set() + + +class HgTOMLParser(paths.TOMLParser): + "subclass to load from our hg context" + + def __init__(self, repo, rev): + self.repo = repo + self.rev = rev + self.root = repo.root().decode("utf-8") + + def load(self, parse_ctx): + try: + path = parse_ctx.path + local_path = "path:" + mozpath.relpath(path, self.root) + data = self.repo.cat(files=[local_path.encode("utf-8")], rev=self.rev) + except Exception: + raise paths.ConfigNotFound(parse_ctx.path) + parse_ctx.data = toml.loads(data, filename=parse_ctx.path) diff --git a/python/l10n/test_fluent_migrations/__init__.py b/python/l10n/test_fluent_migrations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/python/l10n/test_fluent_migrations/fmt.py b/python/l10n/test_fluent_migrations/fmt.py new file mode 100644 index 0000000000..150a942e78 --- /dev/null +++ b/python/l10n/test_fluent_migrations/fmt.py @@ -0,0 +1,188 @@ +import codecs +import logging +import os +import re +import shutil +import sys +from difflib import unified_diff + +import hglib +import mozpack.path as mozpath +from compare_locales.merge import merge_channels +from compare_locales.paths.configparser import TOMLParser +from compare_locales.paths.files import ProjectFiles +from fluent.migrate import validator +from fluent.syntax import FluentParser, FluentSerializer +from mach.util import get_state_dir + + +def inspect_migration(path): + """Validate recipe and extract some metadata.""" + return validator.Validator.validate(path) + + +def prepare_object_dir(cmd): + """Prepare object dir to have an up-to-date clone of gecko-strings. + + We run this once per mach invocation, for all tested migrations. + """ + obj_dir = mozpath.join(cmd.topobjdir, "python", "l10n") + if not os.path.exists(obj_dir): + os.makedirs(obj_dir) + state_dir = get_state_dir() + if os.path.exists(mozpath.join(state_dir, "gecko-strings")): + cmd.run_process( + ["hg", "pull", "-u"], cwd=mozpath.join(state_dir, "gecko-strings") + ) + else: + cmd.run_process( + ["hg", "clone", "https://hg.mozilla.org/l10n/gecko-strings"], + cwd=state_dir, + ) + return obj_dir + + +def diff_resources(left_path, right_path): + parser = FluentParser(with_spans=False) + serializer = FluentSerializer(with_junk=True) + lines = [] + for p in (left_path, right_path): + with codecs.open(p, encoding="utf-8") as fh: + res = parser.parse(fh.read()) + lines.append(serializer.serialize(res).splitlines(True)) + sys.stdout.writelines( + chunk for chunk in unified_diff(lines[0], lines[1], left_path, right_path) + ) + + +def test_migration(cmd, obj_dir, to_test, references): + """Test the given recipe. + + This creates a workdir by l10n-merging gecko-strings and the m-c source, + to mimmic gecko-strings after the patch to test landed. + It then runs the recipe with a gecko-strings clone as localization, both + dry and wet. + It inspects the generated commits, and shows a diff between the merged + reference and the generated content. + The diff is intended to be visually inspected. Some changes might be + expected, in particular when formatting of the en-US strings is different. + """ + rv = 0 + migration_name = os.path.splitext(os.path.split(to_test)[1])[0] + work_dir = mozpath.join(obj_dir, migration_name) + + paths = os.path.normpath(to_test).split(os.sep) + # Migration modules should be in a sub-folder of l10n. + migration_module = ( + ".".join(paths[paths.index("l10n") + 1 : -1]) + "." + migration_name + ) + + if os.path.exists(work_dir): + shutil.rmtree(work_dir) + os.makedirs(mozpath.join(work_dir, "reference")) + l10n_toml = mozpath.join( + cmd.topsrcdir, cmd.substs["MOZ_BUILD_APP"], "locales", "l10n.toml" + ) + pc = TOMLParser().parse(l10n_toml, env={"l10n_base": work_dir}) + pc.set_locales(["reference"]) + files = ProjectFiles("reference", [pc]) + for ref in references: + if ref != mozpath.normpath(ref): + cmd.log( + logging.ERROR, + "fluent-migration-test", + { + "file": to_test, + "ref": ref, + }, + 'Reference path "{ref}" needs to be normalized for {file}', + ) + rv = 1 + continue + full_ref = mozpath.join(work_dir, "reference", ref) + m = files.match(full_ref) + if m is None: + raise ValueError("Bad reference path: " + ref) + m_c_path = m[1] + g_s_path = mozpath.join(work_dir, "gecko-strings", ref) + resources = [ + b"" if not os.path.exists(f) else open(f, "rb").read() + for f in (g_s_path, m_c_path) + ] + ref_dir = os.path.dirname(full_ref) + if not os.path.exists(ref_dir): + os.makedirs(ref_dir) + open(full_ref, "wb").write(merge_channels(ref, resources)) + client = hglib.clone( + source=mozpath.join(get_state_dir(), "gecko-strings"), + dest=mozpath.join(work_dir, "en-US"), + ) + client.open() + old_tip = client.tip().node + run_migration = [ + cmd._virtualenv_manager.python_path, + "-m", + "fluent.migrate.tool", + "--lang", + "en-US", + "--reference-dir", + mozpath.join(work_dir, "reference"), + "--localization-dir", + mozpath.join(work_dir, "en-US"), + "--dry-run", + migration_module, + ] + cmd.run_process( + run_migration, + cwd=work_dir, + line_handler=print, + ) + # drop --dry-run + run_migration.pop(-2) + cmd.run_process( + run_migration, + cwd=work_dir, + line_handler=print, + ) + tip = client.tip().node + if old_tip == tip: + cmd.log( + logging.WARN, + "fluent-migration-test", + { + "file": to_test, + }, + "No migration applied for {file}", + ) + return rv + for ref in references: + diff_resources( + mozpath.join(work_dir, "reference", ref), + mozpath.join(work_dir, "en-US", ref), + ) + messages = [ + l.desc.decode("utf-8") for l in client.log(b"::%s - ::%s" % (tip, old_tip)) + ] + bug = re.search("[0-9]{5,}", migration_name) + # Just check first message for bug number, they're all following the same pattern + if bug is None or bug.group() not in messages[0]: + rv = 1 + cmd.log( + logging.ERROR, + "fluent-migration-test", + { + "file": to_test, + }, + "Missing or wrong bug number for {file}", + ) + if any("part {}".format(n + 1) not in msg for n, msg in enumerate(messages)): + rv = 1 + cmd.log( + logging.ERROR, + "fluent-migration-test", + { + "file": to_test, + }, + 'Commit messages should have "part {{index}}" for {file}', + ) + return rv diff --git a/python/lldbutils/.isort.cfg b/python/lldbutils/.isort.cfg new file mode 100644 index 0000000000..568338b79f --- /dev/null +++ b/python/lldbutils/.isort.cfg @@ -0,0 +1,3 @@ +[settings] +profile=black +known_first_party=lldbutils \ No newline at end of file diff --git a/python/lldbutils/README.txt b/python/lldbutils/README.txt new file mode 100644 index 0000000000..fd7e90675c --- /dev/null +++ b/python/lldbutils/README.txt @@ -0,0 +1,221 @@ +lldb debugging functionality for Gecko +====================================== + +This directory contains a module, lldbutils, which is imported by the +in-tree .lldbinit file. The lldbutil modules define some lldb commands +that are handy for debugging Gecko. + +If you want to add a new command or Python-implemented type summary, either add +it to one of the existing broad area Python files (such as lldbutils/layout.py +for layout-related commands) or create a new file if none of the existing files +is appropriate. If you add a new file, make sure you add it to __all__ in +lldbutils/__init__.py. + + +Supported commands +------------------ + +Most commands below that can take a pointer to an object also support being +called with a smart pointer like nsRefPtr or nsCOMPtr. + + +* frametree EXPR, ft EXPR + frametreelimited EXPR, ftl EXPR + + Shows information about a frame tree. EXPR is an expression that + is evaluated, and must be an nsIFrame*. frametree displays the + entire frame tree that contains the given frame. frametreelimited + displays a subtree of the frame tree rooted at the given frame. + + (lldb) p this + (nsBlockFrame *) $4 = 0x000000011687fcb8 + (lldb) ftl this + Block(div)(-1)@0x11687fcb8 {0,0,7380,690} [state=0002100000d04601] [content=0x11688c0c0] [sc=0x11687f990:-moz-scrolled-content]< + line 0x116899130: count=1 state=inline,clean,prevmarginclean,not impacted,not wrapped,before:nobr,after:nobr[0x100] {60,0,0,690} ink-overflow=60,510,0,0 scr-overflow=60,510,0,0 < + Text(0)""@0x1168990c0 {60,510,0,0} [state=0001000020404000] [content=0x11687ca10] [sc=0x11687fd88:-moz-non-element,parent=0x11687eb00] [run=0x115115e80][0,0,T] + > + > + (lldb) ft this + Viewport(-1)@0x116017430 [view=0x115efe190] {0,0,60,60} [state=000b063000002623] [sc=0x1160170f8:-moz-viewport]< + HTMLScroll(html)(-1)@0x1160180d0 {0,0,0,0} [state=000b020000000403] [content=0x115e4d640] [sc=0x116017768:-moz-viewport-scroll]< + ... + Canvas(html)(-1)@0x116017e08 {0,0,60,60} ink-overflow=0,0,8340,2196 scr-overflow=0,0,8220,2196 [state=000b002000000601] [content=0x115e4d640] [sc=0x11687e0f8:-moz-scrolled-canvas]< + Block(html)(-1)@0x11687e578 {0,0,60,2196} ink-overflow=0,0,8340,2196 scr-overflow=0,0,8220,2196 [state=000b100000d00601] [content=0x115e4d640] [sc=0x11687e4b8,parent=0x0]< + line 0x11687ec48: count=1 state=block,clean,prevmarginclean,not impacted,not wrapped,before:nobr,after:nobr[0x48] bm=480 {480,480,0,1236} ink-overflow=360,426,7980,1410 scr-overflow=480,480,7740,1236 < + Block(body)(1)@0x11687ebb0 {480,480,0,1236} ink-overflow=-120,-54,7980,1410 scr-overflow=0,0,7740,1236 [state=000b120000100601] [content=0x115ed8980] [sc=0x11687e990]< + line 0x116899170: count=1 state=inline,clean,prevmarginclean,not impacted,not wrapped,before:nobr,after:nobr[0x0] {0,0,7740,1236} ink-overflow=-120,-54,7980,1410 scr-overflow=0,0,7740,1236 < + nsTextControlFrame@0x11687f068 {0,66,7740,1170} ink-overflow=-120,-120,7980,1410 scr-overflow=0,0,7740,1170 [state=0002000000004621] [content=0x115ca2c50] [sc=0x11687ea40]< + HTMLScroll(div)(-1)@0x11687f6b0 {180,240,7380,690} [state=0002000000084409] [content=0x11688c0c0] [sc=0x11687eb00]< + Block(div)(-1)@0x11687fcb8 {0,0,7380,690} [state=0002100000d04601] [content=0x11688c0c0] [sc=0x11687f990:-moz-scrolled-content]< + line 0x116899130: count=1 state=inline,clean,prevmarginclean,not impacted,not wrapped,before:nobr,after:nobr[0x100] {60,0,0,690} ink-overflow=60,510,0,0 scr-overflow=60,510,0,0 < + Text(0)""@0x1168990c0 {60,510,0,0} [state=0001000020404000] [content=0x11687ca10] [sc=0x11687fd88:-moz-non-element,parent=0x11687eb00] [run=0x115115e80][0,0,T] + ... + + +* js + + Dumps the current JS stack. + + (lldb) js + 0 anonymous(aForce = false) ["chrome://browser/content/browser.js":13414] + this = [object Object] + 1 updateAppearance() ["chrome://browser/content/browser.js":13326] + this = [object Object] + 2 handleEvent(aEvent = [object Event]) ["chrome://browser/content/tabbrowser.xml":3811] + this = [object XULElement] + + +* prefcnt EXPR + + Shows the refcount of a given object. EXPR is an expression that is + evaluated, and can be either a pointer to or an actual refcounted + object. The object can be a standard nsISupports-like refcounted + object, a cycle-collected object or a mozilla::RefCounted object. + + (lldb) p this + (nsHTMLDocument *) $1 = 0x0000000116e9d800 + (lldb) prefcnt this + 20 + (lldb) p mDocumentURI + (nsCOMPtr) $3 = { + mRawPtr = 0x0000000117163e50 + } + (lldb) prefcnt mDocumentURI + 11 + + +* pstate EXPR + + Shows the frame state bits (using their symbolic names) of a given frame. + EXPR is an expression that is evaluated, and must be an nsIFrame*. + + (lldb) p this + (nsTextFrame *) $1 = 0x000000011f470b10 + (lldb) p/x mState + (nsFrameState) $2 = 0x0000004080604000 + (lldb) pstate this + TEXT_HAS_NONCOLLAPSED_CHARACTERS | TEXT_END_OF_LINE | TEXT_START_OF_LINE | NS_FRAME_PAINTED_THEBES | NS_FRAME_INDEPENDENT_SELECTION + + +* ptag EXPR + + Shows the DOM tag name of a node. EXPR is an expression that is + evaluated, and can be either an nsINode pointer or a concrete DOM + object. + + (lldb) p this + (nsHTMLDocument *) $0 = 0x0000000116e9d800 + (lldb) ptag this + (PermanentAtomImpl *) $1 = 0x0000000110133ac0 u"#document" + (lldb) p this->GetRootElement() + (mozilla::dom::HTMLSharedElement *) $2 = 0x0000000118429780 + (lldb) ptag $2 + (PermanentAtomImpl *) $3 = 0x0000000110123b80 u"html" + + +Supported type summaries and synthetic children +----------------------------------------------- + +In lldb terminology, type summaries are rules for how to display a value +when using the "expression" command (or its familiar-to-gdb-users "p" alias), +and synthetic children are fake member variables or array elements also +added by custom rules. + +For objects that do have synthetic children defined for them, like nsTArray, +the "expr -R -- EXPR" command can be used to show its actual member variables. + + +* nsAString, nsACString, + nsFixedString, nsFixedCString, + nsAutoString, nsAutoCString + + Strings have a type summary that shows the actual string. + + (lldb) frame info + frame #0: 0x000000010400cfea XUL`nsCSSParser::ParseProperty(this=0x00007fff5fbf5248, aPropID=eCSSProperty_margin_top, aPropValue=0x00007fff5fbf53f8, aSheetURI=0x0000000115ae8c00, aBaseURI=0x0000000115ae8c00, aSheetPrincipal=0x000000010ff9e040, aDeclaration=0x00000001826fd580, aChanged=0x00007fff5fbf5247, aIsImportant=false, aIsSVGMode=false) + 74 at nsCSSParser.cpp:12851 + (lldb) p aPropValue + (const nsAString) $16 = u"-25px" + + (lldb) p this + (nsHTMLDocument *) $18 = 0x0000000115b56000 + (lldb) p mContentType + (nsCString) $19 = { + nsACString = "text/html" + } + +* nscolor + + nscolors (32-bit RGBA colors) have a type summary that shows the color as + one of the CSS 2.1 color keywords, a six digit hex color, an rgba() color, + or the "transparent" keyword. + + (lldb) p this + (nsTextFrame *) $0 = 0x00000001168245e0 + (lldb) p *this->StyleColor() + (const nsStyleColor) $1 = { + mColor = lime + } + (lldb) expr -R -- *this->StyleColor() + (const nsStyleColor) $2 = { + mColor = 4278255360 + } + +* nsIAtom + + Atoms have a type summary that shows the string value inside the atom. + + (lldb) frame info + frame #0: 0x00000001028b8c49 XUL`mozilla::dom::Element::GetBoolAttr(this=0x0000000115ca1c50, aAttr=0x000000011012a640) const + 25 at Element.h:907 + (lldb) p aAttr + (PermanentAtomImpl *) $1 = 0x000000011012a640 u"readonly" + +* nsTArray and friends + + nsTArrays and their auto and fallible varieties have synthetic children + for their elements. This means when displaying them with "expr" (or "p"), + they will be shown like regular arrays, rather than showing the mHdr and + other fields. + + (lldb) frame info + frame #0: 0x00000001043eb8a8 XUL`SVGTextFrame::DoGlyphPositioning(this=0x000000012f3f8778) + 248 at SVGTextFrame.cpp:4940 + (lldb) p charPositions + (nsTArray) $5 = { + [0] = { + mozilla::gfx::BasePoint = { + x = 0 + y = 816 + } + } + [1] = { + mozilla::gfx::BasePoint = { + x = 426 + y = 816 + } + } + [2] = { + mozilla::gfx::BasePoint = { + x = 906 + y = 816 + } + } + } + (lldb) expr -R -- charPositions + (nsTArray) $4 = { + nsTArray_Impl = { + nsTArray_base = { + mHdr = 0x000000012f3f1b80 + } + } + } + +* nsTextNode, nsTextFragment + + Text nodes have a type summary that shows the nsTextFragment in the + nsTextNode, which itself has a type summary that shows the text + content. + + (lldb) p this + (nsTextFrame *) $14 = 0x000000011811bb10 + (lldb) p mContent + (nsTextNode *) $15 = 0x0000000118130110 "Search or enter address" + diff --git a/python/lldbutils/lldbutils/__init__.py b/python/lldbutils/lldbutils/__init__.py new file mode 100644 index 0000000000..e1263153df --- /dev/null +++ b/python/lldbutils/lldbutils/__init__.py @@ -0,0 +1,17 @@ +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + +import lldb + +__all__ = ["content", "general", "gfx", "layout", "utils"] + + +def init(): + for name in __all__: + init = None + try: + init = __import__("lldbutils." + name, globals(), locals(), ["init"]).init + except AttributeError: + pass + if init: + init(lldb.debugger) diff --git a/python/lldbutils/lldbutils/content.py b/python/lldbutils/lldbutils/content.py new file mode 100644 index 0000000000..8f2bf22ccd --- /dev/null +++ b/python/lldbutils/lldbutils/content.py @@ -0,0 +1,28 @@ +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + +from lldbutils import utils + + +def summarize_text_fragment(valobj, internal_dict): + content_union = valobj.GetChildAtIndex(0) + state_union = valobj.GetChildAtIndex(1).GetChildMemberWithName("mState") + length = state_union.GetChildMemberWithName("mLength").GetValueAsUnsigned(0) + if state_union.GetChildMemberWithName("mIs2b").GetValueAsUnsigned(0): + field = "m2b" + else: + field = "m1b" + ptr = content_union.GetChildMemberWithName(field) + return utils.format_string(ptr, length) + + +def ptag(debugger, command, result, dict): + """Displays the tag name of a content node.""" + debugger.HandleCommand("expr (" + command + ")->mNodeInfo.mRawPtr->mInner.mName") + + +def init(debugger): + debugger.HandleCommand( + "type summary add nsTextFragment -F lldbutils.content.summarize_text_fragment" + ) + debugger.HandleCommand("command script add -f lldbutils.content.ptag ptag") diff --git a/python/lldbutils/lldbutils/general.py b/python/lldbutils/lldbutils/general.py new file mode 100644 index 0000000000..577b3847fa --- /dev/null +++ b/python/lldbutils/lldbutils/general.py @@ -0,0 +1,165 @@ +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + +import lldb + +from lldbutils import utils + + +def summarize_string(valobj, internal_dict): + data = valobj.GetChildMemberWithName("mData") + length = valobj.GetChildMemberWithName("mLength").GetValueAsUnsigned(0) + return utils.format_string(data, length) + + +def summarize_atom(valobj, internal_dict): + target = lldb.debugger.GetSelectedTarget() + length = valobj.GetChildMemberWithName("mLength").GetValueAsUnsigned() + string = target.EvaluateExpression( + "(char16_t*)%s.GetUTF16String()" % valobj.GetName() + ) + return utils.format_string(string, length) + + +class TArraySyntheticChildrenProvider: + def __init__(self, valobj, internal_dict): + self.valobj = valobj + self.header = self.valobj.GetChildMemberWithName("mHdr") + self.element_type = self.valobj.GetType().GetTemplateArgumentType(0) + self.element_size = self.element_type.GetByteSize() + header_size = self.header.GetType().GetPointeeType().GetByteSize() + self.element_base_addr = self.header.GetValueAsUnsigned(0) + header_size + + def num_children(self): + return ( + self.header.Dereference() + .GetChildMemberWithName("mLength") + .GetValueAsUnsigned(0) + ) + + def get_child_index(self, name): + try: + index = int(name) + if index >= self.num_children(): + return None + # Ideally we'd use the exception type, but it's unclear what that is + # without knowing how to trigger the original exception. + except: # NOQA: E501, E722 + pass + return None + + def get_child_at_index(self, index): + if index >= self.num_children(): + return None + addr = self.element_base_addr + index * self.element_size + return self.valobj.CreateValueFromAddress( + "[%d]" % index, addr, self.element_type + ) + + +def prefcnt(debugger, command, result, dict): + """Displays the refcount of an object.""" + # We handled regular nsISupports-like refcounted objects and cycle collected + # objects. + target = debugger.GetSelectedTarget() + process = target.GetProcess() + thread = process.GetSelectedThread() + frame = thread.GetSelectedFrame() + obj = frame.EvaluateExpression(command) + if obj.GetError().Fail(): + print("could not evaluate expression") + return + obj = utils.dereference(obj) + field = obj.GetChildMemberWithName("mRefCnt") + if field.GetError().Fail(): + field = obj.GetChildMemberWithName("refCnt") + if field.GetError().Fail(): + print("not a refcounted object") + return + refcnt_type = field.GetType().GetCanonicalType().GetName() + if refcnt_type == "nsAutoRefCnt": + print(field.GetChildMemberWithName("mValue").GetValueAsUnsigned(0)) + elif refcnt_type == "nsCycleCollectingAutoRefCnt": + print( + field.GetChildMemberWithName("mRefCntAndFlags").GetValueAsUnsigned(0) >> 2 + ) + elif refcnt_type == "mozilla::ThreadSafeAutoRefCnt": + print( + field.GetChildMemberWithName("mValue") + .GetChildMemberWithName("mValue") + .GetValueAsUnsigned(0) + ) + elif refcnt_type == "int": # non-atomic mozilla::RefCounted object + print(field.GetValueAsUnsigned(0)) + elif refcnt_type == "mozilla::Atomic": # atomic mozilla::RefCounted object + print(field.GetChildMemberWithName("mValue").GetValueAsUnsigned(0)) + else: + print("unknown mRefCnt type " + refcnt_type) + + +# Used to work around http://llvm.org/bugs/show_bug.cgi?id=22211 +def callfunc(debugger, command, result, dict): + """Calls a function for which debugger information is unavailable by getting its address + from the symbol table. The function is assumed to return void.""" + + if "(" not in command: + print("Usage: callfunc your_function(args)") + return + + command_parts = command.split("(") + funcname = command_parts[0].strip() + args = command_parts[1] + + target = debugger.GetSelectedTarget() + symbols = target.FindFunctions(funcname).symbols + if not symbols: + print('Could not find a function symbol for a function called "%s"' % funcname) + return + + sym = symbols[0] + arg_types = "()" + if sym.name and sym.name.startswith(funcname + "("): + arg_types = sym.name[len(funcname) :] + debugger.HandleCommand( + "print ((void(*)%s)0x%0x)(%s" + % (arg_types, sym.addr.GetLoadAddress(target), args) + ) + + +def init(debugger): + debugger.HandleCommand( + "type summary add nsAString -F lldbutils.general.summarize_string" + ) + debugger.HandleCommand( + "type summary add nsACString -F lldbutils.general.summarize_string" + ) + debugger.HandleCommand( + "type summary add nsFixedString -F lldbutils.general.summarize_string" + ) + debugger.HandleCommand( + "type summary add nsFixedCString -F lldbutils.general.summarize_string" + ) + debugger.HandleCommand( + "type summary add nsAutoString -F lldbutils.general.summarize_string" + ) + debugger.HandleCommand( + "type summary add nsAutoCString -F lldbutils.general.summarize_string" + ) + debugger.HandleCommand( + "type summary add nsAtom -F lldbutils.general.summarize_atom" + ) + debugger.HandleCommand( + 'type synthetic add -x "nsTArray<" -l lldbutils.general.TArraySyntheticChildrenProvider' + ) + debugger.HandleCommand( + 'type synthetic add -x "AutoTArray<" -l lldbutils.general.TArraySyntheticChildrenProvider' # NOQA: E501 + ) + debugger.HandleCommand( + 'type synthetic add -x "FallibleTArray<" -l lldbutils.general.TArraySyntheticChildrenProvider' # NOQA: E501 + ) + debugger.HandleCommand( + "command script add -f lldbutils.general.prefcnt -f lldbutils.general.prefcnt prefcnt" + ) + debugger.HandleCommand( + "command script add -f lldbutils.general.callfunc -f lldbutils.general.callfunc callfunc" + ) diff --git a/python/lldbutils/lldbutils/gfx.py b/python/lldbutils/lldbutils/gfx.py new file mode 100644 index 0000000000..7622dd4f9c --- /dev/null +++ b/python/lldbutils/lldbutils/gfx.py @@ -0,0 +1,65 @@ +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + + +def summarize_nscolor(valobj, internal_dict): + colors = { + "#800000": "maroon", + "#ff0000": "red", + "#ffa500": "orange", + "#ffff00": "yellow", + "#808000": "olive", + "#800080": "purple", + "#ff00ff": "fuchsia", + "#ffffff": "white", + "#00ff00": "lime", + "#008000": "green", + "#000080": "navy", + "#0000ff": "blue", + "#00ffff": "aqua", + "#008080": "teal", + "#000000": "black", + "#c0c0c0": "silver", + "#808080": "gray", + } + value = valobj.GetValueAsUnsigned(0) + if value == 0: + return "transparent" + if value & 0xFF000000 != 0xFF000000: + return "rgba(%d, %d, %d, %f)" % ( + value & 0xFF, + (value >> 8) & 0xFF, + (value >> 16) & 0xFF, + ((value >> 24) & 0xFF) / 255.0, + ) + color = "#%02x%02x%02x" % (value & 0xFF, (value >> 8) & 0xFF, (value >> 16) & 0xFF) + if color in colors: + return colors[color] + return color + + +def summarize_rect(valobj, internal_dict): + x = valobj.GetChildMemberWithName("x").GetValue() + y = valobj.GetChildMemberWithName("y").GetValue() + width = valobj.GetChildMemberWithName("width").GetValue() + height = valobj.GetChildMemberWithName("height").GetValue() + return "%s, %s, %s, %s" % (x, y, width, height) + + +def rect_is_empty(valobj): + width = valobj.GetChildMemberWithName("width").GetValueAsSigned() + height = valobj.GetChildMemberWithName("height").GetValueAsSigned() + return width <= 0 or height <= 0 + + +def init(debugger): + debugger.HandleCommand( + "type summary add nscolor -v -F lldbutils.gfx.summarize_nscolor" + ) + debugger.HandleCommand("type summary add nsRect -v -F lldbutils.gfx.summarize_rect") + debugger.HandleCommand( + "type summary add nsIntRect -v -F lldbutils.gfx.summarize_rect" + ) + debugger.HandleCommand( + "type summary add gfxRect -v -F lldbutils.gfx.summarize_rect" + ) diff --git a/python/lldbutils/lldbutils/layout.py b/python/lldbutils/lldbutils/layout.py new file mode 100644 index 0000000000..c70216bff5 --- /dev/null +++ b/python/lldbutils/lldbutils/layout.py @@ -0,0 +1,46 @@ +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + + +def frametree(debugger, command, result, dict): + """Dumps the frame tree containing the given nsIFrame*.""" + debugger.HandleCommand("expr (" + command + ")->DumpFrameTree()") + + +def frametree_pixels(debugger, command, result, dict): + """Dumps the frame tree containing the given nsIFrame* in CSS pixels.""" + debugger.HandleCommand("expr (" + command + ")->DumpFrameTreeInCSSPixels()") + + +def frametreelimited(debugger, command, result, dict): + """Dumps the subtree of a frame tree rooted at the given nsIFrame*.""" + debugger.HandleCommand("expr (" + command + ")->DumpFrameTreeLimited()") + + +def frametreelimited_pixels(debugger, command, result, dict): + """Dumps the subtree of a frame tree rooted at the given nsIFrame* + in CSS pixels.""" + debugger.HandleCommand("expr (" + command + ")->DumpFrameTreeLimitedInCSSPixels()") + + +def pstate(debugger, command, result, dict): + """Displays a frame's state bits symbolically.""" + debugger.HandleCommand("expr mozilla::PrintFrameState(" + command + ")") + + +def init(debugger): + debugger.HandleCommand("command script add -f lldbutils.layout.frametree frametree") + debugger.HandleCommand( + "command script add -f lldbutils.layout.frametree_pixels frametree_pixels" + ) + debugger.HandleCommand( + "command script add -f lldbutils.layout.frametreelimited frametreelimited" + ) + debugger.HandleCommand( + "command script add -f lldbutils.layout.frametreelimited_pixels frametreelimited_pixels" + ) + debugger.HandleCommand("command alias ft frametree") + debugger.HandleCommand("command alias ftp frametree_pixels") + debugger.HandleCommand("command alias ftl frametreelimited") + debugger.HandleCommand("command alias ftlp frametreelimited_pixels") + debugger.HandleCommand("command script add -f lldbutils.layout.pstate pstate") diff --git a/python/lldbutils/lldbutils/utils.py b/python/lldbutils/lldbutils/utils.py new file mode 100644 index 0000000000..fdcf7da366 --- /dev/null +++ b/python/lldbutils/lldbutils/utils.py @@ -0,0 +1,86 @@ +# Any copyright is dedicated to the Public Domain. +# http://creativecommons.org/publicdomain/zero/1.0/ + + +def format_char(c): + if c == 0: + return "\\0" + elif c == 0x07: + return "\\a" + elif c == 0x08: + return "\\b" + elif c == 0x0C: + return "\\f" + elif c == 0x0A: + return "\\n" + elif c == 0x0D: + return "\\r" + elif c == 0x09: + return "\\t" + elif c == 0x0B: + return "\\v" + elif c == 0x5C: + return "\\" + elif c == 0x22: + return '\\"' + elif c == 0x27: + return "\\'" + elif c < 0x20 or c >= 0x80 and c <= 0xFF: + return "\\x%02x" % c + elif c >= 0x0100: + return "\\u%04x" % c + else: + return chr(c) + + +# Take an SBValue that is either a char* or char16_t* and formats it like lldb +# would when printing it. +def format_string(lldb_value, length=100): + ptr = lldb_value.GetValueAsUnsigned(0) + char_type = lldb_value.GetType().GetPointeeType() + if char_type.GetByteSize() == 1: + s = '"' + size = 1 + mask = 0xFF + elif char_type.GetByteSize() == 2: + s = 'u"' + size = 2 + mask = 0xFFFF + else: + return "(cannot format string with char type %s)" % char_type.GetName() + i = 0 + terminated = False + while i < length: + c = ( + lldb_value.CreateValueFromAddress( + "x", ptr + i * size, char_type + ).GetValueAsUnsigned(0) + & mask + ) + if c == 0: + terminated = True + break + s += format_char(c) + i = i + 1 + s += '"' + if not terminated and i != length: + s += "..." + return s + + +# Dereferences a raw pointer, nsCOMPtr, RefPtr, nsAutoPtr, already_AddRefed or +# mozilla::RefPtr; otherwise returns the value unchanged. +def dereference(lldb_value): + if lldb_value.TypeIsPointerType(): + return lldb_value.Dereference() + name = lldb_value.GetType().GetUnqualifiedType().GetName() + if ( + name.startswith("nsCOMPtr<") + or name.startswith("RefPtr<") + or name.startswith("nsAutoPtr<") + or name.startswith("already_AddRefed<") + ): + return lldb_value.GetChildMemberWithName("mRawPtr") + if name.startswith("mozilla::RefPtr<"): + return lldb_value.GetChildMemberWithName("ptr") + return lldb_value diff --git a/python/mach/.isort.cfg b/python/mach/.isort.cfg new file mode 100644 index 0000000000..aa7eca4250 --- /dev/null +++ b/python/mach/.isort.cfg @@ -0,0 +1,3 @@ +[settings] +profile=black +known_first_party=mach \ No newline at end of file diff --git a/python/mach/README.rst b/python/mach/README.rst new file mode 100644 index 0000000000..7c2e00becb --- /dev/null +++ b/python/mach/README.rst @@ -0,0 +1,13 @@ +==== +mach +==== + +Mach (German for *do*) is a generic command dispatcher for the command +line. + +To use mach, you install the mach core (a Python package), create an +executable *driver* script (named whatever you want), and write mach +commands. When the *driver* is executed, mach dispatches to the +requested command handler automatically. + +To learn more, read the docs in ``docs/``. diff --git a/python/mach/bash-completion.sh b/python/mach/bash-completion.sh new file mode 100644 index 0000000000..13935cf88c --- /dev/null +++ b/python/mach/bash-completion.sh @@ -0,0 +1,18 @@ +function _mach() +{ + local cur targets + COMPREPLY=() + + # Calling `mach-completion` with -h/--help would result in the + # help text being used as the completion targets. + if [[ $COMP_LINE == *"-h"* || $COMP_LINE == *"--help"* ]]; then + return 0 + fi + + # Load the list of targets + targets=`"${COMP_WORDS[0]}" mach-completion ${COMP_LINE}` + cur="${COMP_WORDS[COMP_CWORD]}" + COMPREPLY=( $(compgen -W "$targets" -- ${cur}) ) + return 0 +} +complete -o default -F _mach mach diff --git a/python/mach/docs/commands.rst b/python/mach/docs/commands.rst new file mode 100644 index 0000000000..7547193000 --- /dev/null +++ b/python/mach/docs/commands.rst @@ -0,0 +1,129 @@ +.. _mach_commands: + +===================== +Implementing Commands +===================== + +Mach commands are defined via Python decorators. + +All the relevant decorators are defined in the *mach.decorators* module. +The important decorators are as follows: + +:py:func:`Command ` + A function decorator that denotes that the function should be called when + the specified command is requested. The decorator takes a command name + as its first argument and a number of additional arguments to + configure the behavior of the command. The decorated function must take a + ``command_context`` argument as its first. + ``command_context`` is a properly configured instance of a ``MozbuildObject`` + subclass, meaning it can be used for accessing things like the current config + and running processes. + +:py:func:`CommandArgument ` + A function decorator that defines an argument to the command. Its + arguments are essentially proxied to ArgumentParser.add_argument() + +:py:func:`SubCommand ` + A function decorator that denotes that the function should be a + sub-command to an existing ``@Command``. The decorator takes the + parent command name as its first argument and the sub-command name + as its second argument. + + ``@CommandArgument`` can be used on ``@SubCommand`` instances just + like they can on ``@Command`` instances. + + +Here is a complete example: + +.. code-block:: python + + from mach.decorators import ( + CommandArgument, + Command, + ) + + @Command('doit', help='Do ALL OF THE THINGS.') + @CommandArgument('--force', '-f', action='store_true', + help='Force doing it.') + def doit(command_context, force=False): + # Do stuff here. + +When the module is loaded, the decorators tell mach about all handlers. +When mach runs, it takes the assembled metadata from these handlers and +hooks it up to the command line driver. Under the hood, arguments passed +to the decorators are being used to help mach parse command arguments, +formulate arguments to the methods, etc. See the documentation in the +:py:mod:`mach.base` module for more. + +The Python modules defining mach commands do not need to live inside the +main mach source tree. + +Conditionally Filtering Commands +================================ + +Sometimes it might only make sense to run a command given a certain +context. For example, running tests only makes sense if the product +they are testing has been built, and said build is available. To make +sure a command is only runnable from within a correct context, you can +define a series of conditions on the +:py:func:`Command ` decorator. + +A condition is simply a function that takes an instance of the +:py:func:`mozbuild.base.MachCommandBase` class as an argument, and +returns ``True`` or ``False``. If any of the conditions defined on a +command return ``False``, the command will not be runnable. The +docstring of a condition function is used in error messages, to explain +why the command cannot currently be run. + +Here is an example: + +.. code-block:: python + + from mach.decorators import ( + Command, + ) + + def build_available(cls): + """The build needs to be available.""" + return cls.build_path is not None + + @Command('run_tests', conditions=[build_available]) + def run_tests(command_context): + # Do stuff here. + +By default all commands without any conditions applied will be runnable, +but it is possible to change this behaviour by setting +``require_conditions`` to ``True``: + +.. code-block:: python + + m = mach.main.Mach() + m.require_conditions = True + +Minimizing Code in Commands +=========================== + +Mach command modules, classes, and methods work best when they are +minimal dispatchers. The reason is import bloat. Currently, the mach +core needs to import every Python file potentially containing mach +commands for every command invocation. If you have dozens of commands or +commands in modules that import a lot of Python code, these imports +could slow mach down and waste memory. + +It is thus recommended that mach modules, classes, and methods do as +little work as possible. Ideally the module should only import from +the :py:mod:`mach` package. If you need external modules, you should +import them from within the command method. + +To keep code size small, the body of a command method should be limited +to: + +1. Obtaining user input (parsing arguments, prompting, etc) +2. Calling into some other Python package +3. Formatting output + +Of course, these recommendations can be ignored if you want to risk +slower performance. + +In the future, the mach driver may cache the dispatching information or +have it intelligently loaded to facilitate lazy loading. diff --git a/python/mach/docs/driver.rst b/python/mach/docs/driver.rst new file mode 100644 index 0000000000..8a2a99a2f5 --- /dev/null +++ b/python/mach/docs/driver.rst @@ -0,0 +1,32 @@ +.. _mach_driver: + +======= +Drivers +======= + +Entry Points +============ + +It is possible to use setuptools' entry points to load commands +directly from python packages. A mach entry point is a function which +returns a list of files or directories containing mach command +providers. e.g.: + +.. code-block:: python + + def list_providers(): + providers = [] + here = os.path.abspath(os.path.dirname(__file__)) + for p in os.listdir(here): + if p.endswith('.py'): + providers.append(os.path.join(here, p)) + return providers + +See http://pythonhosted.org/setuptools/setuptools.html#dynamic-discovery-of-services-and-plugins +for more information on creating an entry point. To search for entry +point plugins, you can call +:py:meth:`mach.main.Mach.load_commands_from_entry_point`. e.g.: + +.. code-block:: python + + mach.load_commands_from_entry_point("mach.external.providers") diff --git a/python/mach/docs/faq.rst b/python/mach/docs/faq.rst new file mode 100644 index 0000000000..a640f83e87 --- /dev/null +++ b/python/mach/docs/faq.rst @@ -0,0 +1,152 @@ +.. _mach_faq: + +========================== +Frequently Asked Questions +========================== + +How do I report bugs? +--------------------- + +Bugs against the ``mach`` core can be filed in Bugzilla in the `Firefox +Build System::Mach +Core `__ component. + +.. note:: + + Most ``mach`` bugs are bugs in individual commands, not bugs in the core + ``mach`` code. Bugs for individual commands should be filed against the + component that command is related to. For example, bugs in the + *build* command should be filed against *Firefox Build System :: + General*. Bugs against testing commands should be filed somewhere in + the *Testing* product. + +How do I debug a command failing with a Python exception? +--------------------------------------------------------- + +You can run a command and break into ``pdb``, the Python debugger, +when the command is invoked with: + +.. code-block:: shell + + ./mach --debug-command FAILING-COMMAND ARGS ... + +How do I debug ``mach`` itself? +------------------------------- + +If you are editing the mach code, or other Python modules you can +open the terminal and start debugging with pdb with the following: + +.. code-block:: shell + + python3 -m pdb ./mach + +How do I debug ``pytest`` tests? +-------------------------------- + +First, before debugging, run ``./mach python-test`` once to ensure that +the testing virtualenv is up-to-date: + +.. code-block:: shell + + ./mach python-test path/to/test.py + +Then, using the testing virtualenv, debug the test file: + +.. code-block:: shell + + /_virtualenvs/python-test/bin/python -m pdb path/to/test.py + +How do I profile a slow command? +-------------------------------- + +To diagnose bottlenecks, you can collect a performance profile: + +.. code-block:: shell + + ./mach --profile-command SLOW-COMMAND ARGS ... + +Then, you can visualize ``mach_profile_SLOW-COMMAND.cProfile`` using +`snakeviz `__: + +.. code-block:: shell + + # If you don't have snakeviz installed yet: + python3 -m pip install snakeviz + python3 -m snakeviz mach_profile_SLOW-COMMAND.cProfile + +How do I profile ``mach`` itself? +--------------------------------- + +Since ``--profile-command`` only profiles commands, you'll need to invoke ``cProfile`` +directly to profile ``mach`` itself: + +.. code-block:: shell + + python3 -m cProfile -o mach.cProfile ./mach ... + python3 -m snakeviz mach.cProfile + +Is ``mach`` a build system? +--------------------------- + +No. ``mach`` is just a generic command dispatching tool that happens to have +a few commands that interact with the real build system. Historically, +``mach`` *was* born to become a better interface to the build system. +However, its potential beyond just build system interaction was quickly +realized and ``mach`` grew to fit those needs. + +How do I add features to ``mach``? +---------------------------------- +If you would like to add a new feature to ``mach`` that cannot be implemented as +a ``mach`` command, the first step is to file a bug in the +``Firefox Build System :: Mach Core`` component. + +Should I implement X as a ``mach`` command? +------------------------------------------- + +There are no hard or fast rules. Generally speaking, if you have some +piece of functionality or action that is useful to multiple people +(especially if it results in productivity wins), then you should +consider implementing a ``mach`` command for it. + +Some other cases where you should consider implementing something as a +``mach`` command: + +- When your tool is a random script in the tree. Random scripts are + hard to find and may not conform to coding conventions or best + practices. ``Mach`` provides a framework in which your tool can live that + will put it in a better position to succeed than if it were on its + own. +- When the alternative is a ``make`` target. The build team generally does + not like one-off ``make`` targets that aren't part of building (read: + compiling) the tree. This includes things related to testing and + packaging. These weigh down ``Makefiles`` and add to the burden of + maintaining the build system. Instead, you are encouraged to + implement ancillary functionality in Python. If you do implement something + in Python, hooking it up to ``mach`` is often trivial. + +How do I use 3rd-party Python packages in my ``mach`` command? +-------------------------------------------------------------- + +See :ref:`Using third-party Python packages`. + +How does ``mach`` fit into the modules system? +---------------------------------------------- + +Mozilla operates with a `modules governance +system `__ where +there are different components with different owners. There is not +currently a ``mach`` module. There may or may never be one; currently ``mach`` +is owned by the build team. + +Even if a ``mach`` module were established, ``mach`` command modules would +likely never belong to it. Instead, ``mach`` command modules are owned by the +team/module that owns the system they interact with. In other words, ``mach`` +is not a power play to consolidate authority for tooling. Instead, it aims to +expose that tooling through a common, shared interface. + + +Who do I contact for help or to report issues? +---------------------------------------------- + +You can ask questions in +`#build `__. diff --git a/python/mach/docs/index.rst b/python/mach/docs/index.rst new file mode 100644 index 0000000000..752fe93219 --- /dev/null +++ b/python/mach/docs/index.rst @@ -0,0 +1,89 @@ +==== +Mach +==== + +Mach (German for *do*) is a generic command dispatcher for the command +line. + +To use mach, you install the mach core (a Python package), create an +executable *driver* script (named whatever you want), and write mach +commands. When the *driver* is executed, mach dispatches to the +requested command handler automatically. + +.. raw:: html + +

Features

+ +---- + +On a high level, mach is similar to using argparse with subparsers (for +command handling). When you dig deeper, mach offers a number of +additional features: + +Distributed command definitions + With optparse/argparse, you have to define your commands on a central + parser instance. With mach, you annotate your command methods with + decorators and mach finds and dispatches to them automatically. + +Command categories + Mach commands can be grouped into categories when displayed in help. + This is currently not possible with argparse. + +Logging management + Mach provides a facility for logging (both classical text and + structured) that is available to any command handler. + +Settings files + Mach provides a facility for reading settings from an ini-like file + format. + +.. raw:: html + +

Components

+ +---- + +Mach is conceptually composed of the following components: + +core + The mach core is the core code powering mach. This is a Python package + that contains all the business logic that makes mach work. The mach + core is common to all mach deployments. + +commands + These are what mach dispatches to. Commands are simply Python methods + registered as command names. The set of commands is unique to the + environment mach is deployed in. + +driver + The *driver* is the entry-point to mach. It is simply an executable + script that loads the mach core, tells it where commands can be found, + then asks the mach core to handle the current request. The driver is + unique to the deployed environment. But, it's usually based on an + example from this source tree. + +.. raw:: html + +

Project State

+ +---- + +mach was originally written as a command dispatching framework to aid +Firefox development. While the code is mostly generic, there are still +some pieces that closely tie it to Mozilla/Firefox. The goal is for +these to eventually be removed and replaced with generic features so +mach is suitable for anybody to use. Until then, mach may not be the +best fit for you. + +.. toctree:: + :maxdepth: 1 + :hidden: + + usage + commands + driver + logging + settings + telemetry + windows-usage-outside-mozillabuild + faq diff --git a/python/mach/docs/logging.rst b/python/mach/docs/logging.rst new file mode 100644 index 0000000000..ff245cf032 --- /dev/null +++ b/python/mach/docs/logging.rst @@ -0,0 +1,100 @@ +.. _mach_logging: + +======= +Logging +======= + +Mach configures a built-in logging facility so commands can easily log +data. + +What sets the logging facility apart from most loggers you've seen is +that it encourages structured logging. Instead of conventional logging +where simple strings are logged, the internal logging mechanism logs all +events with the following pieces of information: + +* A string *action* +* A dict of log message fields +* A formatting string + +Essentially, instead of assembling a human-readable string at +logging-time, you create an object holding all the pieces of data that +will constitute your logged event. For each unique type of logged event, +you assign an *action* name. + +Depending on how logging is configured, your logged event could get +written a couple of different ways. + +JSON Logging +============ + +Where machines are the intended target of the logging data, a JSON +logger is configured. The JSON logger assembles an array consisting of +the following elements: + +* Decimal wall clock time in seconds since UNIX epoch +* String *action* of message +* Object with structured message data + +The JSON-serialized array is written to a configured file handle. +Consumers of this logging stream can just perform a readline() then feed +that into a JSON deserializer to reconstruct the original logged +message. They can key off the *action* element to determine how to +process individual events. There is no need to invent a parser. +Convenient, isn't it? + +Logging for Humans +================== + +Where humans are the intended consumer of a log message, the structured +log message are converted to more human-friendly form. This is done by +utilizing the *formatting* string provided at log time. The logger +simply calls the *format* method of the formatting string, passing the +dict containing the message's fields. + +When *mach* is used in a terminal that supports it, the logging facility +also supports terminal features such as colorization. This is done +automatically in the logging layer - there is no need to control this at +logging time. + +In addition, messages intended for humans typically prepends every line +with the time passed since the application started. + +Logging HOWTO +============= + +Structured logging piggybacks on top of Python's built-in logging +infrastructure provided by the *logging* package. We accomplish this by +taking advantage of *logging.Logger.log()*'s *extra* argument. To this +argument, we pass a dict with the fields *action* and *params*. These +are the string *action* and dict of message fields, respectively. The +formatting string is passed as the *msg* argument, like normal. + +If you were logging to a logger directly, you would do something like: + +.. code-block:: python + + logger.log(logging.INFO, 'My name is {name}', + extra={'action': 'my_name', 'params': {'name': 'Gregory'}}) + +The JSON logging would produce something like:: + + [1339985554.306338, "my_name", {"name": "Gregory"}] + +Human logging would produce something like:: + + 0.52 My name is Gregory + +Since there is a lot of complexity using logger.log directly, it is +recommended to go through a wrapping layer that hides part of the +complexity for you. The easiest way to do this is by utilizing the +LoggingMixin: + +.. code-block:: python + + import logging + from mach.mixin.logging import LoggingMixin + + class MyClass(LoggingMixin): + def foo(self): + self.log(logging.INFO, 'foo_start', {'bar': True}, + 'Foo performed. Bar: {bar}') diff --git a/python/mach/docs/metrics.md b/python/mach/docs/metrics.md new file mode 100644 index 0000000000..8c826f54a9 --- /dev/null +++ b/python/mach/docs/metrics.md @@ -0,0 +1,55 @@ + + +# Metrics +This document enumerates the metrics collected by this project using the [Glean SDK](https://mozilla.github.io/glean/book/index.html). +This project may depend on other projects which also collect metrics. +This means you might have to go searching through the dependency tree to get a full picture of everything collected by this project. + +# Pings + + - [usage](#usage) + + +## usage + +Sent when the mach invocation is completed (regardless of result). Contains information about the mach invocation that was made, its result, and some details about the current environment and hardware. + + +This ping includes the [client id](https://mozilla.github.io/glean/book/user/pings/index.html#the-client_info-section). + +**Data reviews for this ping:** + +- + +**Bugs related to this ping:** + +- + +The following metrics are added to the ping: + +| Name | Type | Description | Data reviews | Extras | Expiration | [Data Sensitivity](https://wiki.mozilla.org/Firefox/Data_Collection) | +| --- | --- | --- | --- | --- | --- | --- | +| mach.argv |[string_list](https://mozilla.github.io/glean/book/user/metrics/string_list.html) |Parameters provided to mach. Absolute paths are sanitized to be relative to one of a few key base paths, such as the "$topsrcdir", "$topobjdir", or "$HOME". For example: "/home/mozilla/dev/firefox/python/mozbuild" would be replaced with "$topsrcdir/python/mozbuild". If a valid replacement base path cannot be found, the path is replaced with "". |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1291053#c34)||never | | +| mach.command |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |The name of the mach command that was invoked, such as "build", "doc", or "try". |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1291053#c34)||never | | +| mach.duration |[timespan](https://mozilla.github.io/glean/book/user/metrics/timespan.html) |How long it took for the command to complete. |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1291053#c34)||never | | +| mach.success |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |True if the mach invocation succeeded. |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1291053#c34)||never | | +| mach.system.cpu_brand |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |CPU brand string from CPUID. |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1291053#c34)||never | | +| mach.system.distro |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |The name of the operating system distribution. |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1655845#c3)||never | | +| mach.system.distro_version |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |The high-level OS version. |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1655845#c3)||never | | +| mach.system.logical_cores |[counter](https://mozilla.github.io/glean/book/user/metrics/counter.html) |Number of logical CPU cores present. |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1291053#c34)||never | | +| mach.system.memory |[memory_distribution](https://mozilla.github.io/glean/book/user/metrics/memory_distribution.html) |Amount of system memory. |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1291053#c34)||never | | +| mach.system.physical_cores |[counter](https://mozilla.github.io/glean/book/user/metrics/counter.html) |Number of physical CPU cores present. |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1291053#c34)||never | | +| mozbuild.artifact |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |True if `--enable-artifact-builds`. |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1291053#c34)||never | | +| mozbuild.ccache |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |True if `--with-ccache`. |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1291053#c34)||never | | +| mozbuild.clobber |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |True if the build was a clobber/full build. |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1526072#c15)||never | | +| mozbuild.compiler |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |The compiler type in use (CC_TYPE), such as "clang" or "gcc". |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1291053#c34)||never | | +| mozbuild.debug |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |True if `--enable-debug`. |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1291053#c34)||never | | +| mozbuild.icecream |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |True if icecream in use. |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1291053#c34)||never | | +| mozbuild.opt |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |True if `--enable-optimize`. |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1291053#c34)||never | | +| mozbuild.project |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |The project being built. |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1654084#c2)||never | | +| mozbuild.sccache |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |True if ccache in use is sccache. |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1291053#c34)||never | | + + +Data categories are [defined here](https://wiki.mozilla.org/Firefox/Data_Collection). + + diff --git a/python/mach/docs/settings.rst b/python/mach/docs/settings.rst new file mode 100644 index 0000000000..56f0d9ac82 --- /dev/null +++ b/python/mach/docs/settings.rst @@ -0,0 +1,137 @@ +.. _mach_settings: + +======== +Settings +======== + +Mach can read settings in from a set of configuration files. These +configuration files are either named ``machrc`` or ``.machrc`` and +are specified by the bootstrap script. In mozilla-central, these files +can live in ``~/.mozbuild`` and/or ``topsrcdir``. + +Settings can be specified anywhere, and used both by mach core or +individual commands. + + +Core Settings +============= + +These settings are implemented by mach core. + +* alias - Create a command alias. This is useful if you want to alias a command to something else, optionally including some defaults. It can either be used to create an entire new command, or provide defaults for an existing one. For example: + +.. parsed-literal:: + + [alias] + mochitest = mochitest -f browser + browser-test = mochitest -f browser + + +Defining Settings +================= + +Settings need to be explicitly defined, along with their type, +otherwise mach will throw when trying to access them. + +To define settings, use the :func:`~decorators.SettingsProvider` +decorator in an existing mach command module. E.g: + +.. code-block:: python + + from mach.decorators import SettingsProvider + from mozbuild.base import MachCommandBase + + @SettingsProvider + class ArbitraryClassName(MachCommandBase): + config_settings = [ + ('foo.bar', 'string', "A helpful description"), + ('foo.baz', 'int', "Another description", 0, {'choices': set([0,1,2])}), + ] + +``@SettingsProvider``'s must specify a variable called ``config_settings`` +that returns a list of tuples. Alternatively, it can specify a function +called ``config_settings`` that returns a list of tuples. + +Each tuple is of the form: + +.. code-block:: python + + ('
.