Cargo features confusion

Hi,

this cargo call stopped working

LIBRARY_PATH=./ LD_LIBRARY_PATH=./:${LD_LIBRARY_PATH} RUST_BACKTRACE=1 RUST_LOG=vcx=debug,indy=debug RUST_TEST_THREADS=1 TEST_POOL_IP=10.0.0.2 cargo test --features "pool_tests agency_v2" tests::test_real_proof_for_protocol_type_v2 -- --exact

Removing irrelevant stuff this is
cargo test --features "pool_tests agency_v2" tests::test_real_proof_for_protocol_type_v2 -- --exact

The error message I get is this

+ cd vcx/libvcx

+ LIBRARY_PATH=./ LD_LIBRARY_PATH=./: RUST_BACKTRACE=1 RUST_LOG=vcx=debug,indy=debug RUST_TEST_THREADS=1 TEST_POOL_IP=10.0.0.2 cargo test --features pool_tests agency_v2 tests::test_real_proof_for_protocol_type_v2 -- --exact

    Blocking waiting for file lock on package cache

    Blocking waiting for file lock on package cache

error: Package `libvcx v0.4.2 (/home/jenkins/workspace/indy-sdk_indy-sdk-ci_PR-1944/vcx/libvcx)` does not have these features: `tests::test_real_proof_for_protocol_type_v2`

script returned exit code 101

Cargo thinks that tests::test_real_proof_for_protocol_type_v2 is in --features "pool_tests agency_v2" tests::test_real_proof_for_protocol_type_v2 is part of the features parameter.

Why? Or what is the correct call?
To me it looks like described here
https://doc.rust-lang.org/cargo/commands/cargo-test.html

thanks
Axel

axelnennker@Axels-MBP ~ $ rustc --version
rustc 1.38.0 (625451e37 2019-09-23)
axelnennker@Axels-MBP ~ $ 

I'm not sure why this isn't working as expected, but as a workaround, the test name can go after the -- separator. For example:

cargo test --features "pool_tests agency_v2" -- tests::test_real_proof_for_protocol_type_v2 --exact

This looks like the same problem I ran into with features.

1 Like

Thanks, we followed your suggestion
https://github.com/hyperledger/indy-sdk/pull/1944/files#diff-8a588b23f190f9b81bfba4f90433163b

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.