aboutsummaryrefslogtreecommitdiff
path: root/src/test/bitcoin-util-test.py
blob: 225b3324e9fc8cb42db46552869a1c22dee8d1d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env python
# Copyright 2014 BitPay, Inc.
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from __future__ import division,print_function,unicode_literals
import os
import bctest
import buildenv
import argparse

help_text="""Test framework for bitcoin utils.

Runs automatically during `make check`.

Can also be run manually from the src directory by specifiying the source directory:

test/bitcoin-util-test.py --src=[srcdir]
"""


if __name__ == '__main__':
    try:
        srcdir = os.environ["srcdir"]
    except:
        parser = argparse.ArgumentParser(description=help_text)
        parser.add_argument('-s', '--srcdir')
        args = parser.parse_args()
        srcdir = args.srcdir
    bctest.bctester(srcdir + "/test/data", "bitcoin-util-test.json", buildenv)