Bug 1886531 - Adjust matrix client label for test matrices on Firebase Test Lab r=ajoltan,jajohnson

Differential Revision: https://phabricator.services.mozilla.com/D207440
This commit is contained in:
Aaron Train 2024-04-15 20:18:51 +00:00
parent 7a10ac5ee0
commit c426dcb6a2

View file

@ -21,6 +21,7 @@ import sys
from enum import Enum
from pathlib import Path
from typing import List, Optional, Union
from urllib.parse import urlparse
# Worker paths and binaries
@ -116,10 +117,18 @@ def execute_tests(
Worker.RESULTS_DIR.value,
"--project",
os.environ.get("GOOGLE_PROJECT"),
"--client-details",
f'matrixLabel={os.environ.get("PULL_REQUEST_NUMBER", "None")}',
]
# Add a client details parameter using the repository name
matrixLabel = os.environ.get("GECKO_HEAD_REPOSITORY")
if matrixLabel is not None:
flank_command.extend(
[
"--client-details",
f"matrixLabel={urlparse(matrixLabel).path.rpartition('/')[-1]}",
]
)
# Add androidTest APK if provided (optional) as robo test or instrumentation test
if apk_test:
flank_command.extend(["--test", str(apk_test)])