Autofind rpc tests --srcdir #8018

pull jonasschnelli wants to merge 1 commits into bitcoin:master from jonasschnelli:2016/05/fix_test_srcdir changing 1 files +1 −1
  1. jonasschnelli commented at 10:41 AM on May 6, 2016: contributor

    No description provided.

  2. jonasschnelli added the label Tests on May 6, 2016
  3. in qa/rpc-tests/test_framework/test_framework.py:None in 91d84e2d9a outdated
     101 | @@ -102,7 +102,7 @@ def main(self):
     102 |                            help="Leave bitcoinds and test.* datadir on exit or error")
     103 |          parser.add_option("--noshutdown", dest="noshutdown", default=False, action="store_true",
     104 |                            help="Don't stop bitcoinds after the test execution")
     105 | -        parser.add_option("--srcdir", dest="srcdir", default="../../src",
     106 | +        parser.add_option("--srcdir", dest="srcdir", default=os.path.dirname(os.path.realpath(__file__))+"/../../../src",
    


    MarcoFalke commented at 1:25 PM on May 6, 2016:

    What about adding normpath here to resolve the ../../../?

    diff --git a/qa/rpc-tests/test_framework/test_framework.py b/qa/rpc-tests/test_framework/test_framework.py
    index 039f4e4..0b6d1b6 100755
    --- a/qa/rpc-tests/test_framework/test_framework.py
    +++ b/qa/rpc-tests/test_framework/test_framework.py
    @@ -105 +105 @@ class BitcoinTestFramework(object):
    -        parser.add_option("--srcdir", dest="srcdir", default=os.path.dirname(os.path.realpath(__file__))+"/../../../src",
    +        parser.add_option("--srcdir", dest="srcdir", default=os.path.normpath(os.path.dirname(os.path.realpath(__file__))+"/../../../src"),
    
  4. MarcoFalke commented at 1:26 PM on May 6, 2016: member

    Concept ACK.

    <!-- f9fa738 -->

  5. laanwj commented at 3:18 PM on May 6, 2016: member

    Concept ACK. But should it be build directory containing bitcoind/bitcoin-cli? After out-of-tree builds, there is no guarantee that the executables will be where the source is.

  6. jonasschnelli commented at 6:34 PM on May 6, 2016: contributor

    I only intended to change the default path for the default build setup. Its just annoying entering --srcdir=src all the time. IMO its more convenient to execute the test script from the root build dir instead from the qa/rpc-tests dir (which the current default path is referring to).

  7. laanwj commented at 9:00 AM on May 7, 2016: member

    I agree, just thought maybe we can change the help message at the same time. But not necessary here.

  8. MarcoFalke commented at 9:38 AM on May 7, 2016: member

    This is indeed a simple and uncontroversial improvement. Using BUILDDIR requires some refactoring, which can be done in a later pull. @jonasschnelli Mind to fix my above nit?

    before nit:

      --srcdir=SRCDIR       Source directory containing bitcoind/bitcoin-cli
                            (default: /home/marco/workspace/bitcoin/qa/rpc-
                            tests/test_framework/../../../src)
    

    after nit:

      --srcdir=SRCDIR       Source directory containing bitcoind/bitcoin-cli
                            (default: /home/marco/workspace/bitcoin/src)
    
  9. Autofind rpc tests --srcdir 5ea450834e
  10. jonasschnelli force-pushed on May 9, 2016
  11. jonasschnelli commented at 1:06 PM on May 9, 2016: contributor

    Fixed @MarcoFalke nit.

  12. MarcoFalke merged this on May 9, 2016
  13. MarcoFalke closed this on May 9, 2016

  14. MarcoFalke referenced this in commit 3e90fe6534 on May 9, 2016
  15. codablock referenced this in commit 9771b2019a on Sep 16, 2017
  16. codablock referenced this in commit 73c18d813f on Sep 19, 2017
  17. codablock referenced this in commit 24ff341025 on Dec 21, 2017
  18. 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-14 18:15 UTC

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