Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to skip test code during publishing #4389

Merged
merged 1 commit into from
Aug 12, 2017
Merged

Conversation

matklad
Copy link
Member

@matklad matklad commented Aug 9, 2017

closes #4365

I don't have time to review this code carefully right now, but looks like it does the job.

@rust-highfive
Copy link

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@@ -38,19 +39,19 @@ pub fn targets(manifest: &TomlManifest,
}

targets.extend(
clean_bins(manifest.bin.as_ref(), package_root, package_name, warnings, has_lib)?
clean_bins(manifest.bin.as_ref(), package_root, package_name, warnings, errors, has_lib)?
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, now I am not quite sure that we should apply this logic to binaries as well...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah maybe we can stick to just tests/benchmarks for now?


assert_that(p.cargo("test"), execs().with_status(0));
assert_that(p.cargo("test").arg("--package").arg("testless"),
execs().with_status(0));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this last check is something that we actually gain here.

My undestanding is that with the current cargo it is impossible to do cargo test --package dependency, if the dep skipped some tests during publishing. Now it is possible.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yeah I think that's ok. This won't work in general due to dev-dependencies anyway (e.g. you can still test the library and it won't link right)

@alexcrichton
Copy link
Member

@bors: r+

Oops sorry missed the update here!

@bors
Copy link
Collaborator

bors commented Aug 12, 2017

📌 Commit dafab24 has been approved by alexcrichton

@bors
Copy link
Collaborator

bors commented Aug 12, 2017

⌛ Testing commit dafab24 with merge ab76ef9...

bors added a commit that referenced this pull request Aug 12, 2017
Allow to skip test code during publishing

closes #4365

I don't have time to review this code carefully right now, but looks like it does the job.
@bors
Copy link
Collaborator

bors commented Aug 12, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing ab76ef9 to master...

@bors bors merged commit dafab24 into rust-lang:master Aug 12, 2017
bors added a commit that referenced this pull request Aug 12, 2017
[beta] Allow to skip test code during publishing

Backport of #4389
@matklad matklad deleted the testless branch March 17, 2018 08:39
@ehuss ehuss added this to the 1.21.0 milestone Feb 6, 2022
@ehuss ehuss modified the milestones: 1.21.0, 1.20.0 Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Beta regressions "failed to parse manifest"
5 participants