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

avoid setting {BITCOIND,ELEMENTSD}_EXE in setup #88

Merged
merged 1 commit into from
Aug 9, 2024

Conversation

RCasatta
Copy link
Contributor

@RCasatta RCasatta commented Aug 8, 2024

The logic of setting the env var inside the setup prevents user of other OS like nixos to run the tests (because the included binary are not working on nixos) and also to run other specific versions.
Setting those env vars is meant to be done in the dev environment not in the code, so this remove the setting of the env vars in the code.
With this users with bitcoind and elementsd in their PATH will work too.
The CI script will set the variables with the included binary only if they are not already set. This allows the CI to run while allowing other users to override with specific versions and run it locally.

Note this is different from what has been done upstream rust-bitcoin/rust-miniscript#538 but I think it's better

The logic of setting the env var inside the setup prevents user of other
OS like nixos to run the tests (because the included binary are not
working on nixos).
Setting those env vars is meant to be done in the dev environment not in
the code.
With this users with `bitcoind` and `elementsd` in their PATH will work
too.
The CI script will set the variables only if they are not already set.
(Allowing Nixos users to override and run it locally)
@apoelstra
Copy link
Member

This seems fine to me, but I wouldn't say it's "better" since the upstream one was designed so that cargo test would work everywhere while this seems to require the user call contrib/test.sh to get the env vars set correctly.

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 fb73306; the integration tests work for me in Nix; though after fully enabling my local CI there are a bunch of clippy and other issues everywhere :)

@RCasatta
Copy link
Contributor Author

RCasatta commented Aug 8, 2024

since the upstream one was designed so that cargo test would work everywhere

in upstream you must override BITCOIND_EXE or it would not work in nixos?
With this version cargo test continue working by setting BITCOIND_EXE but also if you have the executables in the PATH

@apoelstra
Copy link
Member

Oh, nice, I see.

@apoelstra
Copy link
Member

FYI I am holding off on merging until #88 gets in because I think I will be able to run my full local CI setup on the merge commit once that's done.

apoelstra added a commit that referenced this pull request Aug 9, 2024
e151a85 ci: bump fuzz MSRV to 1.65 (Andrew Poelstra)
b10c7a2 ci: add one more pin (Andrew Poelstra)
7c977b5 ForEachKey: clean up Concrete impl, remove Semantic impl (Andrew Poelstra)
8bc9311 doc: improve list of fields covered by sighash (Andrew Poelstra)
97b2229 clippy: unnecessary vecs (Andrew Poelstra)
8894215 clippy: miscellaneous simple fixes (Andrew Poelstra)
fcb2c3d clippy: canonical partial_cmp implementations (Andrew Poelstra)
bb88c18 clippy: replace fold calls with try_fold (Andrew Poelstra)
9815ca7 rustc: silence some "dead code" warnings (Andrew Poelstra)
4bab769 rustfmt: change to new notation (Andrew Poelstra)
de4e2ec cargo: lint unused cfg parameters (Andrew Poelstra)

Pull request description:

  Probably needs #88 to go in in parallel.

ACKs for top commit:
  RCasatta:
    utACK e151a85

Tree-SHA512: 80260fa8b38c543b437230b1f6e2464ef97a1755ff3565ae8204f7fbfe55fe0b5a197632de48dce8bc2e0170d0e30f5a3676314f62ce61cee8b5b0c6b7c83487
@apoelstra apoelstra merged commit 090ce14 into ElementsProject:master Aug 9, 2024
3 of 17 checks passed
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.

2 participants