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

Check if variable=yes instead of if var is set in travis.sh #782

Merged
merged 2 commits into from
Sep 15, 2020

Conversation

elichai
Copy link
Contributor

@elichai elichai commented Jul 30, 2020

Right now travis.sh checks if VALGRIND and CTIMETEST are set or not, but in travis.yml we explictly set them to yes so I think it's more intuitive to check if they're equal to yes such that setting CTIMETEST=no(or anything other than "yes") will disable the test.

pointed out by @real-or-random here: #696 (comment)

@elichai elichai changed the title travis.sh check if variable=yes instead of if var is set Check if variable=yes instead of if var is set in travis.sh Jul 30, 2020
@real-or-random
Copy link
Contributor

I think that's an improvement but then we should do this for BENCH too.

not-empty.
Before this, setting `VALGRIND=wat` was considered as true, and to make it
evaluate as false you had to unset the variable `VALGRIND=` but not it
checks if `VALGRIND=yes` and if it's not `yes` then it's evaluated to
false
@real-or-random
Copy link
Contributor

real-or-random commented Aug 7, 2020

Should we change the corresponding flags to no then, e.g., here?
https://github.com/bitcoin-core/secp256k1/blob/master/.travis.yml#L34

@elichai
Copy link
Contributor Author

elichai commented Aug 7, 2020

We could, but unlike BIGNUM=no which passes to configure and it will check that it contains something valid, here we only check if it's yes or not, we don't check if it's no or something else.
but maybe it's still worth it for consistency and readability

@real-or-random
Copy link
Contributor

but maybe it's still worth it for consistency and readability

That was my thought.

@real-or-random
Copy link
Contributor

@elichai do you want to make that change?

@elichai
Copy link
Contributor Author

elichai commented Sep 14, 2020

@elichai do you want to make that change?

Sorry, forgot about this. pushed now.

@real-or-random
Copy link
Contributor

ACK 34debf7

Would be nice to get a second ACK, then we can merge this before doing the travis changes of #813

Copy link
Contributor

@jonasnick jonasnick left a comment

Choose a reason for hiding this comment

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

ACK 34debf7

@jonasnick jonasnick merged commit 4ad408f into bitcoin-core:master Sep 15, 2020
@elichai elichai deleted the 2020-07-travis branch September 16, 2020 13:22
jasonbcox pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Sep 29, 2020
Summary:
```
Right now travis.sh checks if VALGRIND and CTIMETEST are set or not, but
in travis.yml we explictly set them to yes so I think it's more
intuitive to check if they're equal to yes such that setting
CTIMETEST=no(or anything other than "yes") will disable the test.

pointed out by @real-or-random here: #696 (comment)
```

Backport of secp256k1 [[bitcoin-core/secp256k1#782 | PR782]].

Includes the missing CTIMETEST variable for s390x.

Depends on D7630.

Test Plan: Run the Travis build.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D7631
deadalnix pushed a commit to Bitcoin-ABC/secp256k1 that referenced this pull request Sep 30, 2020
Summary:
```
Right now travis.sh checks if VALGRIND and CTIMETEST are set or not, but
in travis.yml we explictly set them to yes so I think it's more
intuitive to check if they're equal to yes such that setting
CTIMETEST=no(or anything other than "yes") will disable the test.

pointed out by @real-or-random here: #696 (comment)
```

Backport of secp256k1 [[bitcoin-core/secp256k1#782 | PR782]].

Includes the missing CTIMETEST variable for s390x.

Depends on D7630.

Test Plan: Run the Travis build.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D7631
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