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

test-keys/end.pem isn't shipped as part of ntp-proto #1332

Closed
sylvestre opened this issue Jan 29, 2024 · 4 comments
Closed

test-keys/end.pem isn't shipped as part of ntp-proto #1332

sylvestre opened this issue Jan 29, 2024 · 4 comments

Comments

@sylvestre
Copy link
Contributor

sylvestre commented Jan 29, 2024

Just like:
#1214

ntp-proto tests are failing with:

280s error: couldn't read src/../../test-keys/end.pem: No such file or directory (os error 2)
280s     --> src/nts_record.rs:2897:42
280s      |
280s 2897 |             &mut std::io::BufReader::new(include_bytes!("../../test-keys/end.pem") as &[u8]),
280s      |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
280s      |
280s      = note: this error originates in the macro `include_bytes` (in Nightly builds, run with -Z macro-backtrace for more info)
280s 
282s error: could not compile `ntp-proto` due to previous error
282s 
282s Caused by:
282s   process didn't exit successfully: `CARGO=/usr/bin/cargo CARGO_CRATE_NAME=ntp_proto CARGO_MANIFEST_DIR=/usr/share/

full log:
https://ci.debian.net/packages/r/rust-ntp-proto/testing/amd64/42362802/

@rnijveld
Copy link
Member

That's a shame. I think we should change the directory structure such that at least this specific case cannot happen anymore. My proposal is that we remove the top level test-keys folder in the project and move it to either ntp-proto or ntpd, and then we duplicate/symlink it to the other crate. Additionally, maybe we want to add a CI step that attempts to test the crates isolated from the rest of the repository before we create a release, making sure things like this don't happen anymore. Would also be nice if cargo publish would support a --test flag for this, it currently only does a build of the crate itself, it doesn't build nor run the test code.

@sylvestre
Copy link
Contributor Author

Yeah, duplicating isn't a big deal :)

@davidv1992
Copy link
Member

Fixed the immediate issue again in version 1.1.2. Leaving it up to @rnijveld if this is a sufficient solution for now or if we want to do more before closing this.

@rnijveld
Copy link
Member

rnijveld commented Feb 1, 2024

I've created a separate issue for that, see #1337

@rnijveld rnijveld closed this as completed Feb 1, 2024
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

3 participants