neobytes/src/test/bitcoin-util-test.py

30 lines
871 B
Python
Raw Normal View History

#!/usr/bin/env python
2014-08-19 16:28:58 +02:00
# Copyright 2014 BitPay, Inc.
2014-12-13 05:09:33 +01:00
# Distributed under the MIT software license, see the accompanying
2014-08-19 16:28:58 +02:00
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from __future__ import division,print_function,unicode_literals
2014-08-19 16:28:58 +02:00
import os
import bctest
import buildenv
import argparse
2014-08-19 16:28:58 +02:00
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:
2014-08-19 16:28:58 +02:00
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)