[tests] skipped tests should clean up after themselves #10423

pull jnewbery wants to merge 1 commits into bitcoin:master from jnewbery:cleanup_skipped changing 3 files +37 −25
  1. jnewbery commented at 8:40 PM on May 18, 2017: member

    If a test is skipped, it doesn't clean up its temp directory. This PR fixes that so skipped tests' temp directories are cleaned up after the test is skipped. The temp directory can be left intact by using the --nocleanup argument as usual.

    Implementation: Define a SkipTest exception type. Catch it in the test_framework and go through the normal test teardown functionality. Similar to the SkipTest exception class in Python's standard unittest library @sdaftuar

  2. fanquake added the label Tests on May 18, 2017
  3. laanwj commented at 1:52 PM on May 19, 2017: member

    Concept ACK

  4. jnewbery commented at 2:26 PM on May 19, 2017: member

    This runs fine on my local pc but something is causing the tests to hang on Travis. I've pushed a temporary commit to increase travis logging.

  5. jnewbery renamed this:
    [tests] skipped tests should clean up after themselves
    [wip] [tests] skipped tests should clean up after themselves
    on May 19, 2017
  6. jnewbery force-pushed on May 19, 2017
  7. jnewbery force-pushed on May 19, 2017
  8. sdaftuar commented at 6:37 PM on May 19, 2017: member

    Concept ACK, though I'm also puzzled by the travis failures.

  9. [tests] skipped tests should clean up after themselves 930deb9b2c
  10. jnewbery force-pushed on May 22, 2017
  11. jnewbery force-pushed on May 22, 2017
  12. jnewbery force-pushed on May 22, 2017
  13. jnewbery force-pushed on May 22, 2017
  14. jnewbery commented at 9:23 PM on May 22, 2017: member

    930deb9b2c5a8234d430f0a739c97e1fc961ffad passes travis (at least on my fork). I think the earlier failure was perhaps spurious.

    This should now be ready for review.

  15. jnewbery renamed this:
    [wip] [tests] skipped tests should clean up after themselves
    [tests] skipped tests should clean up after themselves
    on May 22, 2017
  16. sdaftuar commented at 5:23 PM on May 24, 2017: member

    ACK

  17. MarcoFalke commented at 10:19 AM on May 25, 2017: member

    utACK 930deb9b2c5a8234d430f0a739c97e1fc961ffad

  18. in test/functional/test_framework/test_framework.py:157 in 930deb9b2c
     154 | -            success = True
     155 | +            success = TestStatus.PASSED
     156 |          except JSONRPCException as e:
     157 |              self.log.exception("JSONRPC error")
     158 | +        except SkipTest as e:
     159 | +            self.log.warning("Test Skipped: %s" % e.message)
    


    jimmysong commented at 2:43 AM on June 2, 2017:

    This is info elsewhere, should it really be warning?


    jnewbery commented at 3:22 AM on June 2, 2017:

    Yes - this log is replacing the logs in the individual test cases (rpcbind_test.py and zmq_test.py), which are currently warnings.

    The reason is that we always want the user to know if a test has been skipped.


    jimmysong commented at 3:55 AM on June 2, 2017:

    OK, I see. I thought the log.info below was also logging something similar. This is fine.

  19. jimmysong approved
  20. jimmysong commented at 2:56 AM on June 2, 2017: contributor

    Tested ACK. 930deb9b2c5a8234d430f0a739c97e1fc961ffad

  21. MarcoFalke merged this on Jun 2, 2017
  22. MarcoFalke closed this on Jun 2, 2017

  23. MarcoFalke referenced this in commit 1aefc94dd7 on Jun 2, 2017
  24. PastaPastaPasta referenced this in commit a6484f2c8c on Jun 20, 2019
  25. PastaPastaPasta referenced this in commit 5d12c5734b on Jun 20, 2019
  26. PastaPastaPasta referenced this in commit c375afab2e on Jun 22, 2019
  27. PastaPastaPasta referenced this in commit 05c7a1dffe on Jun 22, 2019
  28. PastaPastaPasta referenced this in commit 68fbfcd9ad on Jun 22, 2019
  29. PastaPastaPasta referenced this in commit d22143a38e on Jun 22, 2019
  30. PastaPastaPasta referenced this in commit ed9ee340fc on Jun 22, 2019
  31. PastaPastaPasta referenced this in commit 7436dc2bad on Jun 22, 2019
  32. PastaPastaPasta referenced this in commit 13965f7259 on Jun 22, 2019
  33. PastaPastaPasta referenced this in commit 638d124c48 on Jun 22, 2019
  34. PastaPastaPasta referenced this in commit 851f8496b5 on Jun 22, 2019
  35. PastaPastaPasta referenced this in commit 0fa2eb9e98 on Jun 22, 2019
  36. PastaPastaPasta referenced this in commit 70cd81cc8a on Jun 26, 2019
  37. barrystyle referenced this in commit 1eb151d781 on Jan 22, 2020
  38. DrahtBot 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-30 12:15 UTC

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