()
| 20 | import sys |
| 21 | |
| 22 | def main(): |
| 23 | config = configparser.ConfigParser() |
| 24 | config.optionxform = str |
| 25 | config.read_file(open(os.path.join(os.path.dirname(__file__), "../config.ini"), encoding="utf8")) |
| 26 | env_conf = dict(config.items('environment')) |
| 27 | |
| 28 | parser = argparse.ArgumentParser(description=__doc__) |
| 29 | parser.add_argument('-v', '--verbose', action='store_true') |
| 30 | args = parser.parse_args() |
| 31 | verbose = args.verbose |
| 32 | |
| 33 | if verbose: |
| 34 | level = logging.DEBUG |
| 35 | else: |
| 36 | level = logging.ERROR |
| 37 | formatter = '%(asctime)s - %(levelname)s - %(message)s' |
| 38 | # Add the format/level to the logger |
| 39 | logging.basicConfig(format=formatter, level=level) |
| 40 | |
| 41 | bctester(os.path.join(env_conf["SRCDIR"], "test", "util", "data"), "bitcoin-util-test.json", env_conf) |
| 42 | |
| 43 | def bctester(testDir, input_basename, buildenv): |
| 44 | """ Loads and parses the input file, runs all tests and reports results""" |
no test coverage detected