Files
coredesktop/smoketest/scenarios/52-siblings.sh
T
david 5ed3df55e3
shellcheck / shellcheck (push) Failing after 14s
further checks
2026-11-04 10:05:50 -07:00

39 lines
1.1 KiB
Bash

#!/bin/bash
# shellcheck disable=SC2034
DESCRIPTION="update pulls a sibling project and runs its update.sh; a failing one is reported"
IMAGE=installed
TIER="pr"
SIB="$SMOKETEST_VM_DIR/smoketest-sibling"
scenario() {
assert_vm "make a sibling project" "set -e
git init -q $SIB
cd $SIB
echo 'touch ~/sibling-installed' > install.sh
echo 'echo v1 >> ~/sibling-updated' > update.sh
git add -A
git commit -qm v1"
run_in_vm sibling-add "\"\$HOME/.local/bin/sibling\" add $SIB"
assert_status 0
assert_vm "its install.sh ran" 'test -f ~/sibling-installed'
assert_vm "release v2" "set -e
cd $SIB
echo 'echo v2 >> ~/sibling-updated' > update.sh
git commit -qam v2"
cd_update
assert_status 0
assert_vm "v2's update.sh ran" 'tail -n 1 ~/sibling-updated | grep -qx v2'
assert_vm "release a v3 whose update.sh fails" "set -e
cd $SIB
echo 'exit 1' > update.sh
git commit -qam v3"
cd_update
assert_status 1
assert_output "smoketest-sibling's update.sh failed"
assert_output "Done, with errors in: 71-siblings.sh"
}