Share config between util and functional tests #10331

pull jnewbery wants to merge 5 commits into bitcoin:master from jnewbery:shared_util_function_test_config changing 9 files +157 −175
  1. jnewbery commented at 6:52 pm on May 3, 2017: member

    The functional tests and util tests both require a config file that is generated by ./configure. This PR merges those two config files into a single configuration file that can be shared by both tests.

    This PR also merges bctest.py and bitcoin-util-test.py into a single module. bctest.py is only used as an import by bitcoin-util-test.py. There’s no value in keeping it as a separate module, so this PR merges them into a single module to keep building and packaging simpler.

    Note - this bumps the required python version for bitcoin-util-test.py to python 3.

  2. Change bitcoin-util-test.py to use Python3 ce58e93ec0
  3. Change help_text in bitcoin-util-test.py to a docstring. e9265df15b
  4. Use an .ini config file for environment vars in bitcoin-util-test.py 89fcd3586c
  5. Use shared config file for functional and util tests
    The functional tests and util tests both require a config file that is
    generated by ./configure. This commit merges those two config
    files into a single configuration file that can be shared by both tests.
    
    The config from config.ini is put into a Namespace object to maintain
    the interface with bctest.py. A future commit could change this
    interface to use a dictionary instead of a namespace.
    95836c5eba
  6. jnewbery force-pushed on May 3, 2017
  7. jnewbery commented at 6:58 pm on May 3, 2017: member
    I have tested this locally, both for an in-tree and out-of-tree build.
  8. jonasschnelli added the label Tests on May 4, 2017
  9. jimmysong commented at 2:02 pm on May 7, 2017: contributor

    utACK 3fe56f2860a2226b1295ffaded5817098ac5898d

    Figuring out exactly how to test this

  10. jimmysong commented at 10:06 pm on May 7, 2017: contributor
    Tested ACK 3fe56f2860a2226b1295ffaded5817098ac5898d
  11. fanquake commented at 9:13 am on May 17, 2017: member
    Do we need to mention the Python 3 requirement somewhere?
  12. laanwj commented at 4:55 pm on May 23, 2017: member

    Do we need to mention the Python 3 requirement somewhere?

    So the difference is that ‘make check’ now requires Python 3? We could note it, thoough the same will be the case with #10044.

  13. jnewbery commented at 5:02 pm on May 23, 2017: member

    So the difference is that ‘make check’ now requires Python 3?

    Correct. That would also be the case for #10044 (see discussion here: https://botbot.me/freenode/bitcoin-core-dev/2017-03-16/?msg=82548466&page=5)

  14. sipa commented at 5:18 pm on May 23, 2017: member
    Concept ACK
  15. in test/util/bctest.py:125 in 3fe56f2860 outdated
    119-    raw_data = open(input_filename).read()
    120-    input_data = json.loads(raw_data)
    121-
    122-    failed_testcases = []
    123-
    124-    for testObj in input_data:
    


    TheBlueMatt commented at 3:52 pm on May 31, 2017:
    This block didnt make the move.
  16. TheBlueMatt commented at 3:52 pm on May 31, 2017: member
    Otherwise looks good.
  17. jnewbery commented at 4:07 pm on May 31, 2017: member
    Thanks @TheBlueMatt . Block restored in fixup commit. I’ll squash when this is ready for merge.
  18. MarcoFalke commented at 6:16 pm on June 6, 2017: member

    Please squash the two fixup commits.

  19. Merge bctest.py into bitcoin-util-test.py
    bctest.py is only used as an import by bitcoin-util-test.py. There's no
    value in keeping it as a separate module, so let's merge them into a
    single module to keep building and packaging simpler.
    
    bitcoin-test-util is importable as a module, so if any future modules
    really want to import the code from bctest.py, they can import
    bitcoin-test-util and call the bctest functions by name.
    8ad5bdef78
  20. jnewbery force-pushed on Jun 6, 2017
  21. jnewbery commented at 8:53 pm on June 6, 2017: member
    fixup commits squashed
  22. MarcoFalke commented at 9:06 pm on June 6, 2017: member
    utACK 8ad5bde
  23. MarcoFalke merged this on Jun 6, 2017
  24. MarcoFalke closed this on Jun 6, 2017

  25. MarcoFalke referenced this in commit 75e898c094 on Jun 6, 2017
  26. PastaPastaPasta referenced this in commit 438093ef51 on Jul 5, 2019
  27. PastaPastaPasta referenced this in commit 012326ea3d on Jul 5, 2019
  28. PastaPastaPasta referenced this in commit df565c6805 on Jul 6, 2019
  29. PastaPastaPasta referenced this in commit 648848b797 on Jul 8, 2019
  30. barrystyle referenced this in commit bb69002f2b on Jan 22, 2020
  31. 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-10-04 22:12 UTC

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