• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kaspar030 / laze / 14972382208

12 May 2025 12:36PM UTC coverage: 79.955% (-0.9%) from 80.887%
14972382208

push

github

web-flow
ui: only show "laze: executing task ..." in verbose mode (#716)

2 of 6 new or added lines in 1 file covered. (33.33%)

1 existing line in 1 file now uncovered.

3231 of 4041 relevant lines covered (79.96%)

101.28 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

76.47
/src/task_runner.rs
1
use std::path::Path;
2

3
use anyhow::Error;
4

5
use crate::generate::BuildInfo;
6
use crate::model::Task;
7

8
#[derive(Debug)]
9
pub struct RunTaskResult<'a> {
10
    pub build: &'a BuildInfo,
11
    #[allow(dead_code)]
12
    pub task: &'a Task,
13
    pub result: Result<(), Error>,
14
}
15

16
pub fn run_tasks<'a, I>(
5✔
17
    task_name: &str,
5✔
18
    tasks: I,
5✔
19
    args: std::option::Option<&Vec<&str>>,
5✔
20
    verbose: u8,
5✔
21
    keep_going: usize,
5✔
22
    project_root: &Path,
5✔
23
) -> Result<(Vec<RunTaskResult<'a>>, usize), Error>
5✔
24
where
5✔
25
    I: Iterator<Item = &'a (&'a BuildInfo, &'a Task)>,
5✔
26
{
27
    let mut results = Vec::new();
5✔
28
    let mut errors = 0;
5✔
29

30
    for (build, task) in tasks {
10✔
31
        if verbose > 0 {
5✔
NEW
32
            println!(
×
NEW
33
                "laze: executing task {} for builder {} bin {}",
×
NEW
34
                task_name, build.builder, build.binary,
×
NEW
35
            );
×
36
        }
5✔
37

38
        let result = task.execute(project_root, args, verbose);
5✔
39
        let is_error = result.is_err();
5✔
40

41
        results.push(RunTaskResult {
5✔
42
            build,
5✔
43
            task,
5✔
44
            result,
5✔
45
        });
5✔
46

47
        if is_error {
5✔
48
            errors += 1;
×
49
            if keep_going > 0 && errors >= keep_going {
×
50
                break;
×
51
            }
×
52
        }
5✔
53
    }
54

55
    Ok((results, errors))
5✔
56
}
5✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc