mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 11:32:46 +01:00
Use an .ini config file for environment vars in bitcoin-util-test.py
This commit is contained in:
parent
e9265df15b
commit
89fcd3586c
2
.gitignore
vendored
2
.gitignore
vendored
@ -80,7 +80,6 @@ Bitcoin-Qt.app
|
||||
# Unit-tests
|
||||
Makefile.test
|
||||
bitcoin-qt_test
|
||||
src/test/buildenv.py
|
||||
|
||||
# Resources cpp
|
||||
qrc_*.cpp
|
||||
@ -102,7 +101,6 @@ linux-coverage-build
|
||||
linux-build
|
||||
win32-build
|
||||
test/functional/config.ini
|
||||
test/util/buildenv.py
|
||||
test/cache/*
|
||||
|
||||
!src/leveldb*/Makefile
|
||||
|
@ -277,9 +277,6 @@ EXTRA_DIST += \
|
||||
|
||||
CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
|
||||
|
||||
# This file is problematic for out-of-tree builds if it exists.
|
||||
DISTCLEANFILES = test/util/buildenv.pyc
|
||||
|
||||
.INTERMEDIATE: $(COVERAGE_INFO)
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-man
|
||||
|
@ -1160,8 +1160,7 @@ AC_SUBST(EVENT_PTHREADS_LIBS)
|
||||
AC_SUBST(ZMQ_LIBS)
|
||||
AC_SUBST(PROTOBUF_LIBS)
|
||||
AC_SUBST(QR_LIBS)
|
||||
AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist test/functional/config.ini])
|
||||
AC_CONFIG_FILES([test/util/buildenv.py],[chmod +x test/util/buildenv.py])
|
||||
AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist test/functional/config.ini test/util/config.ini])
|
||||
AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh])
|
||||
AC_CONFIG_FILES([doc/Doxyfile])
|
||||
AC_CONFIG_LINKS([test/functional/test_runner.py:test/functional/test_runner.py])
|
||||
|
@ -9,6 +9,7 @@ Runs automatically during `make check`.
|
||||
|
||||
Can also be run manually."""
|
||||
|
||||
import configparser
|
||||
import os
|
||||
import sys
|
||||
import argparse
|
||||
@ -16,9 +17,15 @@ import logging
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
import buildenv
|
||||
import bctest
|
||||
|
||||
config = configparser.ConfigParser()
|
||||
config.read_file(open(os.path.dirname(__file__) + "/config.ini"))
|
||||
|
||||
buildenv = argparse.Namespace(exeext=config["environment"]["EXEEXT"],
|
||||
SRCDIR=config["environment"]["SRCDIR"],
|
||||
BUILDDIR=config["environment"]["BUILDDIR"])
|
||||
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument('-v', '--verbose', action='store_true')
|
||||
args = parser.parse_args()
|
||||
|
@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
exeext="@EXEEXT@"
|
||||
SRCDIR="@abs_top_srcdir@"
|
||||
BUILDDIR="@abs_top_builddir@"
|
11
test/util/config.ini.in
Normal file
11
test/util/config.ini.in
Normal file
@ -0,0 +1,11 @@
|
||||
# Copyright (c) 2013-2017 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
# These environment variables are set by the build process and read by
|
||||
# test/util/bitcoin-util-test.py
|
||||
|
||||
[environment]
|
||||
SRCDIR=@abs_top_srcdir@
|
||||
BUILDDIR=@abs_top_builddir@
|
||||
EXEEXT=@EXEEXT@
|
Loading…
Reference in New Issue
Block a user