Skip to content
29 changes: 29 additions & 0 deletions .ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
33 changes: 33 additions & 0 deletions .ci/scripts/set_default_linux_apps.sh
Original file line number Diff line number Diff line change
@@ -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}"
7 changes: 7 additions & 0 deletions .ci/scripts/xvfb_tool_runner.sh
Original file line number Diff line number Diff line change
@@ -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 "$@"
14 changes: 14 additions & 0 deletions .ci/targets/linux_platform_tests.yaml
Original file line number Diff line number Diff line change
@@ -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"]