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

qa: Warn when specified test is not found #10374

Merged
merged 1 commit into from
May 17, 2017

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented May 9, 2017

This will warn on typos on tests provided manually on the command line.

Also, this comes with the new feature that the same test can be specified multiple times on the command line.

@maflcko maflcko added the Tests label May 9, 2017
Copy link
Contributor

@jimmysong jimmysong left a comment

Choose a reason for hiding this comment

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

utACK fa57826bbf14e16a959b945a1cf74d2c58f257df

Everything looks good other than a couple of nits. Will test once nits addressed.

@@ -173,7 +173,7 @@ def main():
args, unknown_args = parser.parse_known_args()

# Create a set to store arguments and create the passon string
tests = set(arg for arg in unknown_args if arg[:2] != "--")
tests = [arg for arg in unknown_args if arg[:2] != "--"]
Copy link
Contributor

Choose a reason for hiding this comment

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

This is great functionality to allow tests to be run multiple times. It might be useful to edit https://github.com/MarcoFalke/bitcoin/blob/Mf1705-qaWarnTestNotFound/test/README.md#functional-tests to specify that you can, in fact, run the same test a few times to catch intermittent errors.

tests_excl = [re.sub("\.py$", "", t) + ".py" for t in args.exclude.split(',')]
for exclude_test in tests_excl:
if exclude_test in test_list:
test_list.remove(exclude_test)
Copy link
Contributor

@jimmysong jimmysong May 9, 2017

Choose a reason for hiding this comment

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

This will only remove the first instance of exclude_test from test_list. It's now possible that there are multiple instances of the script from line 176 above. Something like this will work:

test_list = list(filter(lambda t: t == exclude_test, test_list))

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a feature. If you really want to specify the same test multiple times, and then exclude it again, you need to specify it multiple times as well. Though, I doubt this will ever be relevant.

Copy link
Contributor

@jnewbery jnewbery left a comment

Choose a reason for hiding this comment

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

Tested ACK fa57826bbf14e16a959b945a1cf74d2c58f257df

@@ -173,7 +173,7 @@ def main():
args, unknown_args = parser.parse_known_args()

# Create a set to store arguments and create the passon string
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: comment is now incorrect (since this is a list rather than a set)

@maflcko maflcko force-pushed the Mf1705-qaWarnTestNotFound branch from fa57826 to fac79e4 Compare May 14, 2017 10:39
@maflcko
Copy link
Member Author

maflcko commented May 14, 2017

Thx for the feedback. Updated doc with --amend

@laanwj
Copy link
Member

laanwj commented May 17, 2017

utACK fac79e4

@laanwj laanwj merged commit fac79e4 into bitcoin:master May 17, 2017
laanwj added a commit that referenced this pull request May 17, 2017
fac79e4 qa: Warn when specified test is not found (MarcoFalke)

Tree-SHA512: d11ecdde275309b12e23155f6cd8e26c99217436b5094a70dd51b95ae7688754227628dd9a801eb6a52ff3ebea4420938e2fc8e9dc9cd77a4dd5c28d2b822354
@maflcko maflcko deleted the Mf1705-qaWarnTestNotFound branch June 6, 2017 14:28
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 10, 2019
fac79e4 qa: Warn when specified test is not found (MarcoFalke)

Tree-SHA512: d11ecdde275309b12e23155f6cd8e26c99217436b5094a70dd51b95ae7688754227628dd9a801eb6a52ff3ebea4420938e2fc8e9dc9cd77a4dd5c28d2b822354
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 11, 2019
fac79e4 qa: Warn when specified test is not found (MarcoFalke)

Tree-SHA512: d11ecdde275309b12e23155f6cd8e26c99217436b5094a70dd51b95ae7688754227628dd9a801eb6a52ff3ebea4420938e2fc8e9dc9cd77a4dd5c28d2b822354
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 11, 2019
fac79e4 qa: Warn when specified test is not found (MarcoFalke)

Tree-SHA512: d11ecdde275309b12e23155f6cd8e26c99217436b5094a70dd51b95ae7688754227628dd9a801eb6a52ff3ebea4420938e2fc8e9dc9cd77a4dd5c28d2b822354
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 15, 2019
fac79e4 qa: Warn when specified test is not found (MarcoFalke)

Tree-SHA512: d11ecdde275309b12e23155f6cd8e26c99217436b5094a70dd51b95ae7688754227628dd9a801eb6a52ff3ebea4420938e2fc8e9dc9cd77a4dd5c28d2b822354
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 19, 2019
fac79e4 qa: Warn when specified test is not found (MarcoFalke)

