report,ui: name the tee log by flow kind

BuildTarget::source_only carried two states for what is a three-way
distinction now that pkh test exists: replace it with a TargetKind
(Source/Binary/Test) and derive the tee log prefix (build-/deb-/test-)
from it, so test runs get their own log family instead of borrowing
the deb one.
This commit is contained in:
2026-09-27 20:41:40 +02:00
parent 067e0614e6
commit d30b179430
5 changed files with 23 additions and 8 deletions
+14 -3
View File
@@ -28,6 +28,18 @@ use crate::logfmt::Classifier;
/// why it is rejected (the implementation re-asks with the explanation).
pub type Validator = dyn Fn(&str) -> Result<(), String>;
/// Which flow a target belongs to; names the terminal adapter's tee log
/// (`build-*.log`, `deb-*.log`, `test-*.log`).
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum TargetKind {
/// Source-only build (produces a `.dsc`).
Source,
/// Binary build (produces `.debs`).
Binary,
/// DEP-8 test run (`pkh test`).
Test,
}
/// Identity of the build whose events follow, as announced through
/// [`BuildView::target`].
#[derive(Debug, Clone)]
@@ -45,9 +57,8 @@ pub struct BuildTarget<'a> {
/// "Uploading hello (2.10-3) to ppa:user/ppa"): the wording is the
/// flow's, adapters render it verbatim.
pub display: String,
/// Whether this is a source-only build (producing a `.dsc`); names the
/// terminal adapter's tee log (`build-*.log` vs `deb-*.log`).
pub source_only: bool,
/// The flow driving the events; names the terminal adapter's tee log.
pub kind: TargetKind,
/// Whether the view should tee raw subprocess output to its log file.
/// Flows without subprocess output (uploads) pass `false` and create
/// no log file.