Skip to content
Snippets Groups Projects
Commit 969e31dd authored by Zygmunt Krynicki's avatar Zygmunt Krynicki
Browse files

spread.yaml: log messages when preparing and restoring


This makes is much easier to read log files and see what was going on
with relation to the running system and the test stack alike.

Signed-off-by: default avatarZygmunt Krynicki <zygmunt.krynicki@huawei.com>
parent 97e880fe
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,8 @@ environment:
TEST_RAUC_FAKE_SYSTEM_DIR: /var/tmp/rauc-fake-system
prepare: |
echo "Commencing $SPREAD_PROJECT prepare" | systemd-cat -p info -t spread
# Install build dependencies if missing.
test -n "$(command -v go)" && test -f /usr/include/z.mk && test -f /lib/systemd/system/rauc.service && test -n "$(command -v mksquashfs)" && test -n "$(command -v jq)" && test -n "$(command -v mandb)" && test -n "$(command -v strace)" || (
apt-get update && apt-get install -y golang-go zmk rauc-service squashfs-tools jq man-db strace
......@@ -68,16 +70,26 @@ prepare: |
"$SPREAD_PATH"/tests/lib/rauc.sh prepare
echo "Finished $SPREAD_PROJECT prepare" | systemd-cat -p info -t spread
prepare-each: |
echo "Commencing $SPREAD_PROJECT prepare-each" | systemd-cat -p info -t spread
"$SPREAD_PATH"/tests/lib/rauc.sh prepare-each
echo "Finished $SPREAD_PROJECT prepare-each" | systemd-cat -p info -t spread
restore: |
echo "Commencing $SPREAD_PROJECT restore" | systemd-cat -p info -t spread
systemctl disable --now sysotad.service
make uninstall
systemctl daemon-reload
"$SPREAD_PATH"/tests/lib/rauc.sh restore
echo "Finished $SPREAD_SUITE restore" | systemd-cat -p info -t spread
debug: |
systemctl status sysotad.service
"$SPREAD_PATH"/tests/lib/rauc.sh debug
......@@ -86,8 +98,14 @@ suites:
cmd/sysotad/spread.suite/:
summary: integration tests for sysotad (service)
prepare-each: |
echo "Commencing $SPREAD_SUITE prepare-each" | systemd-cat -p info -t spread
mkdir -p /etc/sysota
echo "Finished $SPREAD_SUITE prepare-each" | systemd-cat -p info -t spread
restore-each: |
echo "Commencing $SPREAD_SUITE restore-each" | systemd-cat -p info -t spread
# Remove any configuration changes.
rm -f /etc/sysota/sysotad.conf
rmdir /etc/sysota
......@@ -102,6 +120,8 @@ suites:
# making sure to reset the restart counter incremented by each test.
systemctl reset-failed sysotad.service
systemctl restart sysotad.service
echo "Finished $SPREAD_SUITE restore-each" | systemd-cat -p info -t spread
boot/piboot/spread.suite/:
summary: integration tests for the piboot package
environment:
......@@ -110,6 +130,8 @@ suites:
MOCK_REBOOT_LOG: /var/tmp/reboot.log
PATH: $PATH:$SPREAD_PATH/tests/bin:$SPREAD_PATH/boot/piboot/spread.suite/bin
prepare: |
echo "Commencing $SPREAD_SUITE prepare" | systemd-cat -p info -t spread
# Prepare sysotad.conf file that forces the use of pi-boot and sets
# the location of the boot directory to SYSOTA_BOOT_DIR.
mkdir -p /etc/sysota
......@@ -213,7 +235,11 @@ suites:
chmod +x /var/tmp/systemctl.fake
mount --bind /var/tmp/systemctl.fake "$(command -v systemctl)"
echo "Finished $SPREAD_SUITE prepare" | systemd-cat -p info -t spread
debug-each: |
echo "Commencing $SPREAD_SUITE debug-each" | systemd-cat -p info -t spread
systemctl status sysotad.service
ls -l "$SYSOTA_BOOT_DIR"
ls -l /etc/sysota
......@@ -221,7 +247,11 @@ suites:
test -e "$SYSOTA_BOOT_DIR"/tryboot.txt && cat "$SYSOTA_BOOT_DIR"/tryboot.txt
test -e /etc/sysota/sysotad.conf && cat /etc/sysota/sysotad.conf
echo "Finished $SPREAD_SUITE debug-each" | systemd-cat -p info -t spread
restore-each: |
echo "Commencing $SPREAD_SUITE restore-each" | systemd-cat -p info -t spread
rm -f "$MOCK_REBOOT_LOG"
# Restore bootloader configuration to vanilla state.
......@@ -234,13 +264,19 @@ suites:
systemctl reset-failed sysotad.service
systemctl restart sysotad.service
echo "Finished $SPREAD_SUITE restore-each" | systemd-cat -p info -t spread
restore: |
echo "Commencing $SPREAD_SUITE restore" | systemd-cat -p info -t spread
umount "$(command -v systemctl)"
umount /var/tmp/systemctl.real
rm -f /var/tmp/systemctl.fake
rm -f /var/tmp/systemctl.real
rm -rf "$SYSOTA_BOOT_DIR"
rm -rf /etc/sysota
echo "Finished $SPREAD_SUITE restore" | systemd-cat -p info -t spread
man/spread.suite/:
summary: tests for manual pages
rauc/spread.suite/:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment