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

Cargo.toml used by tests are not included in the generated package #45

Open
eclipseo opened this issue Jul 12, 2021 · 2 comments
Open

Comments

@eclipseo
Copy link

It seems the tests are failing because the tests directory in the crate does not contain all the subdirectory like in the repo:

$ ll tests/
drwxr-xr-x@   - bob 12 Jul 20:09 toml-missing-file
.rw-r--r--@ 468 bob  1 Jan  1970 testanotherlib.pc
.rw-r--r--@ 176 bob  1 Jan  1970 testdata.pc
.rw-r--r--@ 229 bob  1 Jan  1970 testlib-2.0.pc
.rw-r--r--@ 229 bob  1 Jan  1970 testlib-3.0.pc
.rw-r--r--@ 290 bob  1 Jan  1970 testlib.pc

Shouldn't all the tests subdirectories be included in the crate?

@gdesmott
Copy link
Owner

That's really strange as only the subdir toml-missing-file is included and I don't see anything special with this one. Don't know how cargo publish pick the files actually included, will investigate.

@gdesmott
Copy link
Owner

This can easily be check using:

$ cargo package -l
.cargo_vcs_info.json
.github/release-drafter.yml
.github/workflows/ci.yml
.github/workflows/release-drafter.yml
.gitignore
Cargo.toml
Cargo.toml.orig
LICENSE-APACHE
LICENSE-MIT
README.md
src/lib.rs
src/metadata.rs
src/test.rs
src/tests/testanotherlib.pc
src/tests/testdata.pc
src/tests/testlib-2.0.pc
src/tests/testlib-3.0.pc
src/tests/testlib.pc
src/tests/toml-missing-file/no-cargo-toml-here

Looks like we are hitting a cargo limitation. Let's wait for the input from cargo developers.

@gdesmott gdesmott changed the title test failed in fedora part 2 Cargo.toml used by tests are not included in the generated package Jul 13, 2021
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

No branches or pull requests

2 participants