qa: Warn when specified test is not found #10374

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:Mf1705-qaWarnTestNotFound changing 2 files +17 −9
  1. MarcoFalke commented at 9:13 PM on May 9, 2017: member

    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.

  2. MarcoFalke added the label Tests on May 9, 2017
  3. in test/functional/test_runner.py:176 in fa57826bbf outdated
     172 | @@ -173,7 +173,7 @@ def main():
     173 |      args, unknown_args = parser.parse_known_args()
     174 |  
     175 |      # Create a set to store arguments and create the passon string
     176 | -    tests = set(arg for arg in unknown_args if arg[:2] != "--")
     177 | +    tests = [arg for arg in unknown_args if arg[:2] != "--"]
    


    jimmysong commented at 9:51 PM on May 9, 2017:

    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.

  4. in test/functional/test_runner.py:230 in fa57826bbf outdated
     228 | -            if exclude_test + ".py" in test_list:
     229 | -                test_list.remove(exclude_test + ".py")
     230 | +        tests_excl = [re.sub("\.py$", "", t) + ".py" for t in args.exclude.split(',')]
     231 | +        for exclude_test in tests_excl:
     232 | +            if exclude_test in test_list:
     233 | +                test_list.remove(exclude_test)
    


    jimmysong commented at 9:56 PM on May 9, 2017:

    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))

    MarcoFalke commented at 10:31 AM on May 14, 2017:

    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.

  5. jimmysong commented at 9:58 PM on May 9, 2017: contributor

    utACK fa57826bbf14e16a959b945a1cf74d2c58f257df

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

  6. in test/functional/test_runner.py:175 in fa57826bbf outdated
     172 | @@ -173,7 +173,7 @@ def main():
     173 |      args, unknown_args = parser.parse_known_args()
     174 |  
     175 |      # Create a set to store arguments and create the passon string
    


    jnewbery commented at 3:30 PM on May 10, 2017:

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

  7. jnewbery commented at 3:31 PM on May 10, 2017: member

    Tested ACK fa57826bbf14e16a959b945a1cf74d2c58f257df

  8. qa: Warn when specified test is not found fac79e4d18
  9. MarcoFalke force-pushed on May 14, 2017
  10. MarcoFalke commented at 10:39 AM on May 14, 2017: member

    Thx for the feedback. Updated doc with --amend

  11. laanwj commented at 6:12 AM on May 17, 2017: member

    utACK fac79e4

  12. laanwj merged this on May 17, 2017
  13. laanwj closed this on May 17, 2017

  14. laanwj referenced this in commit 541199788c on May 17, 2017
  15. MarcoFalke deleted the branch on Jun 6, 2017
  16. PastaPastaPasta referenced this in commit f25d6369a7 on Jun 10, 2019
  17. PastaPastaPasta referenced this in commit bcd5abe9d5 on Jun 11, 2019
  18. PastaPastaPasta referenced this in commit 7b2a40ffb9 on Jun 11, 2019
  19. PastaPastaPasta referenced this in commit 687d4b9176 on Jun 15, 2019
  20. PastaPastaPasta referenced this in commit 3c32ef83f2 on Jun 19, 2019
  21. PastaPastaPasta referenced this in commit 50d8aee482 on Jun 19, 2019
  22. PastaPastaPasta referenced this in commit fd72c4ce37 on Jun 19, 2019
  23. PastaPastaPasta referenced this in commit 49da1eb8a2 on Jun 19, 2019
  24. PastaPastaPasta referenced this in commit d95e6c0864 on Jun 19, 2019
  25. PastaPastaPasta referenced this in commit 3a11f1bd70 on Jun 20, 2019
  26. PastaPastaPasta referenced this in commit fc5f7cc00a on Jun 22, 2019
  27. PastaPastaPasta referenced this in commit 8e75c03946 on Jun 22, 2019
  28. PastaPastaPasta referenced this in commit 16d8822d01 on Jun 22, 2019
  29. PastaPastaPasta referenced this in commit 88476cf8fc on Jun 22, 2019
  30. PastaPastaPasta referenced this in commit 7c5cd719e6 on Jun 22, 2019
  31. PastaPastaPasta referenced this in commit 4dda381562 on Jun 24, 2019
  32. barrystyle referenced this in commit 1352be235a on Jan 22, 2020
  33. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 06:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me