tests fail on published crate due to missing assets
As part of my efforts to improve linux vendorization of rust crates, which includes the ability to test a crate, I've stumbled onto this problem:
--
/webpki-0.21.0 $ cargo test
Updating crates.io index
Downloaded safemem v0.3.3
Compiling cc v1.0.47
Compiling libc v0.2.65
Compiling byteorder v1.3.2
Compiling untrusted v0.7.0
Compiling spin v0.5.2
Compiling lazy_static v1.4.0
Compiling safemem v0.3.3
Compiling base64 v0.9.3
Compiling ring v0.16.9
Compiling webpki v0.21.0 (/home/kent/.cpanm/work/1574939730.18985/webpki-0.21.0)
warning: unknown lint: `legacy_directory_ownership`
--> tests/integration.rs:18:5
|
18 | legacy_directory_ownership,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `legacy_disrectory_ownership`
|
= note: `#[warn(unknown_lints)]` on by default
error: couldn't read tests/ed25519/ee.der: No such file or directory (os error 2)
--> tests/integration.rs:74:14
|
74 | let ee = include_bytes!("ed25519/ee.der");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: couldn't read tests/ed25519/ca.der: No such file or directory (os error 2)
--> tests/integration.rs:75:14
|
75 | let ca = include_bytes!("ed25519/ca.der");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors
error: could not compile `webpki`.
warning: build failed, waiting for other jobs to finish...
error: build failed
Ideally tests should be compilable, and executable in the deployed crate so vendors can perform downstream QA during their release cycle builds.
Ensuring the assets are present is the easiest approach.
If that's undesirable, pruning the tests from the published release that require these assets is a suitable compromise.
Also worth mentioning that its a single test breakage causing this. Which is fortunately easy to gate out vendor-side.
But just as worthy of mentioning, the omitted data dir is a mere 12k, which is like, 2.5% of the crates size. shrug
Would be easier to just include them.
I'm happy to take a PR that fixes this. I believe it is just an oversight.