Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,915 changes: 907 additions & 1,008 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ aws-config = { version = "1", features = ["behavior-version-latest"] }
aws-sdk-s3 = "1.7"
base64 = "0.22.1"
bytes = "1"
cargo_metadata = "0.22.0"
cargo-util-schemas = "0.9.0"
cargo_metadata = "0.23.1"
cargo-util-schemas = "0.12.0"
chrono = { version = "0.4", features = ["serde"] }
clap = { version = "4", features = ["derive"] }
smol_str = "0.3.2"
Expand Down Expand Up @@ -48,7 +48,7 @@ reqwest = { version = "0.12", features = ["blocking", "json", "gzip"] }
jiff = { version = "0.2.15", features = ["serde"] }
rusqlite = { version = "0.37", features = ["chrono", "functions", "bundled"] }
rust_team_data = { git = "https://github.com/rust-lang/team" }
rustwide = { version = "0.19.3", features = [
rustwide = { version = "0.22.1", features = [
"unstable",
"unstable-toolchain-ci",
] }
Expand All @@ -62,7 +62,7 @@ tempfile = "3.0.0"
tera = "1.19.1"
thiserror = "2"
tokio = "1.24"
toml = "0.8.6"
toml = "1.0.6"
url = { version = "2", features = ["serde"] }
walkdir = "2"
warp = { version = "0.4", features = ["server"] }
Expand Down
39 changes: 26 additions & 13 deletions src/runner/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,34 @@ pub(super) fn detect_broken<T>(res: Result<T, Error>) -> Result<T, Error> {
match res {
Ok(ok) => Ok(ok),
Err(err) => {
let mut reason = None;

if let Some(error) = err.downcast_ref() {
reason = match *error {
PrepareError::MissingCargoToml => Some(BrokenReason::CargoToml),
PrepareError::InvalidCargoTomlSyntax => Some(BrokenReason::CargoToml),
PrepareError::YankedDependencies(_) => Some(BrokenReason::Yanked),
PrepareError::MissingDependencies(_) => Some(BrokenReason::MissingDependencies),
PrepareError::PrivateGitRepository => Some(BrokenReason::MissingGitRepository),
_ => None,
}
}
let reason = match *error {
PrepareError::MissingCargoToml => {
TestResult::BrokenCrate(BrokenReason::CargoToml)
}
PrepareError::InvalidCargoTomlSyntax => {
TestResult::BrokenCrate(BrokenReason::CargoToml)
}
PrepareError::YankedDependencies(_) => {
TestResult::BrokenCrate(BrokenReason::Yanked)
}
PrepareError::MissingDependencies(_) => {
TestResult::BrokenCrate(BrokenReason::MissingDependencies)
}
PrepareError::PrivateGitRepository => {
TestResult::BrokenCrate(BrokenReason::MissingGitRepository)
}
_ => {
let reason = failure_reason(&err);
if reason.is_spurious() || matches!(reason, FailureReason::Unknown) {
TestResult::PrepareFail(reason)
} else {
TestResult::BrokenCrate(BrokenReason::Unknown)
}
}
};

if let Some(reason) = reason {
Err(err.context(OverrideResult(TestResult::BrokenCrate(reason))))
Err(err.context(OverrideResult(reason)))
} else {
Err(err)
}
Expand Down
6 changes: 2 additions & 4 deletions tests/check_config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn test_bad_config_duplicate_crate() {
.assert()
.failure()
.code(1)
.stderr(contains("duplicate key `lazy_static` in table `crates`"));
.stderr(contains("duplicate key"));
}

#[test]
Expand All @@ -31,9 +31,7 @@ fn test_bad_config_duplicate_repo() {
.assert()
.failure()
.code(1)
.stderr(contains(
"duplicate key `brson/hello-rs` in table `github-repos`",
));
.stderr(contains("duplicate key"));
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion tests/minicrater/full/full.html.context.expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"url": "https://github.com/rust-lang/crater/tree/HEAD/local-crates/ice-regression"
}
],
"build compiler-error(E0015)": [
"build compiler-error(E0277)": [
{
"color_idx": 0,
"name": "error-code (local)",
Expand Down
2 changes: 1 addition & 1 deletion tests/minicrater/full/index.html.context.expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"url": "https://github.com/rust-lang/crater/tree/HEAD/local-crates/ice-regression"
}
],
"build compiler-error(E0015)": [
"build compiler-error(E0277)": [
{
"color_idx": 0,
"name": "error-code (local)",
Expand Down
2 changes: 1 addition & 1 deletion tests/minicrater/full/markdown.md.context.expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
},
{
"log": "beta/local/error-code",
"res": "build-fail:compiler-error(E0015)"
"res": "build-fail:compiler-error(E0277)"
}
],
"url": "https://github.com/rust-lang/crater/tree/HEAD/local-crates/error-code"
Expand Down
2 changes: 1 addition & 1 deletion tests/minicrater/full/results.expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
},
{
"log": "beta/local/error-code",
"res": "build-fail:compiler-error(E0015)"
"res": "build-fail:compiler-error(E0277)"
}
],
"url": "https://github.com/rust-lang/crater/tree/HEAD/local-crates/error-code"
Expand Down