Skip to content

Commit 61955a8

Browse files
committed
Auto merge of #368 - pietroalbini:missing-cargotoml, r=pietroalbini
Properly mark crates without Cargo.toml as failed Before this PR they would be marked as error.
2 parents efd929b + ef19d79 commit 61955a8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/runner/prepare.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ pub(super) fn with_frobbed_toml(ex: &Experiment, krate: &Crate, path: &Path) ->
9797
pub(super) fn validate_manifest(ex: &Experiment, krate: &Crate, tc: &Toolchain) -> Fallible<()> {
9898
info!("validating manifest of {} on toolchain {}", krate, tc);
9999
with_work_crate(ex, tc, krate, |path| {
100+
// Skip crates missing a Cargo.toml
101+
if !path.join("Cargo.toml").is_file() {
102+
Err(err_msg(format!("missing Cargo.toml for {}", krate)))
103+
.with_context(|_| OverrideResult(TestResult::BuildFail(FailureReason::Broken)))?;
104+
}
105+
100106
RunCommand::new(CARGO.toolchain(tc))
101107
.args(&["read-manifest", "--manifest-path", "Cargo.toml"])
102108
.cd(path)

src/runner/tasks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ impl Task {
141141
::runner::prepare::capture_shas(ex, &[self.krate.clone()], db)?;
142142
}
143143

144-
::runner::prepare::frob_toml(ex, &self.krate)?;
145144
::runner::prepare::validate_manifest(ex, &self.krate, &ex.toolchains[0])?;
145+
::runner::prepare::frob_toml(ex, &self.krate)?;
146146
::runner::prepare::capture_lockfile(config, ex, &self.krate, &ex.toolchains[0])?;
147147
::runner::prepare::fetch_crate_deps(config, ex, &self.krate, &ex.toolchains[0])?;
148148

0 commit comments

Comments
 (0)