diff options
Diffstat (limited to 'test/util')
-rwxr-xr-x | test/util/bitcoin-util-test.py | 9 | ||||
-rw-r--r-- | test/util/buildenv.py.in | 4 | ||||
-rw-r--r-- | test/util/config.ini.in | 11 |
3 files changed, 19 insertions, 5 deletions
diff --git a/test/util/bitcoin-util-test.py b/test/util/bitcoin-util-test.py index 0c67663edb..f85bd13f93 100755 --- a/test/util/bitcoin-util-test.py +++ b/test/util/bitcoin-util-test.py @@ -9,6 +9,7 @@ Runs automatically during `make check`. Can also be run manually.""" +import configparser import os import sys import argparse @@ -16,9 +17,15 @@ import logging if __name__ == '__main__': sys.path.append(os.path.dirname(os.path.abspath(__file__))) - import buildenv import bctest + config = configparser.ConfigParser() + config.read_file(open(os.path.dirname(__file__) + "/config.ini")) + + buildenv = argparse.Namespace(exeext=config["environment"]["EXEEXT"], + SRCDIR=config["environment"]["SRCDIR"], + BUILDDIR=config["environment"]["BUILDDIR"]) + parser = argparse.ArgumentParser(description=__doc__) parser.add_argument('-v', '--verbose', action='store_true') args = parser.parse_args() diff --git a/test/util/buildenv.py.in b/test/util/buildenv.py.in deleted file mode 100644 index 33030b0348..0000000000 --- a/test/util/buildenv.py.in +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env python -exeext="@EXEEXT@" -SRCDIR="@abs_top_srcdir@" -BUILDDIR="@abs_top_builddir@" diff --git a/test/util/config.ini.in b/test/util/config.ini.in new file mode 100644 index 0000000000..a1f8f09cec --- /dev/null +++ b/test/util/config.ini.in @@ -0,0 +1,11 @@ +# Copyright (c) 2013-2017 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +# These environment variables are set by the build process and read by +# test/util/bitcoin-util-test.py + +[environment] +SRCDIR=@abs_top_srcdir@ +BUILDDIR=@abs_top_builddir@ +EXEEXT=@EXEEXT@ |