Changeset View
Changeset View
Standalone View
Standalone View
test/util/bitcoin-util-test.py
Show All 32 Lines | def main(): | ||||
if verbose: | if verbose: | ||||
level = logging.DEBUG | level = logging.DEBUG | ||||
else: | else: | ||||
level = logging.ERROR | level = logging.ERROR | ||||
formatter = '%(asctime)s - %(levelname)s - %(message)s' | formatter = '%(asctime)s - %(levelname)s - %(message)s' | ||||
# Add the format/level to the logger | # Add the format/level to the logger | ||||
logging.basicConfig(format=formatter, level=level) | logging.basicConfig(format=formatter, level=level) | ||||
bctester(config["environment"]["SRCDIR"] + "/test/util/data", | bctester(os.path.join(config["environment"]["SRCDIR"], "test", | ||||
"bitcoin-util-test.json", config["environment"]) | "util", "data"), "bitcoin-util-test.json", config["environment"]) | ||||
def bctester(testDir, input_basename, buildenv): | def bctester(testDir, input_basename, buildenv): | ||||
""" Loads and parses the input file, runs all tests and reports results""" | """ Loads and parses the input file, runs all tests and reports results""" | ||||
input_filename = os.path.join(testDir, input_basename) | input_filename = os.path.join(testDir, input_basename) | ||||
raw_data = open(input_filename).read() | raw_data = open(input_filename).read() | ||||
input_data = json.loads(raw_data) | input_data = json.loads(raw_data) | ||||
▲ Show 20 Lines • Show All 138 Lines • Show Last 20 Lines |