pve-installer/proxmox-tui-installer
Christoph Heiss 2489caa271 tui: tests: catch EOF from proxmox-low-level-installer early
This can happen if e.g. not all required testdata is available, such as
.cd-info - in which case proxmox-low-level-installer will fail early
with

  could not open CD info file '/.cd-info' - No such file or directory at Proxmox/Install/ISOEnv.pm line 95.

Currently, next_msg() would just be recursively called until the stack
overflowed in such a case.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2024-11-25 23:21:51 +01:00
..
src tui: tests: catch EOF from proxmox-low-level-installer early 2024-11-25 23:21:51 +01:00
Cargo.toml tree-wide: add serde derive where actually needed 2024-11-12 14:51:11 +01:00
README.md tui: add README describing some debugging specifics 2023-06-14 10:39:56 +02:00

proxmox-tui-installer

Testing/debugging

stderr redirection

If something needs to be printed for debugging (e.g. using eprintln!() or dbg!()), output redirection can be used. Open a second terminal and get the file name of the terminal using the tty command:

$ tty
/dev/pts/6

Now, simply run the installer using:

$ cargo run 2>/dev/pts/6

All stderr output will then show up in the other terminal.

Specific terminal size

To test the installer with a specific output size, the stty command can be used. For example, to set it to a standard 80x25 terminal:

$ stty columns 80 rows 25