brizental pushed to branch tor-browser-140.2.0esr-15.0-1 at The Tor Project / Applications / Tor Browser

Commits:

19 changed files:

Changes:

  • .gitlab-ci.yml
    1 1
     stages:
    
    2 2
       - update-container-images
    
    3 3
       - lint
    
    4
    +  - test
    
    4 5
       - startup-test
    
    5 6
       - update-translations
    
    6 7
     
    
    ... ... @@ -11,6 +12,7 @@ variables:
    11 12
     include:
    
    12 13
       - local: '.gitlab/ci/mixins.yml'
    
    13 14
       - local: '.gitlab/ci/jobs/lint/lint.yml'
    
    15
    +  - local: '.gitlab/ci/jobs/test/python-test.yml'
    
    14 16
       - local: '.gitlab/ci/jobs/startup-test/startup-test.yml'
    
    15 17
       - local: '.gitlab/ci/jobs/update-containers.yml'
    
    16 18
       - local: '.gitlab/ci/jobs/update-translations.yml'

  • .gitlab/ci/jobs/lint/helpers.py.gitlab/ci/jobs/helpers.py
    ... ... @@ -112,7 +112,7 @@ if __name__ == "__main__":
    112 112
         parser.add_argument(
    
    113 113
             "--get-changed-files",
    
    114 114
             help="Get list of changed files."
    
    115
    -        "When running from a merge request get sthe list of changed files since the merge-base of the current branch."
    
    115
    +        "When running from a merge request gets the list of changed files since the merge-base of the current branch."
    
    116 116
             "When running from a protected branch i.e. any branch that starts with <something>-browser-, gets the list of files changed since the FIREFOX_ tag.",
    
    117 117
             action="store_true",
    
    118 118
         )
    

  • .gitlab/ci/jobs/lint/lint.yml
    ... ... @@ -18,7 +18,7 @@ lint-all:
    18 18
         - firefox
    
    19 19
       script:
    
    20 20
         - ./mach configure --with-base-browser-version=0.0.0
    
    21
    -    - .gitlab/ci/jobs/lint/helpers.py --get-changed-files | xargs -0 --no-run-if-empty ./mach lint -v
    
    21
    +    - .gitlab/ci/jobs/helpers.py --get-changed-files | xargs -0 --no-run-if-empty ./mach lint -v
    
    22 22
       rules:
    
    23 23
         - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
    
    24 24
         # Run job whenever a commit is merged to a protected branch
    

  • .gitlab/ci/jobs/test/python-test.yml
    1
    +python-test:
    
    2
    +  extends: .with-local-repo-bash
    
    3
    +  stage: test
    
    4
    +  image: $IMAGE_PATH
    
    5
    +  interruptible: true
    
    6
    +  variables:
    
    7
    +    MOZBUILD_STATE_PATH: "/var/tmp/mozbuild"
    
    8
    +  cache:
    
    9
    +    paths:
    
    10
    +      - node_modules
    
    11
    +    # Store the cache regardless on job outcome
    
    12
    +    when: 'always'
    
    13
    +    # Share the cache throughout all pipelines running for a given branch
    
    14
    +    key: $CI_COMMIT_REF_SLUG
    
    15
    +  tags:
    
    16
    +    # Run these jobs in the browser dedicated runners.
    
    17
    +    - firefox
    
    18
    +  script:
    
    19
    +    - ./mach configure --with-base-browser-version=0.0.0
    
    20
    +    - .gitlab/ci/jobs/helpers.py --get-changed-files | xargs -0 --no-run-if-empty ./mach python-test -v
    
    21
    +  rules:
    
    22
    +    - if: $CI_PIPELINE_SOURCE == 'merge_request_event' || ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true' && $CI_PIPELINE_SOURCE == 'push')
    
    23
    +      changes:
    
    24
    +        - "**/test_*.py"

  • .gitlab/ci/jobs/update-translations.yml
    ... ... @@ -102,7 +102,7 @@ combine-en-US-translations:
    102 102
         # push-en-US-translations job.
    
    103 103
         - echo 'COMBINE_TRANSLATIONS_JOB_ID='"$CI_JOB_ID" >job_id.env
    
    104 104
         - pip install compare_locales
    
    105
    -    - python ./tools/base-browser/l10n/combine-translation-versions.py "$CI_COMMIT_BRANCH" "$TRANSLATION_FILES" "$COMBINED_FILES_JSON"
    
    105
    +    - python ./tools/base_browser/l10n/combine-translation-versions.py "$CI_COMMIT_BRANCH" "$TRANSLATION_FILES" "$COMBINED_FILES_JSON"
    
    106 106
     
    
    107 107
     push-en-US-translations:
    
    108 108
       extends: .update-translation-base
    

  • tools/base-browser/l10n/combine/tests/README deleted
    1
    -python tests to be run with pytest.
    
    2
    -Requires the compare-locales package.

  • tools/base-browser/git-rebase-fixup-preprocessortools/base_browser/git-rebase-fixup-preprocessor

  • tools/base-browser/l10n/combine-translation-versions.pytools/base_browser/l10n/combine-translation-versions.py

  • tools/base-browser/l10n/combine/__init__.pytools/base_browser/l10n/combine/__init__.py

  • tools/base-browser/l10n/combine/combine.pytools/base_browser/l10n/combine/combine.py

  • tools/base-browser/l10n/combine/tests/__init__.pytools/base_browser/l10n/combine/tests/__init__.py

  • tools/base_browser/l10n/combine/tests/python.toml
    1
    +[DEFAULT]
    
    2
    +subsuite = "base-browser"
    
    3
    +
    
    4
    +["test_android.py"]
    
    5
    +
    
    6
    +["test_dtd.py"]
    
    7
    +
    
    8
    +["test_fluent.py"]
    
    9
    +
    
    10
    +["test_properties.py"]

  • tools/base-browser/l10n/combine/tests/test_android.pytools/base_browser/l10n/combine/tests/test_android.py
    1 1
     import textwrap
    
    2 2
     
    
    3
    -from combine import combine_files
    
    3
    +import mozunit
    
    4
    +from base_browser.l10n.combine import combine_files
    
    4 5
     
    
    5 6
     
    
    6 7
     def wrap_in_xml(content):
    
    ... ... @@ -413,3 +414,7 @@ def test_alternatives():
    413 414
             <string name="string_4_alt">Other string</string>
    
    414 415
             """,
    
    415 416
         )
    
    417
    +
    
    418
    +
    
    419
    +if __name__ == "__main__":
    
    420
    +    mozunit.main()

  • tools/base-browser/l10n/combine/tests/test_dtd.pytools/base_browser/l10n/combine/tests/test_dtd.py
    1 1
     import textwrap
    
    2 2
     
    
    3
    -from combine import combine_files
    
    3
    +import mozunit
    
    4
    +from base_browser.l10n.combine import combine_files
    
    4 5
     
    
    5 6
     
    
    6 7
     def assert_result(new_content, old_content, expect):
    
    ... ... @@ -411,3 +412,7 @@ def test_alternatives():
    411 412
             <!ENTITY string.4.alt "Other string">
    
    412 413
             """,
    
    413 414
         )
    
    415
    +
    
    416
    +
    
    417
    +if __name__ == "__main__":
    
    418
    +    mozunit.main()

  • tools/base-browser/l10n/combine/tests/test_fluent.pytools/base_browser/l10n/combine/tests/test_fluent.py
    1 1
     import textwrap
    
    2 2
     
    
    3
    -from combine import combine_files
    
    3
    +import mozunit
    
    4
    +from base_browser.l10n.combine import combine_files
    
    4 5
     
    
    5 6
     
    
    6 7
     def assert_result(new_content, old_content, expect):
    
    ... ... @@ -475,3 +476,7 @@ def test_alternatives():
    475 476
             -string-4-alt = Other string
    
    476 477
             """,
    
    477 478
         )
    
    479
    +
    
    480
    +
    
    481
    +if __name__ == "__main__":
    
    482
    +    mozunit.main()

  • tools/base-browser/l10n/combine/tests/test_properties.pytools/base_browser/l10n/combine/tests/test_properties.py
    1 1
     import textwrap
    
    2 2
     
    
    3
    -from combine import combine_files
    
    3
    +import mozunit
    
    4
    +from base_browser.l10n.combine import combine_files
    
    4 5
     
    
    5 6
     
    
    6 7
     def assert_result(new_content, old_content, expect):
    
    ... ... @@ -408,3 +409,7 @@ def test_alternatives():
    408 409
             string.4.alt = Other string
    
    409 410
             """,
    
    410 411
         )
    
    412
    +
    
    413
    +
    
    414
    +if __name__ == "__main__":
    
    415
    +    mozunit.main()

  • tools/base-browser/missing-css-variables.pytools/base_browser/missing-css-variables.py

  • tools/base-browser/tb-devtools/base_browser/tb-dev

  • tools/moz.build
    ... ... @@ -71,6 +71,7 @@ with Files("tryselect/docs/**"):
    71 71
         SCHEDULES.exclusive = ["docs"]
    
    72 72
     
    
    73 73
     PYTHON_UNITTEST_MANIFESTS += [
    
    74
    +    "base_browser/l10n/combine/tests/python.toml",
    
    74 75
         "fuzzing/smoke/python.toml",
    
    75 76
         "lint/test/python.toml",
    
    76 77
         "tryselect/test/python.toml",