[ci] Introduce LUCI versions of Linux desktop platform tests (#4223)

Adds scripts and LUCI targets for the Linux desktop platform test tasks, corresponding to the Cirrus linux-platform_test tasks.

Part of https://github.com/flutter/flutter/issues/114373
This commit is contained in:
stuartmorgan
2023-07-14 21:46:32 -04:00
committed by GitHub
parent 6181f65547
commit 86c2b7da7b
4 changed files with 83 additions and 0 deletions

View File

@ -498,6 +498,35 @@ targets:
target_file: linux_build_all_packages.yaml
channel: stable
- name: Linux_desktop platform_tests master
bringup: true # New target
recipe: packages/packages
timeout: 30
properties:
version_file: flutter_master.version
target_file: linux_platform_tests.yaml
channel: master
# Install Chrome as a default handler for schemes for url_launcher.
dependencies: >-
[
{"dependency": "chrome_and_driver", "version": "version:114.0"}
]
- name: Linux_desktop platform_tests stable
bringup: true # New target
recipe: packages/packages
presubmit: false
timeout: 30
properties:
version_file: flutter_stable.version
target_file: linux_platform_tests.yaml
channel: stable
# Install Chrome as a default handler for schemes for url_launcher.
dependencies: >-
[
{"dependency": "chrome_and_driver", "version": "version:114.0"}
]
### iOS+macOS tasks ###
# TODO(stuartmorgan): Move this to ARM once google_maps_flutter has ARM
# support. `pod lint` makes a synthetic target that doesn't respect the

View File

@ -0,0 +1,33 @@
#!/bin/bash
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -e
# Set up a .desktop file pointing to the CIPD-installed Chrome.
readonly LOCAL_DESKTOP_FILE_DIR=~/.local/share/applications
mkdir -p "${LOCAL_DESKTOP_FILE_DIR}"
readonly DESKTOP_FILE_NAME=cipd-chrome.desktop
readonly CIPD_CHROME_DESKTOP_FILE="${LOCAL_DESKTOP_FILE_DIR}/${DESKTOP_FILE_NAME}"
cat << EOF > "${CIPD_CHROME_DESKTOP_FILE}"
[Desktop Entry]
Version=1.0
Name=Google Chrome
GenericName=Web Browser
Comment=Access the Internet
Exec=${CHROME_EXECUTABLE} %U
StartupNotify=true
Terminal=false
Icon=google-chrome
Type=Application
Categories=Network;WebBrowser;
MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/file;
EOF
# Enable xdg-* commands to work correctly.
export DESKTOP_SESSION=gnome
# Set Chrome as the default handler for http, https, and file, for url_launcher
# tests that expect handlers for those schemes.
xdg-mime default "${DESKTOP_FILE_NAME}" inode/directory
xdg-settings set default-web-browser "${DESKTOP_FILE_NAME}"

View File

@ -0,0 +1,7 @@
#!/bin/bash
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -e
xvfb-run ./script/tool_runner.sh "$@"

View File

@ -0,0 +1,14 @@
tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
- name: set default apps
script: .ci/scripts/set_default_linux_apps.sh
- name: build examples
script: script/tool_runner.sh
args: ["build-examples", "--linux"]
- name: native test
script: .ci/scripts/xvfb_tool_runner.sh
args: ["native-test", "--linux"]
- name: drive examples
script: .ci/scripts/xvfb_tool_runner.sh
args: ["drive-examples", "--linux", "--exclude=script/configs/exclude_integration_linux.yaml"]