rename boot-tree to bootvine
This commit is contained in:
1 parent
101d7bae89
commit
2d586f57f7
21 files changed
+104
-104
No files matched your search
Generated
+1
-1
@@ -143,7 +143,7 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "boot-tree"
|
||||
name = "bootvine"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
edition = "2024"
|
||||
name = "boot-tree"
|
||||
name = "bootvine"
|
||||
version = "0.1.0"
|
||||
|
||||
[lints.clippy]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# boot-tree
|
||||
# bootvine
|
||||
|
||||
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
|
||||
@@ -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`,
|
||||
`Manager.SetShowStatus`).
|
||||
- Runs as **root**, from the shipped `boot-tree.service`.
|
||||
- Runs as **root**, from the shipped `bootvine.service`.
|
||||
- **libdbus-1** at runtime.
|
||||
- A **virtual terminal** (`CONFIG_VT`); the unit draws on `/dev/tty12`.
|
||||
- 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`
|
||||
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
|
||||
it hands the console over.
|
||||
|
||||
@@ -41,37 +41,37 @@ The package ships everything a system needs under `lib/`:
|
||||
|
||||
| File | Purpose |
|
||||
| --- | --- |
|
||||
| `lib/systemd/system/boot-tree.service` | the unit, used in both the initrd and stage 2 |
|
||||
| `lib/dracut/modules.d/90boot-tree/` | dracut module |
|
||||
| `lib/initcpio/install/sd-boot-tree` | mkinitcpio hook |
|
||||
| `lib/systemd/system/bootvine.service` | the unit, used in both the initrd and stage 2 |
|
||||
| `lib/dracut/modules.d/90bootvine/` | dracut module |
|
||||
| `lib/initcpio/install/sd-bootvine` | mkinitcpio hook |
|
||||
|
||||
### NixOS
|
||||
|
||||
```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:
|
||||
boot-tree.nixosModules.default
|
||||
{ services.boot-tree.enable = true; }
|
||||
bootvine.nixosModules.default
|
||||
{ services.bootvine.enable = true; }
|
||||
```
|
||||
|
||||
With `boot.initrd.systemd.enable` the unit is added to the initrd as well.
|
||||
|
||||
### Other distributions
|
||||
|
||||
1. Install `boot-tree` to `/usr/bin` and the files above under `/usr/lib`.
|
||||
2. `systemctl enable boot-tree.service`.
|
||||
1. Install `bootvine` to `/usr/bin` and the files above under `/usr/lib`.
|
||||
2. `systemctl enable bootvine.service`.
|
||||
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`;
|
||||
- mkinitcpio: add `sd-boot-tree` after `systemd` in `HOOKS`, then
|
||||
- mkinitcpio: add `sd-bootvine` after `systemd` in `HOOKS`, then
|
||||
`mkinitcpio -P`.
|
||||
|
||||
To draw on another terminal, override `TTYPath=` with
|
||||
`systemctl edit boot-tree.service`.
|
||||
`systemctl edit bootvine.service`.
|
||||
|
||||
## 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:
|
||||
|
||||
```toml
|
||||
@@ -97,13 +97,13 @@ the start of boot:
|
||||
On NixOS set the roles as options; unset ones keep their defaults:
|
||||
|
||||
```nix
|
||||
services.boot-tree.palette = {
|
||||
services.bootvine.palette = {
|
||||
running = "light-yellow";
|
||||
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.
|
||||
|
||||
## Testing
|
||||
@@ -115,7 +115,7 @@ Commands assume the dev shell is active (`direnv allow` once; `.envrc` runs
|
||||
| --- | --- |
|
||||
| Unit and render snapshot tests | `cargo test` |
|
||||
| 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` |
|
||||
| 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()` |
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ def "main start" [--units: path, --target: string] {
|
||||
install-units $units
|
||||
^systemctl --user stop ...(unit-names $units)
|
||||
^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] {
|
||||
@@ -29,5 +29,5 @@ def "main remove" [--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
@@ -18,13 +18,13 @@ let
|
||||
};
|
||||
in
|
||||
{
|
||||
networking.hostName = "boot-tree-demo";
|
||||
networking.hostName = "bootvine-demo";
|
||||
system.stateVersion = "26.05";
|
||||
|
||||
boot.initrd.systemd = {
|
||||
enable = true;
|
||||
services.demo-initrd-probe = {
|
||||
description = "boot-tree demo: slow initrd step";
|
||||
description = "bootvine demo: slow initrd step";
|
||||
wantedBy = [ "initrd.target" ];
|
||||
before = [ "initrd.target" ];
|
||||
unitConfig.DefaultDependencies = false;
|
||||
@@ -35,7 +35,7 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
services.boot-tree = {
|
||||
services.bootvine = {
|
||||
enable = true;
|
||||
palette.running = "light-yellow";
|
||||
};
|
||||
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
{ demoHost }:
|
||||
{
|
||||
name = "boot-tree";
|
||||
name = "bootvine";
|
||||
enableOCR = true;
|
||||
|
||||
nodes.machine =
|
||||
@@ -27,18 +27,18 @@
|
||||
machine.screenshot("stage-2")
|
||||
|
||||
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)
|
||||
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 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}
|
||||
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"
|
||||
|
||||
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()
|
||||
assert console_level != "1", f"kernel console level was not restored: {console_level}"
|
||||
show_status = machine.succeed("systemctl show -p ShowStatus --value").strip()
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
target = "boot-tree-demo";
|
||||
target = "bootvine-demo";
|
||||
initrdProbeSeconds = "6";
|
||||
services = {
|
||||
demo-disk.seconds = "2";
|
||||
|
||||
+4
-4
@@ -14,7 +14,7 @@ let
|
||||
name: spec:
|
||||
writeText "${name}.service" (toUnitFile {
|
||||
Unit = {
|
||||
Description = "boot-tree demo: ${name}";
|
||||
Description = "bootvine demo: ${name}";
|
||||
After = map (dependency: "${dependency}.service") (spec.after or [ ]);
|
||||
};
|
||||
Service = {
|
||||
@@ -30,13 +30,13 @@ let
|
||||
|
||||
targetFile = writeText "${demoUnits.target}.target" (toUnitFile {
|
||||
Unit = {
|
||||
Description = "boot-tree demo target";
|
||||
Description = "bootvine demo target";
|
||||
Wants = serviceNames;
|
||||
After = serviceNames;
|
||||
};
|
||||
});
|
||||
|
||||
units = linkFarm "boot-tree-demo-units" (
|
||||
units = linkFarm "bootvine-demo-units" (
|
||||
lib.mapAttrsToList (name: spec: {
|
||||
name = "${name}.service";
|
||||
path = serviceFile name spec;
|
||||
@@ -50,6 +50,6 @@ let
|
||||
);
|
||||
in
|
||||
writeShellApplication {
|
||||
name = "boot-tree-demo-units";
|
||||
name = "bootvine-demo-units";
|
||||
text = ''exec ${lib.getExe nushell} ${./demo-units.nu} "$@" --units ${units} --target ${demoUnits.target}.target'';
|
||||
}
|
||||
+1
-1
@@ -4,7 +4,7 @@ use std::{
|
||||
time::{Duration, Instant},
|
||||
};
|
||||
|
||||
use boot_tree::{
|
||||
use bootvine::{
|
||||
model::{ActiveState, Activity, BootState, JobResult, Phase, UnitFacts},
|
||||
palette::Palette,
|
||||
view::BootView,
|
||||
|
||||
@@ -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 = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
@@ -76,15 +76,15 @@
|
||||
};
|
||||
strictDeps = true;
|
||||
postInstall = ''
|
||||
install -Dm644 packaging/systemd/boot-tree.service $out/lib/systemd/system/boot-tree.service
|
||||
substituteInPlace $out/lib/systemd/system/boot-tree.service \
|
||||
--replace-fail /usr/bin/boot-tree $out/bin/boot-tree
|
||||
install -Dm755 packaging/dracut/90boot-tree/module-setup.sh \
|
||||
$out/lib/dracut/modules.d/90boot-tree/module-setup.sh
|
||||
install -Dm644 packaging/mkinitcpio/install/sd-boot-tree \
|
||||
$out/lib/initcpio/install/sd-boot-tree
|
||||
install -Dm644 packaging/systemd/bootvine.service $out/lib/systemd/system/bootvine.service
|
||||
substituteInPlace $out/lib/systemd/system/bootvine.service \
|
||||
--replace-fail /usr/bin/bootvine $out/bin/bootvine
|
||||
install -Dm755 packaging/dracut/90bootvine/module-setup.sh \
|
||||
$out/lib/dracut/modules.d/90bootvine/module-setup.sh
|
||||
install -Dm644 packaging/mkinitcpio/install/sd-bootvine \
|
||||
$out/lib/initcpio/install/sd-bootvine
|
||||
'';
|
||||
meta.mainProgram = "boot-tree";
|
||||
meta.mainProgram = "bootvine";
|
||||
meta.platforms = lib.platforms.linux;
|
||||
};
|
||||
demo-units = pkgs.callPackage ./demo/user-units.nix { inherit demoUnits; };
|
||||
|
||||
+9
-9
@@ -6,9 +6,9 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.services.boot-tree;
|
||||
cfg = config.services.bootvine;
|
||||
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 =
|
||||
role: default:
|
||||
lib.mkOption {
|
||||
@@ -23,7 +23,7 @@ let
|
||||
};
|
||||
in
|
||||
{
|
||||
options.services.boot-tree = {
|
||||
options.services.bootvine = {
|
||||
enable = lib.mkEnableOption ''
|
||||
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;
|
||||
@@ -34,8 +34,8 @@ in
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = self.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
||||
defaultText = lib.literalExpression "boot-tree.packages.\${system}.default";
|
||||
description = "The boot-tree package, which ships the systemd unit.";
|
||||
defaultText = lib.literalExpression "bootvine.packages.\${system}.default";
|
||||
description = "The bootvine package, which ships the systemd unit.";
|
||||
};
|
||||
|
||||
palette = {
|
||||
@@ -52,19 +52,19 @@ in
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment = {
|
||||
systemPackages = [ cfg.package ];
|
||||
etc."boot-tree.toml" = lib.mkIf (chosenColors != { }) { source = configFile; };
|
||||
etc."bootvine.toml" = lib.mkIf (chosenColors != { }) { source = configFile; };
|
||||
};
|
||||
|
||||
systemd = {
|
||||
packages = [ cfg.package ];
|
||||
services.boot-tree.wantedBy = [ "sysinit.target" ];
|
||||
services.bootvine.wantedBy = [ "sysinit.target" ];
|
||||
};
|
||||
|
||||
boot.initrd.systemd = lib.mkIf config.boot.initrd.systemd.enable {
|
||||
packages = [ cfg.package ];
|
||||
storePaths = [ (lib.getExe cfg.package) ];
|
||||
services.boot-tree.wantedBy = [ "sysinit.target" ];
|
||||
contents."/etc/boot-tree.toml" = lib.mkIf (chosenColors != { }) { source = configFile; };
|
||||
services.bootvine.wantedBy = [ "sysinit.target" ];
|
||||
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
|
||||
}
|
||||
Executable
+19
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
Executable
+18
@@ -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]
|
||||
Type=simple
|
||||
ExecStart=@/usr/bin/boot-tree @boot-tree
|
||||
ExecStart=@/usr/bin/bootvine @bootvine
|
||||
StandardInput=tty
|
||||
StandardOutput=tty
|
||||
StandardError=journal
|
||||
+2
-2
@@ -6,7 +6,7 @@ use std::{
|
||||
time::{Duration, Instant},
|
||||
};
|
||||
|
||||
use boot_tree::model::{BootState, HANDOFF_UNIT, HOST_MILESTONES};
|
||||
use bootvine::model::{BootState, HANDOFF_UNIT, HOST_MILESTONES};
|
||||
use dbus::Path;
|
||||
|
||||
use crate::{
|
||||
@@ -133,7 +133,7 @@ impl Feed {
|
||||
jobs.iter()
|
||||
.for_each(|job| state.queue_job(job.id, &job.unit, now));
|
||||
eprintln!(
|
||||
"boot-tree: watching {root} in {} as pid {} over {}",
|
||||
"bootvine: watching {root} in {} as pid {} over {}",
|
||||
if self.in_initrd { "initrd" } else { "stage 2" },
|
||||
process::id(),
|
||||
if session.peer_to_peer {
|
||||
|
||||
+5
-5
@@ -8,7 +8,7 @@ mod systemd;
|
||||
|
||||
use std::{fs, io::ErrorKind, path::PathBuf, process::ExitCode, time::Duration};
|
||||
|
||||
use boot_tree::palette::Config;
|
||||
use bootvine::palette::Config;
|
||||
use clap::Parser;
|
||||
use jiff::SignedDuration;
|
||||
|
||||
@@ -36,7 +36,7 @@ struct Cli {
|
||||
hold: Duration,
|
||||
#[arg(
|
||||
long,
|
||||
default_value = "/etc/boot-tree.toml",
|
||||
default_value = "/etc/bootvine.toml",
|
||||
help = "TOML file with a [palette] table"
|
||||
)]
|
||||
config: PathBuf,
|
||||
@@ -51,12 +51,12 @@ fn main() -> ExitCode {
|
||||
let cli = Cli::parse();
|
||||
let config = match fs::read_to_string(&cli.config) {
|
||||
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()
|
||||
}),
|
||||
Err(error) if error.kind() == ErrorKind::NotFound => Config::default(),
|
||||
Err(error) => {
|
||||
eprintln!("boot-tree: cannot read {}: {error}", cli.config.display());
|
||||
eprintln!("bootvine: cannot read {}: {error}", cli.config.display());
|
||||
Config::default()
|
||||
}
|
||||
};
|
||||
@@ -69,7 +69,7 @@ fn main() -> ExitCode {
|
||||
match run(&options) {
|
||||
Ok(()) => ExitCode::SUCCESS,
|
||||
Err(error) => {
|
||||
eprintln!("boot-tree: {error}");
|
||||
eprintln!("bootvine: {error}");
|
||||
ExitCode::FAILURE
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@ use std::{
|
||||
time::{Duration, Instant},
|
||||
};
|
||||
|
||||
use boot_tree::{
|
||||
use bootvine::{
|
||||
model::{BootState, Phase},
|
||||
palette::Palette,
|
||||
view::BootView,
|
||||
@@ -115,7 +115,7 @@ fn watch(
|
||||
})?;
|
||||
if state.is_complete() {
|
||||
eprintln!(
|
||||
"boot-tree: {} reached, handing the console over",
|
||||
"bootvine: {} reached, handing the console over",
|
||||
state.root.as_deref().unwrap_or("boot")
|
||||
);
|
||||
sleep(hold);
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
use std::{iter, time::Duration};
|
||||
|
||||
use boot_tree::model::{ActiveState, Activity, JobResult, UnitFacts};
|
||||
use bootvine::model::{ActiveState, Activity, JobResult, UnitFacts};
|
||||
use dbus::{
|
||||
Message, MessageType, Path,
|
||||
arg::{AppendAll, PropMap, RefArg, Variant},
|
||||
|
||||
+2
-2
@@ -196,7 +196,7 @@ impl BootView<'_> {
|
||||
});
|
||||
Table::new(
|
||||
[Row::new([
|
||||
Line::from(format!("boot-tree {}", self.host)),
|
||||
Line::from(format!("bootvine {}", self.host)),
|
||||
Line::from(total.unwrap_or_default()).right_aligned(),
|
||||
])],
|
||||
[Constraint::Fill(1), Constraint::Length(DURATION_WIDTH)],
|
||||
@@ -804,7 +804,7 @@ mod tests {
|
||||
fn tree_on_top_timeline_below() {
|
||||
let lines = render(&boot_in_progress(), 12_400 * MS, 110, 24);
|
||||
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].ends_with("12.4s ──"), "{screen}");
|
||||
assert!(lines[3].starts_with("graphical.target"), "{screen}");
|
||||
|
||||
Reference in new issue
Block a user