Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

tests from crates.io tarball are failing due to missing files #224

Closed
ignatenkobrain opened this issue Sep 9, 2018 · 11 comments
Closed

Comments

@ignatenkobrain
Copy link

---- elements::module::integration_tests::const_ stdout ----
thread 'elements::module::integration_tests::const_' panicked at 'Should be deserialized: HeapOther("Can\'t read from the file: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }")', libcore/result.rs:945:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

---- elements::module::integration_tests::hello stdout ----
thread 'elements::module::integration_tests::hello' panicked at 'Should be deserialized: HeapOther("Can\'t read from the file: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }")', libcore/result.rs:945:5

---- elements::module::integration_tests::peek stdout ----
thread 'elements::module::integration_tests::peek' panicked at 'Should be deserialized: HeapOther("Can\'t read from the file: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }")', libcore/result.rs:945:5

---- elements::module::integration_tests::memory_space stdout ----
thread 'elements::module::integration_tests::memory_space' panicked at 'failed to deserialize: HeapOther("Can\'t read from the file: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }")', libcore/result.rs:945:5

---- elements::module::integration_tests::names stdout ----
thread 'elements::module::integration_tests::names' panicked at 'Should be deserialized: HeapOther("Can\'t read from the file: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }")', libcore/result.rs:945:5

---- elements::module::integration_tests::serde stdout ----
thread 'elements::module::integration_tests::serde' panicked at 'Should be deserialized: HeapOther("Can\'t read from the file: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }")', libcore/result.rs:945:5

---- elements::module::integration_tests::peek_3 stdout ----
thread 'elements::module::integration_tests::peek_3' panicked at 'Should be deserialized: HeapOther("Can\'t read from the file: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }")', libcore/result.rs:945:5

---- elements::module::integration_tests::peek_2 stdout ----
thread 'elements::module::integration_tests::peek_2' panicked at 'Should be deserialized: HeapOther("Can\'t read from the file: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }")', libcore/result.rs:945:5

---- elements::module::integration_tests::serde_code stdout ----
thread 'elements::module::integration_tests::serde_code' panicked at 'Should be deserialized: HeapOther("Can\'t read from the file: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }")', libcore/result.rs:945:5

---- elements::module::integration_tests::serde_import stdout ----
thread 'elements::module::integration_tests::serde_import' panicked at 'Should be deserialized: HeapOther("Can\'t read from the file: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }")', libcore/result.rs:945:5

---- elements::module::integration_tests::serde_type stdout ----
thread 'elements::module::integration_tests::serde_type' panicked at 'Should be deserialized: HeapOther("Can\'t read from the file: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }")', libcore/result.rs:945:5

---- elements::module::integration_tests::store stdout ----
thread 'elements::module::integration_tests::store' panicked at 'Should be deserialized: HeapOther("Can\'t read from the file: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }")', libcore/result.rs:945:5

---- elements::module::integration_tests::varuint1_case stdout ----
thread 'elements::module::integration_tests::varuint1_case' panicked at 'Maybe shouldn't be deserialized: HeapOther("Can\'t read from the file: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }")', libcore/result.rs:945:5

---- elements::reloc_section::tests::reloc_section stdout ----
thread 'elements::reloc_section::tests::reloc_section' panicked at 'Module should be deserialized: HeapOther("Can\'t read from the file: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }")', libcore/result.rs:945:5

---- elements::section::tests::import_section stdout ----
thread 'elements::section::tests::import_section' panicked at 'Should be deserialized: HeapOther("Can\'t read from the file: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }")', libcore/result.rs:945:5

Please either include them or somehow disable those tests by default. Thanks!

@NikVolf
Copy link
Contributor

NikVolf commented Sep 9, 2018

Those tests rely on submodule, so download it before (git submodule update —init in the directory)

@ignatenkobrain
Copy link
Author

note that crates.io tarballs do not contain any git submodule information

@NikVolf
Copy link
Contributor

NikVolf commented Sep 9, 2018

Is there any way to specify it?

@ignatenkobrain
Copy link
Author

@NikVolf I believe that those files are excluded here: https://github.com/paritytech/parity-wasm/blob/master/Cargo.toml#L13

@NikVolf
Copy link
Contributor

NikVolf commented Sep 10, 2018

But if I remove it, every user will have to download the test suite, which is not at all needed

@pepyakin
Copy link
Contributor

Hi @ignatenkobrain ! sorry for chiming in so late.

Cargo testing usually assumes that you're working with crate locally and crates.io packages don't always contain all necesarry files for testing.

I wonder why do you have such requirements?

@ignatenkobrain
Copy link
Author

We try to test all crates before we ship them to users when packaging in Fedora.

This works for most of the crates, but for those which do not, upstream usually add some flag which disables testing of data-dependent tests.

@ignatenkobrain
Copy link
Author

by doing this we catched a lot of different issues related to endianess and/or some specific versions of crates.

@pepyakin
Copy link
Contributor

pepyakin commented Oct 7, 2018

We try to test all crates before we ship them to users when packaging in Fedora.

Interesting! This is totally a legit case, but as I've said it's not officially supported... I would recommend to file an issue to cargo/crates.io repo to ask about officially supporting this use-case.

In the meantime, I think it should be possible to download the tests dynamically. Will look into that.

@silwol
Copy link

silwol commented Feb 20, 2020

We stumbled over the same problem when packaging the crate for Debian. Unfortunately, adding a method to dynamically download the files also doesn't help, because in Debian all packages must be buildable without a network connection. In this case, I also think it's not worth distributing additional files of 30MB size, so I'll disable the tests for now. Even though running tests has surfaced several real issues in the past, similar to Fedora's experience.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants