aboutsummaryrefslogtreecommitdiff
path: root/test/util/bitcoin-util-test.py
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2017-03-21 14:38:09 -0400
committerJohn Newbery <john@johnnewbery.com>2017-05-03 14:18:14 -0400
commit89fcd3586c9714a923b6a3147f60e43d5de74942 (patch)
tree4cf324feafd10daecd38edee3860a4c62f40b334 /test/util/bitcoin-util-test.py
parente9265df15b04178b40ab3bacfe6a944f0fb9ad27 (diff)
Use an .ini config file for environment vars in bitcoin-util-test.py
Diffstat (limited to 'test/util/bitcoin-util-test.py')
-rwxr-xr-xtest/util/bitcoin-util-test.py9
1 files changed, 8 insertions, 1 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()