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

Make test.sh test and build secp256k1-sys #256

Merged
merged 1 commit into from Dec 23, 2020
Merged

Make test.sh test and build secp256k1-sys #256

merged 1 commit into from Dec 23, 2020

Conversation

elichai
Copy link
Member

@elichai elichai commented Dec 18, 2020

There are currently 2 tests in secp256k1-sys and our CI doesn't run them.
This fixes that, but instead of adding another section to tests.sh I added secp256k1-sys to the workspace and made the builds and tests run on the whole workspace.
I had to exclude no_std_test from the workspace because it only works on nightly.

I also fixed a bug where if you pass both DO_ASAN=true and DO_BENCH=true it will try to do the benchmarks on no_std_test

@elichai
Copy link
Member Author

elichai commented Dec 18, 2020

Damn it. of course 1.29 doesn't have the --workspace flag.
at least there's the --all which does the same thing (even though it's deprecated now)

@apoelstra
Copy link
Member

concept ACK.

I'm surprised you need --all. IIRC if you run cargo build or cargo test in the root of a workspace it'll run the build/test on all crates in the workspace?

@elichai
Copy link
Member Author

elichai commented Dec 22, 2020

concept ACK.

I'm surprised you need --all. IIRC if you run cargo build or cargo test in the root of a workspace it'll run the build/test on all crates in the workspace?

It sounds like you're right, but for some reason I don't see those tests running without --all and if I add panics they don't fail

The default members of a workspace can be set explicitly with the workspace.default-members key in the root manifest. If this is not set, a virtual workspace will include all workspace members (equivalent to passing --workspace), and a non-virtual workspace will include only the root crate itself.

https://www.mankier.com/1/cargo-test#Options-Package_Selection

I'll try to find time to look into it and maybe open/find a cargo bug

apoelstra
apoelstra previously approved these changes Dec 23, 2020
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 d95cb53

@apoelstra
Copy link
Member

Just kidding. Needs rebase.

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 21f231b

Cool find with this VERBOSE variable.

@apoelstra apoelstra merged commit 91eea11 into master Dec 23, 2020
@apoelstra apoelstra deleted the workspace branch December 23, 2020 17:58
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.

None yet

2 participants