rename boot-tree to bootvine

This commit is contained in:
Willem Vanhulle committed 2026-10-11 15:54:28 +02:00
1 parent 101d7bae89
commit 2d586f57f7
21 files changed
+104 -104

No files matched your search

Generated
+1 -1
View File
@@ -143,7 +143,7 @@ dependencies = [
] ]
[[package]] [[package]]
name = "boot-tree" name = "bootvine"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"clap", "clap",
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
edition = "2024" edition = "2024"
name = "boot-tree" name = "bootvine"
version = "0.1.0" version = "0.1.0"
[lints.clippy] [lints.clippy]
+18 -18
View File
@@ -1,4 +1,4 @@
# boot-tree # bootvine
A live dependency tree of systemd jobs on the boot console, in the spirit of A live dependency tree of systemd jobs on the boot console, in the spirit of
nix-output-monitor. It replaces the scrolling kernel and systemd lines with a nix-output-monitor. It replaces the scrolling kernel and systemd lines with a
@@ -8,7 +8,7 @@ tree of pending units and a timeline bar per row.
- Linux with **systemd ≥ 246 as PID 1** (private socket `/run/systemd/private`, - Linux with **systemd ≥ 246 as PID 1** (private socket `/run/systemd/private`,
`Manager.SetShowStatus`). `Manager.SetShowStatus`).
- Runs as **root**, from the shipped `boot-tree.service`. - Runs as **root**, from the shipped `bootvine.service`.
- **libdbus-1** at runtime. - **libdbus-1** at runtime.
- A **virtual terminal** (`CONFIG_VT`); the unit draws on `/dev/tty12`. - A **virtual terminal** (`CONFIG_VT`); the unit draws on `/dev/tty12`.
- Optional: a **systemd-based initrd** (NixOS `boot.initrd.systemd`, dracut, or - Optional: a **systemd-based initrd** (NixOS `boot.initrd.systemd`, dracut, or
@@ -17,7 +17,7 @@ tree of pending units and a timeline bar per row.
- Optional: a large console font on HiDPI screens, e.g. Terminus `ter-v32n` - Optional: a large console font on HiDPI screens, e.g. Terminus `ter-v32n`
through the distro's console font setting. through the distro's console font setting.
No kernel parameters are needed: while it runs, boot-tree lowers the kernel No kernel parameters are needed: while it runs, bootvine lowers the kernel
console log level and turns systemd's status output off, and restores both when console log level and turns systemd's status output off, and restores both when
it hands the console over. it hands the console over.
@@ -41,37 +41,37 @@ The package ships everything a system needs under `lib/`:
| File | Purpose | | File | Purpose |
| --- | --- | | --- | --- |
| `lib/systemd/system/boot-tree.service` | the unit, used in both the initrd and stage 2 | | `lib/systemd/system/bootvine.service` | the unit, used in both the initrd and stage 2 |
| `lib/dracut/modules.d/90boot-tree/` | dracut module | | `lib/dracut/modules.d/90bootvine/` | dracut module |
| `lib/initcpio/install/sd-boot-tree` | mkinitcpio hook | | `lib/initcpio/install/sd-bootvine` | mkinitcpio hook |
### NixOS ### NixOS
```nix ```nix
inputs.boot-tree.url = "git+file:/home/wvhulle/Code/boot-tree?ref=refs/heads/main"; inputs.bootvine.url = "git+https://codeberg.org/wvhulle/bootvine";
# in the host's modules: # in the host's modules:
boot-tree.nixosModules.default bootvine.nixosModules.default
{ services.boot-tree.enable = true; } { services.bootvine.enable = true; }
``` ```
With `boot.initrd.systemd.enable` the unit is added to the initrd as well. With `boot.initrd.systemd.enable` the unit is added to the initrd as well.
### Other distributions ### Other distributions
1. Install `boot-tree` to `/usr/bin` and the files above under `/usr/lib`. 1. Install `bootvine` to `/usr/bin` and the files above under `/usr/lib`.
2. `systemctl enable boot-tree.service`. 2. `systemctl enable bootvine.service`.
3. To start it in the initrd: 3. To start it in the initrd:
- dracut: `add_dracutmodules+=" boot-tree "` in `/etc/dracut.conf.d/boot-tree.conf`, - dracut: `add_dracutmodules+=" bootvine "` in `/etc/dracut.conf.d/bootvine.conf`,
then `dracut --force`; then `dracut --force`;
- mkinitcpio: add `sd-boot-tree` after `systemd` in `HOOKS`, then - mkinitcpio: add `sd-bootvine` after `systemd` in `HOOKS`, then
`mkinitcpio -P`. `mkinitcpio -P`.
To draw on another terminal, override `TTYPath=` with To draw on another terminal, override `TTYPath=` with
`systemctl edit boot-tree.service`. `systemctl edit bootvine.service`.
## Configuration ## Configuration
Colours come from `/etc/boot-tree.toml` (another path with `--config`). Every Colours come from `/etc/bootvine.toml` (another path with `--config`). Every
key is optional; these are the defaults: key is optional; these are the defaults:
```toml ```toml
@@ -97,13 +97,13 @@ the start of boot:
On NixOS set the roles as options; unset ones keep their defaults: On NixOS set the roles as options; unset ones keep their defaults:
```nix ```nix
services.boot-tree.palette = { services.bootvine.palette = {
running = "light-yellow"; running = "light-yellow";
done = "light-green"; done = "light-green";
}; };
``` ```
On dracut and mkinitcpio systems the hooks copy `/etc/boot-tree.toml` into the On dracut and mkinitcpio systems the hooks copy `/etc/bootvine.toml` into the
initramfs, so rebuild it after editing. initramfs, so rebuild it after editing.
## Testing ## Testing
@@ -115,7 +115,7 @@ Commands assume the dev shell is active (`direnv allow` once; `.envrc` runs
| --- | --- | | --- | --- |
| Unit and render snapshot tests | `cargo test` | | Unit and render snapshot tests | `cargo test` |
| Scripted boot animation, no systemd needed | `cargo run --example demo` (`q` quits) | | Scripted boot animation, no systemd needed | `cargo run --example demo` (`q` quits) |
| Live against your user manager | `nix run .#demo-units -- start`, then `nix run . -- --user --target boot-tree-demo.target --hold 3s` | | Live against your user manager | `nix run .#demo-units -- start`, then `nix run . -- --user --target bootvine-demo.target --hold 3s` |
| Boot a demo VM in a window | `env -u LD_LIBRARY_PATH nix run .#vm` | | Boot a demo VM in a window | `env -u LD_LIBRARY_PATH nix run .#vm` |
| Automated boot test with OCR | `nix build .#checks.x86_64-linux.boot` (screenshots in `result/`) | | Automated boot test with OCR | `nix build .#checks.x86_64-linux.boot` (screenshots in `result/`) |
| Same test, interactively | `nix run .#checks.x86_64-linux.boot.driverInteractive`, then `test_script()` | | Same test, interactively | `nix run .#checks.x86_64-linux.boot.driverInteractive`, then `test_script()` |
+2 -2
View File
@@ -19,7 +19,7 @@ def "main start" [--units: path, --target: string] {
install-units $units install-units $units
^systemctl --user stop ...(unit-names $units) ^systemctl --user stop ...(unit-names $units)
^systemctl --user start --no-block $target ^systemctl --user start --no-block $target
print $"started ($target); watch it with: boot-tree --user --target ($target) --hold 3s" print $"started ($target); watch it with: bootvine --user --target ($target) --hold 3s"
} }
def "main remove" [--units: path, --target: string] { def "main remove" [--units: path, --target: string] {
@@ -29,5 +29,5 @@ def "main remove" [--units: path, --target: string] {
} }
def main [--units: path, --target: string] { def main [--units: path, --target: string] {
print "usage: boot-tree-demo-units (start | remove)" print "usage: bootvine-demo-units (start | remove)"
} }
+3 -3
View File
@@ -18,13 +18,13 @@ let
}; };
in in
{ {
networking.hostName = "boot-tree-demo"; networking.hostName = "bootvine-demo";
system.stateVersion = "26.05"; system.stateVersion = "26.05";
boot.initrd.systemd = { boot.initrd.systemd = {
enable = true; enable = true;
services.demo-initrd-probe = { services.demo-initrd-probe = {
description = "boot-tree demo: slow initrd step"; description = "bootvine demo: slow initrd step";
wantedBy = [ "initrd.target" ]; wantedBy = [ "initrd.target" ];
before = [ "initrd.target" ]; before = [ "initrd.target" ];
unitConfig.DefaultDependencies = false; unitConfig.DefaultDependencies = false;
@@ -35,7 +35,7 @@ in
}; };
}; };
services.boot-tree = { services.bootvine = {
enable = true; enable = true;
palette.running = "light-yellow"; palette.running = "light-yellow";
}; };
+5 -5
View File
@@ -1,6 +1,6 @@
{ demoHost }: { demoHost }:
{ {
name = "boot-tree"; name = "bootvine";
enableOCR = true; enableOCR = true;
nodes.machine = nodes.machine =
@@ -27,18 +27,18 @@
machine.screenshot("stage-2") machine.screenshot("stage-2")
machine.wait_for_unit("greetd.service") machine.wait_for_unit("greetd.service")
machine.wait_until_succeeds("systemctl show -p ActiveState --value boot-tree | grep -qx inactive") machine.wait_until_succeeds("systemctl show -p ActiveState --value bootvine | grep -qx inactive")
journal = machine.succeed("journalctl -b -u boot-tree -o cat") journal = machine.succeed("journalctl -b -u bootvine -o cat")
print(journal) print(journal)
watched = [line for line in journal.splitlines() if line.startswith("boot-tree: watching")] watched = [line for line in journal.splitlines() if line.startswith("bootvine: watching")]
assert any(" in initrd " in line for line in watched), "never ran in the initrd" assert any(" in initrd " in line for line in watched), "never ran in the initrd"
assert any(" in stage 2 " in line for line in watched), "never reconnected after the root switch" assert any(" in stage 2 " in line for line in watched), "never reconnected after the root switch"
pids = {line.split(" as pid ")[1].split()[0] for line in watched} pids = {line.split(" as pid ")[1].split()[0] for line in watched}
assert len(pids) == 1, f"the initrd process did not survive the root switch: {pids}" assert len(pids) == 1, f"the initrd process did not survive the root switch: {pids}"
assert "handing the console over" in journal, "never handed the console over" assert "handing the console over" in journal, "never handed the console over"
machine.succeed("test \"$(systemctl show -p Result --value boot-tree)\" = success") machine.succeed("test \"$(systemctl show -p Result --value bootvine)\" = success")
console_level = machine.succeed("cut -f1 /proc/sys/kernel/printk").strip() console_level = machine.succeed("cut -f1 /proc/sys/kernel/printk").strip()
assert console_level != "1", f"kernel console level was not restored: {console_level}" assert console_level != "1", f"kernel console level was not restored: {console_level}"
show_status = machine.succeed("systemctl show -p ShowStatus --value").strip() show_status = machine.succeed("systemctl show -p ShowStatus --value").strip()
+1 -1
View File
@@ -1,5 +1,5 @@
{ {
target = "boot-tree-demo"; target = "bootvine-demo";
initrdProbeSeconds = "6"; initrdProbeSeconds = "6";
services = { services = {
demo-disk.seconds = "2"; demo-disk.seconds = "2";
+4 -4
View File
@@ -14,7 +14,7 @@ let
name: spec: name: spec:
writeText "${name}.service" (toUnitFile { writeText "${name}.service" (toUnitFile {
Unit = { Unit = {
Description = "boot-tree demo: ${name}"; Description = "bootvine demo: ${name}";
After = map (dependency: "${dependency}.service") (spec.after or [ ]); After = map (dependency: "${dependency}.service") (spec.after or [ ]);
}; };
Service = { Service = {
@@ -30,13 +30,13 @@ let
targetFile = writeText "${demoUnits.target}.target" (toUnitFile { targetFile = writeText "${demoUnits.target}.target" (toUnitFile {
Unit = { Unit = {
Description = "boot-tree demo target"; Description = "bootvine demo target";
Wants = serviceNames; Wants = serviceNames;
After = serviceNames; After = serviceNames;
}; };
}); });
units = linkFarm "boot-tree-demo-units" ( units = linkFarm "bootvine-demo-units" (
lib.mapAttrsToList (name: spec: { lib.mapAttrsToList (name: spec: {
name = "${name}.service"; name = "${name}.service";
path = serviceFile name spec; path = serviceFile name spec;
@@ -50,6 +50,6 @@ let
); );
in in
writeShellApplication { writeShellApplication {
name = "boot-tree-demo-units"; name = "bootvine-demo-units";
text = ''exec ${lib.getExe nushell} ${./demo-units.nu} "$@" --units ${units} --target ${demoUnits.target}.target''; text = ''exec ${lib.getExe nushell} ${./demo-units.nu} "$@" --units ${units} --target ${demoUnits.target}.target'';
} }
+1 -1
View File
@@ -4,7 +4,7 @@ use std::{
time::{Duration, Instant}, time::{Duration, Instant},
}; };
use boot_tree::{ use bootvine::{
model::{ActiveState, Activity, BootState, JobResult, Phase, UnitFacts}, model::{ActiveState, Activity, BootState, JobResult, Phase, UnitFacts},
palette::Palette, palette::Palette,
view::BootView, view::BootView,
+9 -9
View File
@@ -1,5 +1,5 @@
{ {
description = "boot-tree — live dependency tree of systemd jobs on the boot console"; description = "bootvine — live dependency tree of systemd jobs on the boot console";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
@@ -76,15 +76,15 @@
}; };
strictDeps = true; strictDeps = true;
postInstall = '' postInstall = ''
install -Dm644 packaging/systemd/boot-tree.service $out/lib/systemd/system/boot-tree.service install -Dm644 packaging/systemd/bootvine.service $out/lib/systemd/system/bootvine.service
substituteInPlace $out/lib/systemd/system/boot-tree.service \ substituteInPlace $out/lib/systemd/system/bootvine.service \
--replace-fail /usr/bin/boot-tree $out/bin/boot-tree --replace-fail /usr/bin/bootvine $out/bin/bootvine
install -Dm755 packaging/dracut/90boot-tree/module-setup.sh \ install -Dm755 packaging/dracut/90bootvine/module-setup.sh \
$out/lib/dracut/modules.d/90boot-tree/module-setup.sh $out/lib/dracut/modules.d/90bootvine/module-setup.sh
install -Dm644 packaging/mkinitcpio/install/sd-boot-tree \ install -Dm644 packaging/mkinitcpio/install/sd-bootvine \
$out/lib/initcpio/install/sd-boot-tree $out/lib/initcpio/install/sd-bootvine
''; '';
meta.mainProgram = "boot-tree"; meta.mainProgram = "bootvine";
meta.platforms = lib.platforms.linux; meta.platforms = lib.platforms.linux;
}; };
demo-units = pkgs.callPackage ./demo/user-units.nix { inherit demoUnits; }; demo-units = pkgs.callPackage ./demo/user-units.nix { inherit demoUnits; };
+9 -9
View File
@@ -6,9 +6,9 @@
... ...
}: }:
let let
cfg = config.services.boot-tree; cfg = config.services.bootvine;
chosenColors = lib.filterAttrs (_: color: color != null) cfg.palette; chosenColors = lib.filterAttrs (_: color: color != null) cfg.palette;
configFile = (pkgs.formats.toml { }).generate "boot-tree.toml" { palette = chosenColors; }; configFile = (pkgs.formats.toml { }).generate "bootvine.toml" { palette = chosenColors; };
colorOption = colorOption =
role: default: role: default:
lib.mkOption { lib.mkOption {
@@ -23,7 +23,7 @@ let
}; };
in in
{ {
options.services.boot-tree = { options.services.bootvine = {
enable = lib.mkEnableOption '' enable = lib.mkEnableOption ''
a live dependency tree of systemd jobs on the boot console. With a a live dependency tree of systemd jobs on the boot console. With a
systemd initrd it starts there and survives the switch to the real root; systemd initrd it starts there and survives the switch to the real root;
@@ -34,8 +34,8 @@ in
package = lib.mkOption { package = lib.mkOption {
type = lib.types.package; type = lib.types.package;
default = self.packages.${pkgs.stdenv.hostPlatform.system}.default; default = self.packages.${pkgs.stdenv.hostPlatform.system}.default;
defaultText = lib.literalExpression "boot-tree.packages.\${system}.default"; defaultText = lib.literalExpression "bootvine.packages.\${system}.default";
description = "The boot-tree package, which ships the systemd unit."; description = "The bootvine package, which ships the systemd unit.";
}; };
palette = { palette = {
@@ -52,19 +52,19 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
environment = { environment = {
systemPackages = [ cfg.package ]; systemPackages = [ cfg.package ];
etc."boot-tree.toml" = lib.mkIf (chosenColors != { }) { source = configFile; }; etc."bootvine.toml" = lib.mkIf (chosenColors != { }) { source = configFile; };
}; };
systemd = { systemd = {
packages = [ cfg.package ]; packages = [ cfg.package ];
services.boot-tree.wantedBy = [ "sysinit.target" ]; services.bootvine.wantedBy = [ "sysinit.target" ];
}; };
boot.initrd.systemd = lib.mkIf config.boot.initrd.systemd.enable { boot.initrd.systemd = lib.mkIf config.boot.initrd.systemd.enable {
packages = [ cfg.package ]; packages = [ cfg.package ];
storePaths = [ (lib.getExe cfg.package) ]; storePaths = [ (lib.getExe cfg.package) ];
services.boot-tree.wantedBy = [ "sysinit.target" ]; services.bootvine.wantedBy = [ "sysinit.target" ];
contents."/etc/boot-tree.toml" = lib.mkIf (chosenColors != { }) { source = configFile; }; contents."/etc/bootvine.toml" = lib.mkIf (chosenColors != { }) { source = configFile; };
}; };
}; };
} }
@@ -1,19 +0,0 @@
#!/usr/bin/bash
check() {
require_binaries boot-tree || return 1
return 255
}
depends() {
echo systemd
}
install() {
inst_binary boot-tree
inst_simple "$systemdsystemunitdir/boot-tree.service"
if [[ -f /etc/boot-tree.toml ]]; then
inst_simple /etc/boot-tree.toml
fi
$SYSTEMCTL -q --root "$initdir" enable boot-tree.service
}
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/bash
check() {
require_binaries bootvine || return 1
return 255
}
depends() {
echo systemd
}
install() {
inst_binary bootvine
inst_simple "$systemdsystemunitdir/bootvine.service"
if [[ -f /etc/bootvine.toml ]]; then
inst_simple /etc/bootvine.toml
fi
$SYSTEMCTL -q --root "$initdir" enable bootvine.service
}
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/bash
build() {
add_binary boot-tree
add_systemd_unit boot-tree.service
if [[ -f /etc/boot-tree.toml ]]; then
add_file /etc/boot-tree.toml
fi
add_symlink /usr/lib/systemd/system/sysinit.target.wants/boot-tree.service \
/usr/lib/systemd/system/boot-tree.service
}
help() {
cat <<HELP
Shows a live dependency tree of systemd jobs while the initramfs boots.
Requires the systemd hook; add sd-boot-tree after it in HOOKS.
HELP
}
+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/bash
build() {
add_binary bootvine
add_systemd_unit bootvine.service
if [[ -f /etc/bootvine.toml ]]; then
add_file /etc/bootvine.toml
fi
add_symlink /usr/lib/systemd/system/sysinit.target.wants/bootvine.service \
/usr/lib/systemd/system/bootvine.service
}
help() {
cat <<HELP
Shows a live dependency tree of systemd jobs while the initramfs boots.
Requires the systemd hook; add sd-bootvine after it in HOOKS.
HELP
}
@@ -8,7 +8,7 @@ Conflicts=shutdown.target
[Service] [Service]
Type=simple Type=simple
ExecStart=@/usr/bin/boot-tree @boot-tree ExecStart=@/usr/bin/bootvine @bootvine
StandardInput=tty StandardInput=tty
StandardOutput=tty StandardOutput=tty
StandardError=journal StandardError=journal
+2 -2
View File
@@ -6,7 +6,7 @@ use std::{
time::{Duration, Instant}, time::{Duration, Instant},
}; };
use boot_tree::model::{BootState, HANDOFF_UNIT, HOST_MILESTONES}; use bootvine::model::{BootState, HANDOFF_UNIT, HOST_MILESTONES};
use dbus::Path; use dbus::Path;
use crate::{ use crate::{
@@ -133,7 +133,7 @@ impl Feed {
jobs.iter() jobs.iter()
.for_each(|job| state.queue_job(job.id, &job.unit, now)); .for_each(|job| state.queue_job(job.id, &job.unit, now));
eprintln!( eprintln!(
"boot-tree: watching {root} in {} as pid {} over {}", "bootvine: watching {root} in {} as pid {} over {}",
if self.in_initrd { "initrd" } else { "stage 2" }, if self.in_initrd { "initrd" } else { "stage 2" },
process::id(), process::id(),
if session.peer_to_peer { if session.peer_to_peer {
+5 -5
View File
@@ -8,7 +8,7 @@ mod systemd;
use std::{fs, io::ErrorKind, path::PathBuf, process::ExitCode, time::Duration}; use std::{fs, io::ErrorKind, path::PathBuf, process::ExitCode, time::Duration};
use boot_tree::palette::Config; use bootvine::palette::Config;
use clap::Parser; use clap::Parser;
use jiff::SignedDuration; use jiff::SignedDuration;
@@ -36,7 +36,7 @@ struct Cli {
hold: Duration, hold: Duration,
#[arg( #[arg(
long, long,
default_value = "/etc/boot-tree.toml", default_value = "/etc/bootvine.toml",
help = "TOML file with a [palette] table" help = "TOML file with a [palette] table"
)] )]
config: PathBuf, config: PathBuf,
@@ -51,12 +51,12 @@ fn main() -> ExitCode {
let cli = Cli::parse(); let cli = Cli::parse();
let config = match fs::read_to_string(&cli.config) { let config = match fs::read_to_string(&cli.config) {
Ok(text) => toml::from_str(&text).unwrap_or_else(|error| { Ok(text) => toml::from_str(&text).unwrap_or_else(|error| {
eprintln!("boot-tree: ignoring {}: {error}", cli.config.display()); eprintln!("bootvine: ignoring {}: {error}", cli.config.display());
Config::default() Config::default()
}), }),
Err(error) if error.kind() == ErrorKind::NotFound => Config::default(), Err(error) if error.kind() == ErrorKind::NotFound => Config::default(),
Err(error) => { Err(error) => {
eprintln!("boot-tree: cannot read {}: {error}", cli.config.display()); eprintln!("bootvine: cannot read {}: {error}", cli.config.display());
Config::default() Config::default()
} }
}; };
@@ -69,7 +69,7 @@ fn main() -> ExitCode {
match run(&options) { match run(&options) {
Ok(()) => ExitCode::SUCCESS, Ok(()) => ExitCode::SUCCESS,
Err(error) => { Err(error) => {
eprintln!("boot-tree: {error}"); eprintln!("bootvine: {error}");
ExitCode::FAILURE ExitCode::FAILURE
} }
} }
+2 -2
View File
@@ -8,7 +8,7 @@ use std::{
time::{Duration, Instant}, time::{Duration, Instant},
}; };
use boot_tree::{ use bootvine::{
model::{BootState, Phase}, model::{BootState, Phase},
palette::Palette, palette::Palette,
view::BootView, view::BootView,
@@ -115,7 +115,7 @@ fn watch(
})?; })?;
if state.is_complete() { if state.is_complete() {
eprintln!( eprintln!(
"boot-tree: {} reached, handing the console over", "bootvine: {} reached, handing the console over",
state.root.as_deref().unwrap_or("boot") state.root.as_deref().unwrap_or("boot")
); );
sleep(hold); sleep(hold);
+1 -1
View File
@@ -1,6 +1,6 @@
use std::{iter, time::Duration}; use std::{iter, time::Duration};
use boot_tree::model::{ActiveState, Activity, JobResult, UnitFacts}; use bootvine::model::{ActiveState, Activity, JobResult, UnitFacts};
use dbus::{ use dbus::{
Message, MessageType, Path, Message, MessageType, Path,
arg::{AppendAll, PropMap, RefArg, Variant}, arg::{AppendAll, PropMap, RefArg, Variant},
+2 -2
View File
@@ -196,7 +196,7 @@ impl BootView<'_> {
}); });
Table::new( Table::new(
[Row::new([ [Row::new([
Line::from(format!("boot-tree {}", self.host)), Line::from(format!("bootvine {}", self.host)),
Line::from(total.unwrap_or_default()).right_aligned(), Line::from(total.unwrap_or_default()).right_aligned(),
])], ])],
[Constraint::Fill(1), Constraint::Length(DURATION_WIDTH)], [Constraint::Fill(1), Constraint::Length(DURATION_WIDTH)],
@@ -804,7 +804,7 @@ mod tests {
fn tree_on_top_timeline_below() { fn tree_on_top_timeline_below() {
let lines = render(&boot_in_progress(), 12_400 * MS, 110, 24); let lines = render(&boot_in_progress(), 12_400 * MS, 110, 24);
let screen = lines.join("\n"); let screen = lines.join("\n");
assert_eq!(lines[0], "boot-tree ryzen", "{screen}"); assert_eq!(lines[0], "bootvine ryzen", "{screen}");
assert!(lines[2].starts_with("── stage 2 ──"), "{screen}"); assert!(lines[2].starts_with("── stage 2 ──"), "{screen}");
assert!(lines[2].ends_with("12.4s ──"), "{screen}"); assert!(lines[2].ends_with("12.4s ──"), "{screen}");
assert!(lines[3].starts_with("graphical.target"), "{screen}"); assert!(lines[3].starts_with("graphical.target"), "{screen}");