Skip to content

Conversation

@sanket1729
Copy link
Member

@sanket1729 sanket1729 commented May 26, 2022

There are still some annoying warnings present for unused functions when they are used.
rust-lang/rust#46379

Later commits will remove the hacky integration test setup.

Running cargo test now should also run integration tests

Our testing infrastructure now takes a long time to build because we have more than 100 dependencies (transitive). But all of these are dev dependencies, so our library isn't getting bloated.

Fixes #361

Future commits will remove the hacky integration test setup. There are
still some annoying warnings present for ununsed functions when they are
really used.
rust-lang/rust#46379

Disambiguiate rand feature with dev dependancy

https://users.rust-lang.org/t/features-and-dependencies-cannot-have-the-same-name/47746

#[test]
fn tests_from_cpp() {
let cl = &setup::setup().client;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a little puzzled in understanding how this test could work, since once BitcoinD struct goes out of scope, the node is stopped

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setup returns BitcoinD. It never goes out of scope.

[dev-dependencies]
bitcoind = {version = "0.26.1", features=["22_0"]}
actual-rand = { package = "rand", version = "0.8.4"}
bitcoin = { version = "0.28", features = ["rand"]}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since there is rand anyway, can't we use sign_schnorr_with_aux_rand and remove the feature rand so that we don't have both bitcoin and bitcoin-with-rand?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adressing in a follow-up PR.

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 139324a

I did not read the code as carefully as Riccardo evidently did -- but on a light reading it all looks good (or at least, it all looks like it does integration testing and looks like it's confined to test-only parts of the codebase, and it succeeded on my local CI).

@sanket1729 sanket1729 merged commit 56207d5 into rust-bitcoin:master Jun 2, 2022
apoelstra added a commit that referenced this pull request Jun 3, 2022
92050de Remove bitcoin rand feature from integration testing (sanket1729)

Pull request description:

  Addresses [feedback ](#420 (comment)) #420 's review

ACKs for top commit:
  apoelstra:
    ACK 92050de
  RCasatta:
    ACK 92050de

Tree-SHA512: ad3dcc3631eb3ffd6de30d577d8a08756cbb4a2ff1670b21f4902422a2104bbfc8b161583a1ba3dd7368160e2dd51bac1d68c9332fc73a3a72d3c6b3ddcdabb4
heap-coder added a commit to heap-coder/rust-miniscript that referenced this pull request Sep 27, 2025
…ration tests via cargo test

139324a641d364e6c5f5c3659d81c937da7a935c Remove integration test code (sanket1729)
90b5f10d4343c61c9c3630770bba7d6f21143406 Remove warnings (sanket1729)
967b95e2e1ff4122c44e7b5d041cbeca5e7b897d Add support for running integration tests via cargo test (sanket1729)

Pull request description:

  There are still some annoying warnings present for unused functions when they are used.
  rust-lang/rust#46379

  Later commits will remove the hacky integration test setup.

  Running `cargo test` now should also run integration tests

  Our testing infrastructure now takes a long time to build because we have more than 100 dependencies (transitive). But all of these are dev dependencies, so our library isn't getting bloated.

  Fixes #361

ACKs for top commit:
  apoelstra:
    ACK 139324a641d364e6c5f5c3659d81c937da7a935c

Tree-SHA512: debf68fd0ac98cffa9c8c89964d6d1c45ee542fe17eb2fdab6295357efc06eb43a0412e6ed5d0fd7264a987989984eebb0c5b3bbf7169ecb780d31dce887cb0b
heap-coder added a commit to heap-coder/rust-miniscript that referenced this pull request Sep 27, 2025
…rom integration testing

92050de167119f3d6ed4d60451e7925d11121dd4 Remove bitcoin rand feature from integration testing (sanket1729)

Pull request description:

  Addresses [feedback ](rust-bitcoin/rust-miniscript#420 (comment)) #420 's review

ACKs for top commit:
  apoelstra:
    ACK 92050de167119f3d6ed4d60451e7925d11121dd4
  RCasatta:
    ACK 92050de167119f3d6ed4d60451e7925d11121dd4

Tree-SHA512: ad3dcc3631eb3ffd6de30d577d8a08756cbb4a2ff1670b21f4902422a2104bbfc8b161583a1ba3dd7368160e2dd51bac1d68c9332fc73a3a72d3c6b3ddcdabb4
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.

Move to bitcoind crate for integration testing

3 participants