Skip to content
Open
7 changes: 6 additions & 1 deletion .github/actions/internal_tests/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ inputs:
artifact_name:
description: "The name of the artifact to be used for tests (e.g., Cobalt.apk)."
default: "Cobalt.apk"
test_device_family:
description: "The test device family (e.g., raspi, rdk)."
default: ""

runs:
using: "composite"
Expand All @@ -36,7 +39,7 @@ runs:
shell: bash
- name: Run Tests on ${{ matrix.platform }} Platform
env:
GCS_ARTIFACTS_PATH: /bigstore/${{ env.PROJECT_NAME }}-test-artifacts/${{ github.workflow }}/${{ github.run_number }}/${{ matrix.platform }}/${{ matrix.platform }}_qa/${{ inputs.artifact_name }}
GCS_ARTIFACTS_PATH: ${{ env.PROJECT_NAME }}-test-artifacts/${{ github.workflow }}/${{ github.run_number }}/${{ matrix.platform }}/${{ matrix.platform }}_qa
GITHUB_SHA: ${{ github.sha }}
GITHUB_TOKEN: ${{ github.token }}
GITHUB_EVENT_NAME: ${{ github.event_name }}
Expand Down Expand Up @@ -79,6 +82,8 @@ runs:
--label author_id-${GITHUB_PR_HEAD_USER_ID:-$GITHUB_COMMIT_AUTHOR_EMAIL} \
--label branch:${GITHUB_REF_NAME} \
--dimensions '${{ inputs.test_dimensions }}' \
--artifact_name '${{ inputs.artifact_name }}' \
--device_family '${{ inputs.test_device_family }}' \
--cobalt_path "${GCS_ARTIFACTS_PATH}" || {
echo "Finished running tests..."
echo "The test session failed. See logs for details."
Expand Down
7 changes: 7 additions & 0 deletions .github/config/evergreen-arm-hardfp-raspi.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"test_package": true,
"test_on_device": true,
"test_device_family": "raspi",
"test_e2e": true,
"test_root_target": "//cobalt:gn_all",
"test_attempts": "3",
"test_dimensions": {
Expand All @@ -21,5 +22,11 @@
"name": "arm-hardfp-raspi",
"platform": "evergreen-arm-hardfp-raspi"
}
],
"e2e_test_targets": [
{
"target": "//video/youtube/web/living_room/kabuki/testing/end2end/browse:infra_smoke_test_custom_cobalt_raspi",
"test_attempts": "6"
}
]
}
7 changes: 7 additions & 0 deletions .github/config/evergreen-arm-hardfp-rdk.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"test_package": true,
"test_on_device": true,
"test_device_family": "rdk",
"test_e2e": true,
"test_root_target": "//cobalt:gn_all",
"test_attempts": "3",
"test_dimensions": {
Expand All @@ -21,5 +22,11 @@
"name": "arm-hardfp-rdk",
"platform": "evergreen-arm-hardfp-rdk"
}
],
"e2e_test_targets": [
{
"target": "//video/youtube/web/living_room/kabuki/testing/end2end/browse:infra_smoke_test_custom_cobalt_rdk",
"test_attempts": "6"
}
]
}
1 change: 1 addition & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ jobs:
test_type: 'e2e_test'
test_targets: '${{ needs.initialize.outputs.e2e_test_targets }}'
test_dimensions: '${{ needs.initialize.outputs.test_dimensions }}'
test_device_family: '${{ needs.initialize.outputs.test_device_family}}'

yts-test:
needs: [initialize, build]
Expand Down
14 changes: 12 additions & 2 deletions cobalt/tools/on_device_tests_gateway_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,13 @@ def _process_test_requests(args: argparse.Namespace) -> List[Dict[str, Any]]:
elif args.test_attempts:
test_args.extend([f'test_attempts={args.test_attempts}'])
test_cmd_args = []
files = [f'cobalt_path={args.cobalt_path}']
params = [f'yt_binary_name={_E2E_DEFAULT_YT_BINARY_NAME}']
files = []
if args.device_family in ['rdk', 'raspi']:
params.append(f'gcs_cobalt_archive=gs://{args.cobalt_path}.zip')
else:
bigstore_path = f'/bigstore/{args.cobalt_path}/{args.artifact_name}'
files.append(f'cobalt_path={bigstore_path}')

else:
raise ValueError(f'Unsupported test type: {args.test_type}')
Expand Down Expand Up @@ -315,7 +320,6 @@ def main() -> int:
trigger_args.add_argument(
'--device_family',
type=str,
choices=['android', 'raspi', 'rdk'],
help='Family of device to run tests on.',
)
trigger_args.add_argument(
Expand Down Expand Up @@ -394,6 +398,12 @@ def main() -> int:
type=str,
help='Path to Cobalt apk.',
)
e2e_test_group.add_argument(
'--artifact_name',
type=str,
help=('Artifact name, used to specify the cobalt path in non-evergreen'
' workflows'),
)

# Watch command
watch_parser = subparsers.add_parser(
Expand Down