@@ -124,6 +124,8 @@ cd_install() {
|
||||
}
|
||||
|
||||
# cd_update [VAR=value...]: run update, with those variables set
|
||||
# Scenarios pass the variables, e.g. 44-low-disk.sh
|
||||
# shellcheck disable=SC2120
|
||||
cd_update() {
|
||||
local vars="" var
|
||||
for var in "$@"; do
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# shellcheck disable=SC2034
|
||||
DESCRIPTION="install.sh on a fresh Arch + GNOME machine; saves the reference fingerprint"
|
||||
IMAGE=base
|
||||
TIER=nightly
|
||||
TIER="nightly"
|
||||
|
||||
scenario() {
|
||||
cd_install
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# shellcheck disable=SC2034
|
||||
DESCRIPTION="refresh (re-running install.sh) on an installed machine changes nothing"
|
||||
IMAGE=installed
|
||||
TIER=pr
|
||||
TIER="pr"
|
||||
|
||||
scenario() {
|
||||
fingerprint "$SMOKETEST_RESULTS/before.fingerprint"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# shellcheck disable=SC2034
|
||||
DESCRIPTION="update with nothing new to do installs nothing and changes nothing"
|
||||
IMAGE=installed
|
||||
TIER=pr
|
||||
TIER="pr"
|
||||
|
||||
# smoketest_prepare has already updated the machine to the commit under test
|
||||
scenario() {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# shellcheck disable=SC2034
|
||||
DESCRIPTION="install an older commit, update to the commit under test: same machine as a fresh install"
|
||||
IMAGE=base
|
||||
TIER=nightly
|
||||
TIER="nightly"
|
||||
mapfile -t VARIANTS < <(sed 's/#.*//' "$(dirname "${BASH_SOURCE[0]}")/../baselines" | awk 'NF { print $1 }')
|
||||
|
||||
scenario() {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# shellcheck disable=SC2034
|
||||
DESCRIPTION="a release that changes update and adds a hook: the new update and hook run in the same update"
|
||||
IMAGE=installed
|
||||
TIER=pr
|
||||
TIER="pr"
|
||||
|
||||
scenario() {
|
||||
upstream_commit "Change update and add a hook" '
|
||||
@@ -14,6 +14,6 @@ scenario() {
|
||||
assert_status 0
|
||||
assert_output "smoketest: the new update ran"
|
||||
assert_vm "the new hook ran" 'test -f ~/smoketest-hook-ran'
|
||||
assert_vm "~/.local/bin/update is the new one" \
|
||||
assert_vm "the update in ~/.local/bin is the new one" \
|
||||
'cmp ~/.local/bin/update ~/.local/share/coredesktop/update'
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# shellcheck disable=SC2034
|
||||
DESCRIPTION="a release with a new migration: it runs once, and is recorded"
|
||||
IMAGE=installed
|
||||
TIER=pr
|
||||
TIER="pr"
|
||||
|
||||
scenario() {
|
||||
upstream_commit "Add a migration" '
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# shellcheck disable=SC2034
|
||||
DESCRIPTION="a failing migration stops later ones, fails the update, and runs again next time"
|
||||
IMAGE=installed
|
||||
TIER=pr
|
||||
TIER="pr"
|
||||
|
||||
scenario() {
|
||||
# The first fails while ~/smoketest-block exists; the second must wait for it
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# shellcheck disable=SC2034
|
||||
DESCRIPTION="a failing update hook fails the update but not the hooks after it"
|
||||
IMAGE=installed
|
||||
TIER=pr
|
||||
TIER="pr"
|
||||
|
||||
scenario() {
|
||||
upstream_commit "Add a failing hook" '
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# shellcheck disable=SC2034
|
||||
DESCRIPTION="update when CoreDesktop's repo can't be reached runs the hooks on disk and reports it"
|
||||
IMAGE=installed
|
||||
TIER=pr
|
||||
TIER="pr"
|
||||
|
||||
scenario() {
|
||||
assert_vm "take the upstream away" "sudo mv $UPSTREAM $UPSTREAM.away"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# shellcheck disable=SC2034
|
||||
DESCRIPTION="local edits to the checkout: kept if upstream doesn't touch the file, reported if it does"
|
||||
IMAGE=installed
|
||||
TIER=pr
|
||||
TIER="pr"
|
||||
|
||||
# Expanded in the VM, not here
|
||||
# shellcheck disable=SC2088
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# shellcheck disable=SC2034
|
||||
DESCRIPTION="update refuses to start with less than 10 GiB free, unless UPDATE_FORCE=1"
|
||||
IMAGE=installed
|
||||
TIER=pr
|
||||
TIER="pr"
|
||||
|
||||
scenario() {
|
||||
# Leave 5 GiB free on /
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# shellcheck disable=SC2034
|
||||
DESCRIPTION="a machine a month behind on a stale mirror: update picks fresh mirrors, upgrades the kernel, asks for a reboot"
|
||||
IMAGE=installed
|
||||
TIER=nightly
|
||||
TIER="nightly"
|
||||
|
||||
scenario() {
|
||||
local date kernel_before
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# shellcheck disable=SC2034
|
||||
DESCRIPTION="update doesn't reinstall a package or Flatpak listed in skip-packages"
|
||||
IMAGE=installed
|
||||
TIER=pr
|
||||
TIER="pr"
|
||||
|
||||
scenario() {
|
||||
assert_vm "remove Zoom and LibreOffice, and skip them" '
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# shellcheck disable=SC2034
|
||||
DESCRIPTION="update pulls a sibling project and runs its update.sh; a failing one is reported"
|
||||
IMAGE=installed
|
||||
TIER=pr
|
||||
TIER="pr"
|
||||
|
||||
SIB="$SMOKETEST_VM_DIR/smoketest-sibling"
|
||||
|
||||
|
||||
@@ -202,7 +202,9 @@ initramfs_build_failed() {
|
||||
# pacman downloads from the first mirror in this list (system/mirrors.sh keeps
|
||||
# it fresh). Overridable for the tests.
|
||||
MIRRORLIST="${MIRRORLIST:-/etc/pacman.d/mirrorlist}"
|
||||
# A mirror further behind Arch than this is stale; most sync every few hours
|
||||
# A mirror further behind Arch than this is stale; most sync every few hours.
|
||||
# Used by version and updates.d/10-pacman.sh.
|
||||
# shellcheck disable=SC2034
|
||||
MIRROR_STALE_HOURS=24
|
||||
|
||||
# The first mirror in MIRRORLIST, without its /$repo/os/$arch
|
||||
|
||||
Reference in New Issue
Block a user