You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

bitcoin-util-test.py 871B

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/env python
  2. # Copyright 2014 BitPay, Inc.
  3. # Distributed under the MIT software license, see the accompanying
  4. # file COPYING or http://www.opensource.org/licenses/mit-license.php.
  5. from __future__ import division,print_function,unicode_literals
  6. import os
  7. import bctest
  8. import buildenv
  9. import argparse
  10. help_text="""Test framework for bitcoin utils.
  11. Runs automatically during `make check`.
  12. Can also be run manually from the src directory by specifiying the source directory:
  13. test/bitcoin-util-test.py --src=[srcdir]
  14. """
  15. if __name__ == '__main__':
  16. try:
  17. srcdir = os.environ["srcdir"]
  18. except:
  19. parser = argparse.ArgumentParser(description=help_text)
  20. parser.add_argument('-s', '--srcdir')
  21. args = parser.parse_args()
  22. srcdir = args.srcdir
  23. bctest.bctester(srcdir + "/test/data", "bitcoin-util-test.json", buildenv)