diff --git a/etc/ci/macos_package_smoketest.sh b/etc/ci/macos_package_smoketest.sh new file mode 100755 index 00000000000..3a7965894f3 --- /dev/null +++ b/etc/ci/macos_package_smoketest.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + +set -o errexit +set -o nounset +set -o pipefail + +# If we somehow ended up in an unclean state previously, attempt +# to set up a clean environment for testing. +hdiutil detach /Volumes/Servo >/dev/null 2>&1 || true; + +# Mount the package that will be tested. +hdiutil attach ${1} +pushd /Volumes/Servo/Servo.app/Contents/MacOS +ls -l + +# Load a page that closes immediately after loading. +c='data:text/html,' +./servo --headless ${c} | tee /tmp/out +grep 'success' /tmp/out + +# Clean up. +popd +hdiutil detach /Volumes/Servo diff --git a/etc/taskcluster/decision_task.py b/etc/taskcluster/decision_task.py index 3364aa0820d..dad6b18b2bc 100644 --- a/etc/taskcluster/decision_task.py +++ b/etc/taskcluster/decision_task.py @@ -277,6 +277,7 @@ def macos_unit(): ./mach build --dev --verbose ./mach test-unit ./mach package --dev + ./etc/ci/macos_package_smoketest.sh target/debug/servo-tech-demo.dmg ./etc/ci/lockfile_changed.sh """) .find_or_create("macos_unit." + CONFIG.tree_hash()) @@ -451,6 +452,7 @@ def macos_nightly(): .with_script( "./mach build --release", "./mach package --release", + "./etc/ci/macos_package_smoketest.sh target/release/servo-tech-demo.dmg" "./mach upload-nightly mac --secret-from-taskcluster", ) .with_artifacts("repo/target/release/servo-tech-demo.dmg") diff --git a/python/servo/package_commands.py b/python/servo/package_commands.py index 3bd6d856254..6ffb0eea53a 100644 --- a/python/servo/package_commands.py +++ b/python/servo/package_commands.py @@ -39,7 +39,7 @@ from servo.command_base import ( is_macosx, is_windows, ) -from servo.gstreamer import macos_dylibs +from servo.gstreamer import macos_dylibs, macos_plugins from servo.util import delete # Note: mako cannot be imported at the top level because it breaks mach bootstrap @@ -141,6 +141,7 @@ def copy_dependencies(binary_path, lib_path): # Update binary libraries binary_dependencies = set(otool(binary_path)) binary_dependencies = binary_dependencies.union(macos_dylibs()) + binary_dependencies = binary_dependencies.union(macos_plugins()) change_non_system_libraries_path(binary_dependencies, relative_path, binary_path) # Update dependencies libraries