[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser-bundle-testsuite][main] Bug 40113: Pass test tag as an argument for test jobs



Title: GitLab

boklm pushed to branch main at The Tor Project / Applications / tor-browser-bundle-testsuite

Commits:

  • 763ab6a8
    by Beatriz Rizental at 2026-06-10T17:43:50-03:00
    Bug 40113: Pass test tag as an argument for test jobs
    

7 changed files:

Changes:

  • .gitlab-ci.yml
    ... ... @@ -17,6 +17,7 @@ include:
    17 17
       - local: '.gitlab/_base.yml'
    
    18 18
         inputs:
    
    19 19
           mozharness_url: $[[ inputs.mozharness_url ]]
    
    20
    +      tag: $[[ inputs.tag ]]
    
    20 21
           android_x86_64_installer_url: $[[ inputs.android_x86_64_installer_url ]]
    
    21 22
           android_x86_64_package_name: $[[ inputs.android_x86_64_package_name ]]
    
    22 23
           android_x86_64_artifacts_url: $[[ inputs.android_x86_64_artifacts_url ]]
    

  • .gitlab/README.md
    ... ... @@ -88,6 +88,7 @@ The pipeline accepts the following inputs:
    88 88
     - `android_x86_64_artifacts_url`: URL to the Android test artifacts, including `target.test_packages.json`.
    
    89 89
     - `android_x86_64_sha256sums_url`: URL to the Android `sha256sums.txt` file. Optional. When provided, the job checks this URL is reachable before running the full test suite.
    
    90 90
     - `android_x86_64_package_name`: Android package name to test.
    
    91
    +- `tag`: Tag used to filter tests. Defaults to `""`.
    
    91 92
     
    
    92 93
     All inputs default to the empty string. The platform-specific inputs are optional when triggering the pipeline as a whole, but the installer URL, artifacts URL, and (for Android) package name must be provided together for that platform's job to run.
    
    93 94
     
    

  • .gitlab/_base.yml
    ... ... @@ -4,6 +4,7 @@ spec:
    4 4
     ---
    
    5 5
     variables:
    
    6 6
       MOZHARNESS_URL: "$[[ inputs.mozharness_url ]]"
    
    7
    +  TAG: "$[[ inputs.tag ]]"
    
    7 8
     
    
    8 9
     .common:
    
    9 10
       before_script:
    

  • .gitlab/_inputs.yml
    ... ... @@ -3,6 +3,10 @@ inputs:
    3 3
         type: string
    
    4 4
         default: ""
    
    5 5
         description: "Location of the mozharness.zip archive"
    
    6
    +  tag:
    
    7
    +    type: string
    
    8
    +    default: ""
    
    9
    +    description: "Tag used to filter tests"
    
    6 10
     
    
    7 11
       android_x86_64_installer_url:
    
    8 12
         type: string
    

  • .gitlab/test_marionette.yml
    ... ... @@ -6,7 +6,7 @@
    6 6
           --config-file "$(pwd)/mozharness/configs/marionette/prod_config.py"
    
    7 7
           --installer-url "$INSTALLER_URL"
    
    8 8
           --test-packages-url "$ARTIFACTS_URL/target.test_packages.json"
    
    9
    -      --tag tor
    
    9
    +      --tag "$TAG"
    
    10 10
           --headless
    
    11 11
     
    
    12 12
     debian-x86_64_marionette:
    
    ... ... @@ -36,4 +36,4 @@ android-x86_64_marionette:
    36 36
           --installer-url "$INSTALLER_URL"
    
    37 37
           --test-packages-url "$ARTIFACTS_URL/target.test_packages.json"
    
    38 38
           --package-name "$PACKAGE_NAME"
    
    39
    -      --tag tor
    39
    +      --tag "$TAG"

  • config/tb-build-06.torproject.org
    ... ... @@ -36,11 +36,13 @@ my $test_post = sub {
    36 36
         return unless $test->{results} && $test->{results}{success};
    
    37 37
         return unless $test->{publish_dir};
    
    38 38
     
    
    39
    +    my $tag = $test->{name} =~ /^torbrowser/ ? 'tor' : 'mullvad-browser';
    
    39 40
         my ($stdout, $stderr, $success) = capture_exec(
    
    40 41
             'python3', "$FindBin::Bin/tools/trigger-test-pipeline.py",
    
    41 42
             '--step-name', $test->{name},
    
    42 43
             '--publish-url', $publish_url,
    
    43 44
             '--publish-dir', $test->{publish_dir},
    
    45
    +        '--tag', $tag,
    
    44 46
         );
    
    45 47
         write_file(
    
    46 48
           "$tbbinfos->{'results-dir'}/$test->{name}.trigger-test-pipeline.stderr.txt",
    

  • tools/trigger-test-pipeline.py
    ... ... @@ -58,6 +58,11 @@ def parse_args() -> argparse.Namespace:
    58 58
             required=True,
    
    59 59
             help="Subdirectory within the publish URL where build artifacts are located.",
    
    60 60
         )
    
    61
    +    parser.add_argument(
    
    62
    +        "--tag",
    
    63
    +        required=False,
    
    64
    +        help="Tag used to filter tests.",
    
    65
    +    )
    
    61 66
         parser.add_argument(
    
    62 67
             "--dry-run",
    
    63 68
             action="store_true",
    
    ... ... @@ -66,7 +71,7 @@ def parse_args() -> argparse.Namespace:
    66 71
         return parser.parse_args()
    
    67 72
     
    
    68 73
     
    
    69
    -def build_inputs(step_name: str, publish_url: str, publish_dir: str) -> dict[str, str] | None:
    
    74
    +def build_inputs(step_name: str, publish_url: str, publish_dir: str, tag: str) -> dict[str, str] | None:
    
    70 75
         # Add the architecture as padding, to address the macos case which doesn't
    
    71 76
         # have architecture in the step name since it is a universal build.
    
    72 77
         browser, channel, platform, architecture = (step_name.split("-") + ["x86_64"])[:4]
    
    ... ... @@ -111,6 +116,9 @@ def build_inputs(step_name: str, publish_url: str, publish_dir: str) -> dict[str
    111 116
         if platform == "android":
    
    112 117
             inputs[f"{input_prefix}_package_name"] = f"org.torproject.{browser}_{channel}"
    
    113 118
     
    
    119
    +    if tag:
    
    120
    +        inputs["tag"] = tag
    
    121
    +
    
    114 122
         return inputs
    
    115 123
     
    
    116 124
     
    
    ... ... @@ -149,7 +157,7 @@ def main() -> int:
    149 157
         with open(token_file) as f:
    
    150 158
             trigger_token = f.read().strip()
    
    151 159
     
    
    152
    -    inputs = build_inputs(args.step_name, args.publish_url, args.publish_dir)
    
    160
    +    inputs = build_inputs(args.step_name, args.publish_url, args.publish_dir, args.tag)
    
    153 161
         if inputs is None:
    
    154 162
             logger.info(f"No CI inputs for step {args.step_name!r}, skipping.")
    
    155 163
             return 0
    

  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx