tests: Make proxy_test work on travis servers without IPv6 #7489

pull laanwj wants to merge 1 commits into bitcoin:master from laanwj:2016_02_ipv6_tests_conditional changing 2 files +58 −31
  1. laanwj commented at 11:42 AM on February 9, 2016: member

    I'm embarrassed to have to write something like this in 2016, but it appears the new Travis servers with Ubuntu Trusty have no support for IPv6 (not even localhost!). Thus this pull checks for IPv6 and skips the IPv6 tests if the environment is lacking it.

    As we need trusty support for c++11 at some point, we'll need this.

    Ref:

  2. tests: Make proxy_test work on travis servers without IPv6 7539f1aae3
  3. laanwj added the label Tests on Feb 9, 2016
  4. in qa/rpc-tests/proxy_test.py:None in 7539f1aae3
      59 | +            self.conf3.af = socket.AF_INET6
      60 | +            self.conf3.addr = ('::1', 15000 + (os.getpid() % 1000))
      61 | +            self.conf3.unauth = True
      62 | +            self.conf3.auth = True
      63 | +        else:
      64 | +            print "Warning: testing without local IPv6 support"
    


    luke-jr commented at 11:45 AM on February 9, 2016:
    print("Warning: testing without local IPv6 support")
    

    Parenthesis needed for Py3 support.


    laanwj commented at 11:54 AM on February 9, 2016:

    Is there any python 3 compatibility at all? Adding parenthesis without the proper __future__ import will result in wacky output (in general - in this specific case, there is only one argument so it won't be printed as a string tuple). Probably should make

    from __future__ import division,print_function,unicode_literals
    

    mandatory for all python scripts (but not here).


    luke-jr commented at 7:11 AM on February 10, 2016:

    Is there any python 3 compatibility at all?

    Probably not, but let's not make it worse?

    Adding parenthesis without the proper future import will result in wacky output (in general - in this specific case, there is only one argument so it won't be printed as a string tuple).

    How so? There is only ever one argument to print, right?


    laanwj commented at 10:31 AM on February 10, 2016:

    How so? There is only ever one argument to print, right?

    Yes, but it is deceptive. It looks like a python3 print function, but when you add an argument it start to behave differently in py2 and py3. I'm ok with making the tests Python 3 compatible, but I'm not going to do so it in this pull.

  5. laanwj commented at 4:27 PM on March 16, 2016: member

    Is this still relevant @luke-jr @theuni, or has the ipv6 problem been solved?

  6. theuni commented at 2:08 AM on March 17, 2016: member

    @laanwj Afaik nothing's changed here wrt Travis

  7. laanwj merged this on Apr 1, 2016
  8. laanwj closed this on Apr 1, 2016

  9. laanwj referenced this in commit e9723cb273 on Apr 1, 2016
  10. MarcoFalke referenced this in commit 2d650c7091 on Apr 27, 2016
  11. MarcoFalke referenced this in commit 9ca957bcd4 on Apr 27, 2016
  12. braydonf referenced this in commit 13f771f910 on May 11, 2016
  13. braydonf referenced this in commit 9c5b709c6f on Jun 2, 2016
  14. braydonf referenced this in commit e56296ea52 on Oct 4, 2016
  15. nomnombtc referenced this in commit ce79366e9a on Nov 12, 2016
  16. nomnombtc referenced this in commit 86394b9b84 on Nov 12, 2016
  17. nomnombtc referenced this in commit 35b7356d72 on Nov 13, 2016
  18. sickpig referenced this in commit e197a37859 on Nov 14, 2016
  19. nomnombtc referenced this in commit 76a019fadb on Nov 22, 2016
  20. sickpig referenced this in commit 02916860ea on Jan 4, 2017
  21. zkbot referenced this in commit 5f542fbc2e on Nov 27, 2019
  22. zkbot referenced this in commit 8c4b540254 on Dec 2, 2019
  23. zkbot referenced this in commit 1b133c4510 on Dec 2, 2019
  24. zkbot referenced this in commit fbe6fcfc05 on Dec 2, 2019
  25. zkbot referenced this in commit 2d4b6f9cc2 on Dec 3, 2019
  26. DrahtBot locked this on Sep 8, 2021
Labels

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-13 15:15 UTC

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