Skip to content

Commit

Permalink
Allow the creation of build managers that cannot create nested builds
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Sep 11, 2024
1 parent 62a7aba commit 8ea47ce
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ui_test"
version = "0.26.4"
version = "0.26.5"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "A test framework for testing rustc diagnostics output"
Expand Down
7 changes: 6 additions & 1 deletion src/build_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::{
};

use color_eyre::eyre::Result;
use crossbeam_channel::Sender;
use crossbeam_channel::{bounded, Sender};

use crate::{
status_emitter::{RevisionStyle, TestStatus},
Expand Down Expand Up @@ -47,6 +47,11 @@ impl BuildManager {
}
}

/// Create a new `BuildManager` that cannot create new sub-jobs.
pub fn one_off(config: Config) -> Self {
Self::new(config, bounded(0).0)
}

/// Lazily add more jobs after a test has finished. These are added to the queue
/// as normally, but nested below the test.
pub fn add_new_job(&self, job: impl Send + 'static + FnOnce() -> TestRun) {
Expand Down
2 changes: 1 addition & 1 deletion tests/integrations/basic-bin/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/integrations/basic-fail-mode/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/integrations/basic-fail/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/integrations/basic/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/integrations/cargo-run/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/integrations/dep-fail/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/integrations/ui_test_dep_bug/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8ea47ce

Please sign in to comment.