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

fix: Fix running tests for individual crates #5210

Merged

Conversation

dima74
Copy link
Contributor

@dima74 dima74 commented Oct 30, 2024

Currently some crates can't be tested individually, e.g.:

cargo test --package iroha_swarm

=>

   Compiling iroha_config v2.0.0-rc.1.0 (/home/dima/soramitsu/fresh/iroha/crates/iroha_config)
error[E0277]: `strum::ParseError` doesn't implement `std::fmt::Display`
  --> crates/iroha_config/src/kura.rs:17:5

This PR fixes it. I used the following commands to test it:

cargo test --no-run --package iroha &&
cargo test --no-run --package iroha_cli &&
cargo test --no-run --package iroha_codec &&
cargo test --no-run --package iroha_config &&
cargo test --no-run --package iroha_config_base &&
cargo test --no-run --package iroha_config_base_derive &&
cargo test --no-run --package iroha_core &&
cargo test --no-run --package iroha_crypto &&
cargo test --no-run --package iroha_data_model &&
cargo test --no-run --package iroha_data_model_derive &&
cargo test --no-run --package iroha_derive &&
cargo test --no-run --package iroha_executor &&
cargo test --no-run --package iroha_executor_data_model &&
cargo test --no-run --package iroha_executor_data_model_derive &&
cargo test --no-run --package iroha_executor_derive &&
cargo test --no-run --package iroha_ffi &&
cargo test --no-run --package iroha_ffi_derive &&
cargo test --no-run --package iroha_futures &&
cargo test --no-run --package iroha_futures_derive &&
cargo test --no-run --package iroha_genesis &&
cargo test --no-run --package iroha_kagami &&
cargo test --no-run --package iroha_logger &&
cargo test --no-run --package iroha_macro &&
cargo test --no-run --package iroha_macro_utils &&
cargo test --no-run --package iroha_multisig_data_model &&
cargo test --no-run --package iroha_numeric &&
cargo test --no-run --package iroha_p2p &&
cargo test --no-run --package iroha_primitives &&
cargo test --no-run --package iroha_primitives_derive &&
cargo test --no-run --package iroha_schema &&
cargo test --no-run --package iroha_schema_derive &&
cargo test --no-run --package iroha_schema_gen &&
cargo test --no-run --package iroha_smart_contract &&
cargo test --no-run --package iroha_smart_contract_derive &&
cargo test --no-run --package iroha_smart_contract_utils &&
cargo test --no-run --package iroha_swarm &&
cargo test --no-run --package iroha_telemetry &&
cargo test --no-run --package iroha_telemetry_derive &&
cargo test --no-run --package iroha_test_network &&
cargo test --no-run --package iroha_test_samples &&
cargo test --no-run --package iroha_torii &&
cargo test --no-run --package iroha_torii_const &&
cargo test --no-run --package iroha_trigger &&
cargo test --no-run --package iroha_trigger_derive &&
cargo test --no-run --package iroha_version &&
cargo test --no-run --package iroha_version_derive &&
cargo test --no-run --package iroha_wasm_builder &&
cargo test --no-run --package iroha_wasm_codec &&
cargo test --no-run --package iroha_wasm_codec_derive &&
cargo test --no-run --package iroha_wasm_test_runner &&
cargo test --no-run --package irohad &&
cargo test --no-run --package kura_inspector

Running tests for individual crate is useful when running tests from the IDE, or when using env UPDATE_EXPECT=1

Cargo.toml Show resolved Hide resolved
@mversic
Copy link
Contributor

mversic commented Oct 30, 2024

Would be good to open a ticket to deal with this in ci

@dima74
Copy link
Contributor Author

dima74 commented Oct 30, 2024

Would be good to open a ticket to deal with this in ci

#5211

@dima74 dima74 merged commit bba5fa6 into hyperledger-iroha:main Oct 30, 2024
12 checks passed
@dima74 dima74 deleted the diralik/fix-running-single-crate-tests branch October 30, 2024 17:39
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.

3 participants