The tagged ISO workflow fetched bos-settings/src/Cargo.toml from the dev branch (404 after the Tauri split) and cargo-built bread-theme. bread-theme 0.7.1 is already on the stable index. Stage required bins, units, breadhelp content, and desktop/license files from the minisign-verified index instead; optional bread-emit/module-host skip until bread publishes them. Fail the bake if a required bin is missing.
86 lines
3.5 KiB
Bash
Executable file
86 lines
3.5 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# BOS post-install smoke test.
|
|
#
|
|
# Run this INSIDE a freshly installed BOS (as the main user) to assert the
|
|
# install's core invariants. It is read-only and safe to run any time.
|
|
#
|
|
# ./smoke-test.sh
|
|
#
|
|
# Exit status is non-zero if any check fails, so it can gate CI / manual QA.
|
|
set -uo pipefail
|
|
|
|
pass=0 fail=0
|
|
ok() { printf ' \033[32mPASS\033[0m %s\n' "$1"; pass=$((pass+1)); }
|
|
bad() { printf ' \033[31mFAIL\033[0m %s\n' "$1"; fail=$((fail+1)); }
|
|
note() { printf ' \033[33m----\033[0m %s\n' "$1"; }
|
|
|
|
check() { if eval "$2" >/dev/null 2>&1; then ok "$1"; else bad "$1"; fi; }
|
|
|
|
echo "== btrfs subvolume layout =="
|
|
if command -v btrfs >/dev/null; then
|
|
# `btrfs subvolume list` needs root; try unprivileged, fall back to non-
|
|
# interactive sudo (no hang if creds aren't cached).
|
|
paths="$(btrfs subvolume list / 2>/dev/null || sudo -n btrfs subvolume list / 2>/dev/null)"
|
|
paths="$(awk '{print $NF}' <<<"$paths")"
|
|
if [ -z "$paths" ]; then
|
|
note "couldn't list subvolumes (need root) — skipping"
|
|
else
|
|
for sv in @ @home @snapshots @log @cache; do
|
|
if grep -qx "$sv" <<<"$paths"; then ok "subvolume $sv present"; else bad "subvolume $sv missing"; fi
|
|
done
|
|
fi
|
|
else
|
|
note "btrfs not installed (not a btrfs root?) — skipping subvolume checks"
|
|
fi
|
|
|
|
echo "== snapshot tooling =="
|
|
check "snapper root config exists" "[ -f /etc/snapper/configs/root ]"
|
|
check "snap-pac hook present" "pacman -Qq snap-pac"
|
|
check "grub-btrfs present" "pacman -Qq grub-btrfs"
|
|
|
|
echo "== enabled system services =="
|
|
for unit in NetworkManager.service greetd.service bluetooth.service tlp.service \
|
|
cups.socket avahi-daemon.service ufw.service systemd-timesyncd.service; do
|
|
check "$unit enabled" "systemctl is-enabled $unit"
|
|
done
|
|
check "graphical.target is default" "[ \"\$(systemctl get-default)\" = graphical.target ]"
|
|
|
|
echo "== bread ecosystem on PATH =="
|
|
for bin in bakery bread breadd breadbar breadbox breadbox-sync breadcrumbs breadpad breadman; do
|
|
check "$bin found" "command -v $bin"
|
|
done
|
|
for bin in bread-emit bread-module-host; do
|
|
if command -v "$bin" >/dev/null 2>&1; then
|
|
ok "$bin found"
|
|
else
|
|
note "$bin not on PATH (optional until stable bread ships it)"
|
|
fi
|
|
done
|
|
|
|
echo "== bos-settings =="
|
|
check "bos-settings installed" "command -v bos-settings"
|
|
|
|
echo "== breadhelp =="
|
|
check "breadhelp installed" "command -v breadhelp"
|
|
check "breadhelp content installed" \
|
|
"[ -d \"\$HOME/.local/share/breadhelp/content\" ] || [ -d /etc/skel/.local/share/breadhelp/content ]"
|
|
check "bos-netcheck present" "command -v bos-netcheck"
|
|
|
|
echo "== default dotfiles =="
|
|
check "hyprland.lua present" "[ -f \"\$HOME/.config/hypr/hyprland.lua\" ]"
|
|
check "binds.json present" "[ -f \"\$HOME/.config/hypr/binds.json\" ]"
|
|
check "monitors.json present" "[ -f \"\$HOME/.config/hypr/monitors.json\" ]"
|
|
check "settings.json present" "[ -f \"\$HOME/.config/hypr/settings.json\" ]"
|
|
check "autostart.json present" "[ -f \"\$HOME/.config/hypr/autostart.json\" ]"
|
|
check "hypr scripts/lib present" "[ -f \"\$HOME/.config/hypr/scripts/lib/json.lua\" ]"
|
|
check "mimeapps.list present" "[ -f \"\$HOME/.config/mimeapps.list\" ]"
|
|
check "kitty config present" "[ -f \"\$HOME/.config/kitty/kitty.conf\" ]"
|
|
|
|
echo "== bootloader (EFI) =="
|
|
check "GRUB EFI binary present" \
|
|
"[ -f /boot/efi/EFI/BOS/grubx64.efi ] || [ -f /boot/efi/EFI/BOOT/BOOTX64.EFI ]"
|
|
check "grub.cfg present" "[ -f /boot/grub/grub.cfg ]"
|
|
|
|
echo
|
|
printf 'Result: \033[32m%d passed\033[0m, \033[31m%d failed\033[0m\n' "$pass" "$fail"
|
|
[ "$fail" -eq 0 ]
|