Tree-SHA512: d11ecdde275309b12e23155f6cd8e26c99217436b5094a70dd51b95ae7688754227628dd9a801eb6a52ff3ebea4420938e2fc8e9dc9cd77a4dd5c28d2b822354
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 19, 2019
fac79e4 qa: Warn when specified test is not found (MarcoFalke)

Tree-SHA512: d11ecdde275309b12e23155f6cd8e26c99217436b5094a70dd51b95ae7688754227628dd9a801eb6a52ff3ebea4420938e2fc8e9dc9cd77a4dd5c28d2b822354
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 19, 2019
fac79e4 qa: Warn when specified test is not found (MarcoFalke)

Tree-SHA512: d11ecdde275309b12e23155f6cd8e26c99217436b5094a70dd51b95ae7688754227628dd9a801eb6a52ff3ebea4420938e2fc8e9dc9cd77a4dd5c28d2b822354
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 19, 2019
fac79e4 qa: Warn when specified test is not found (MarcoFalke)

Tree-SHA512: d11ecdde275309b12e23155f6cd8e26c99217436b5094a70dd51b95ae7688754227628dd9a801eb6a52ff3ebea4420938e2fc8e9dc9cd77a4dd5c28d2b822354
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 19, 2019
fac79e4 qa: Warn when specified test is not found (MarcoFalke)

Tree-SHA512: d11ecdde275309b12e23155f6cd8e26c99217436b5094a70dd51b95ae7688754227628dd9a801eb6a52ff3ebea4420938e2fc8e9dc9cd77a4dd5c28d2b822354
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 20, 2019
fac79e4 qa: Warn when specified test is not found (MarcoFalke)

Tree-SHA512: d11ecdde275309b12e23155f6cd8e26c99217436b5094a70dd51b95ae7688754227628dd9a801eb6a52ff3ebea4420938e2fc8e9dc9cd77a4dd5c28d2b822354
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 22, 2019
fac79e4 qa: Warn when specified test is not found (MarcoFalke)

Tree-SHA512: d11ecdde275309b12e23155f6cd8e26c99217436b5094a70dd51b95ae7688754227628dd9a801eb6a52ff3ebea4420938e2fc8e9dc9cd77a4dd5c28d2b822354
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 22, 2019
fac79e4 qa: Warn when specified test is not found (MarcoFalke)

Tree-SHA512: d11ecdde275309b12e23155f6cd8e26c99217436b5094a70dd51b95ae7688754227628dd9a801eb6a52ff3ebea4420938e2fc8e9dc9cd77a4dd5c28d2b822354
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 22, 2019
fac79e4 qa: Warn when specified test is not found (MarcoFalke)

Tree-SHA512: d11ecdde275309b12e23155f6cd8e26c99217436b5094a70dd51b95ae7688754227628dd9a801eb6a52ff3ebea4420938e2fc8e9dc9cd77a4dd5c28d2b822354
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 22, 2019
fac79e4 qa: Warn when specified test is not found (MarcoFalke)

Tree-SHA512: d11ecdde275309b12e23155f6cd8e26c99217436b5094a70dd51b95ae7688754227628dd9a801eb6a52ff3ebea4420938e2fc8e9dc9cd77a4dd5c28d2b822354
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 22, 2019
fac79e4 qa: Warn when specified test is not found (MarcoFalke)

Tree-SHA512: d11ecdde275309b12e23155f6cd8e26c99217436b5094a70dd51b95ae7688754227628dd9a801eb6a52ff3ebea4420938e2fc8e9dc9cd77a4dd5c28d2b822354
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 24, 2019
fac79e4 qa: Warn when specified test is not found (MarcoFalke)

Tree-SHA512: d11ecdde275309b12e23155f6cd8e26c99217436b5094a70dd51b95ae7688754227628dd9a801eb6a52ff3ebea4420938e2fc8e9dc9cd77a4dd5c28d2b822354
barrystyle pushed a commit to PACGlobalOfficial/PAC that referenced this pull request Jan 22, 2020
fac79e4 qa: Warn when specified test is not found (MarcoFalke)

Tree-SHA512: d11ecdde275309b12e23155f6cd8e26c99217436b5094a70dd51b95ae7688754227628dd9a801eb6a52ff3ebea4420938e2fc8e9dc9cd77a4dd5c28d2b822354
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants