Skip to content

Commit 8ea47ce

Browse files
committed
Allow the creation of build managers that cannot create nested builds
1 parent 62a7aba commit 8ea47ce

File tree

10 files changed

+15
-10
lines changed

10 files changed

+15
-10
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ui_test"
3-
version = "0.26.4"
3+
version = "0.26.5"
44
edition = "2021"
55
license = "MIT OR Apache-2.0"
66
description = "A test framework for testing rustc diagnostics output"

src/build_manager.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::{
77
};
88

99
use color_eyre::eyre::Result;
10-
use crossbeam_channel::Sender;
10+
use crossbeam_channel::{bounded, Sender};
1111

1212
use crate::{
1313
status_emitter::{RevisionStyle, TestStatus},
@@ -47,6 +47,11 @@ impl BuildManager {
4747
}
4848
}
4949

50+
/// Create a new `BuildManager` that cannot create new sub-jobs.
51+
pub fn one_off(config: Config) -> Self {
52+
Self::new(config, bounded(0).0)
53+
}
54+
5055
/// Lazily add more jobs after a test has finished. These are added to the queue
5156
/// as normally, but nested below the test.
5257
pub fn add_new_job(&self, job: impl Send + 'static + FnOnce() -> TestRun) {

tests/integrations/basic-bin/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/integrations/basic-fail-mode/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/integrations/basic-fail/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/integrations/basic/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/integrations/cargo-run/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/integrations/dep-fail/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/integrations/ui_test_dep_bug/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)