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:
+14
-3
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user