mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-10 19:43:13 +02:00
Use an .ini config file for environment vars in bitcoin-util-test.py
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user