No description provided.
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-
jonasschnelli commented at 10:41 AM on May 6, 2016: contributor
- jonasschnelli added the label Tests on May 6, 2016
-
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"),MarcoFalke commented at 1:26 PM on May 6, 2016: memberConcept ACK.
<!-- f9fa738 -->
laanwj commented at 3:18 PM on May 6, 2016: memberConcept 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.jonasschnelli commented at 6:34 PM on May 6, 2016: contributorI only intended to change the default path for the default build setup. Its just annoying entering
--srcdir=srcall the time. IMO its more convenient to execute the test script from the root build dir instead from theqa/rpc-testsdir (which the current default path is referring to).laanwj commented at 9:00 AM on May 7, 2016: memberI agree, just thought maybe we can change the help message at the same time. But not necessary here.
MarcoFalke commented at 9:38 AM on May 7, 2016: memberThis 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)Autofind rpc tests --srcdir 5ea450834ejonasschnelli force-pushed on May 9, 2016jonasschnelli commented at 1:06 PM on May 9, 2016: contributorFixed @MarcoFalke nit.
MarcoFalke merged this on May 9, 2016MarcoFalke closed this on May 9, 2016MarcoFalke referenced this in commit 3e90fe6534 on May 9, 2016codablock referenced this in commit 9771b2019a on Sep 16, 2017codablock referenced this in commit 73c18d813f on Sep 19, 2017codablock referenced this in commit 24ff341025 on Dec 21, 2017MarcoFalke locked this on Sep 8, 2021ContributorsLabels
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
More mirrored repositories can be found on mirror.b10c.me