Ugly hack to print out tests as they are run to mitigate travis timeouts #8633

pull JeremyRubin wants to merge 1 commits into bitcoin:master from JeremyRubin:test-driver-hack changing 1 files +1 −0
  1. JeremyRubin commented at 3:31 am on August 31, 2016: contributor

    This hack edits the test-driver to output the test suite’s stdout (tee’ing it to the file rather than redirecting) and passes -l test_suite so that stuck tests can be seen.

    Some hack like this is needed in order for test suites that take a long time, travis will assume they are dead and fail after 10 minutes. (This also helps debug which unittests may be slow). There may be a cleaner way, but as far as I can tell, this is the simplest.

  2. Ugly hack to print out tests as they are run to mitigate travis timeouts. Someone with more knowledge here should fix this 6ff300c612
  3. fanquake added the label Tests on Aug 31, 2016
  4. laanwj commented at 12:01 pm on September 1, 2016: member
    @theuni @MarcoFalke agree with this approach?
  5. theuni commented at 6:19 pm on September 1, 2016: member
    I’m hitting a slightly different problem here where the boost test itself appears to be taking >10min. I addressed that here: https://github.com/bitcoin/bitcoin/pull/8631/commits/195f143df82694ddfb92c7fc4c667c1f6ef92211, which simply skips the automake test harness altogether for travis. Assuming that works, I think I’d prefer that approach.
  6. JeremyRubin commented at 6:59 pm on September 1, 2016: contributor

    @theuni try with #8632; the problem (for me) was super slow prevector_tests.

    I think that I prefer my hack given the output is “-l test_suite” which shows you the names of the tests as they go by, not just an arbitrary progress meter.

    (I prefer how you get the progress bar to my hack. My make-fu was not strong enough to figure that out. Can you get the loglevel set to -l test_suite and tee it?)

  7. JeremyRubin commented at 1:41 pm on September 4, 2016: contributor

    I think I found a nice compromise:

    https://github.com/bitcoin/bitcoin/compare/master...JeremyRubin:test-driver-hack2

    This version only runs the sed command in the travis build script.

    If this is preferred I can PR it.

  8. MarcoFalke commented at 1:16 pm on September 9, 2016: member

    Travis will time out after 10 min and if the unit tests take longer than that, we have other issues.

    Apart from that, I think it is useful to see how long each test section takes.

  9. JeremyRubin commented at 5:38 pm on September 9, 2016: contributor

    @MarcoFalke Well, sometimes it can be hard to reproduce why a test is timing out locally & eat a lot of dev time to build windows or whatever.

    This also means that if tests ever grow to take more than 10 minutes (just because there are a lot of them) it will keep working so long as no individual test is that long. (If only we had so many tests).

  10. MarcoFalke commented at 6:54 pm on September 9, 2016: member

    I’d prefer that test_bitcoin does this by default. (I know there is test_bitcoin -p, but it does not show the current test and the time it took for each test)

    This is probably what you meant with

    There may be a cleaner way, but as far as I can tell, this is the simplest.

    I am fine with this being merged “temporarily”.

  11. laanwj commented at 5:04 am on September 22, 2016: member

    I’d prefer that test_bitcoin does this by default. (I know there is test_bitcoin -p, but it does not show the current test and the time it took for each test)

    I’m not so sure. Tests that pass ideally should generate no output, to make it more efficient to find what went wrong. It’s frustrating to have to browse through thousands of debug messages to find out that error that caused travis to fail.

    For temporary debugging it’s ok of course.

  12. MarcoFalke commented at 10:27 am on September 22, 2016: member

    Ok, then this seems too controversial…

    If the only goal is to prevent travis from timing out, there is travis_wait as an alternative https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received

  13. MarcoFalke commented at 5:01 pm on September 30, 2016: member
    @JeremyRubin Closing as this seems too controversial. Though, I think something like https://github.com/bitcoin/bitcoin/compare/master...JeremyRubin:test-driver-hack2 or 195f143 could go in easier if you still need it.
  14. MarcoFalke closed this on Sep 30, 2016

  15. 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: 2024-12-19 03:12 UTC

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