Skip to content

Commit 75e898c

Browse files
author
MarcoFalke
committed
Merge #10331: Share config between util and functional tests
8ad5bde Merge bctest.py into bitcoin-util-test.py (John Newbery) 95836c5 Use shared config file for functional and util tests (John Newbery) 89fcd35 Use an .ini config file for environment vars in bitcoin-util-test.py (John Newbery) e9265df Change help_text in bitcoin-util-test.py to a docstring. (John Newbery) ce58e93 Change bitcoin-util-test.py to use Python3 (John Newbery) Tree-SHA512: 66dab0b4a8546aee0dfaef134a165f1447aff4c0ec335754bbc7d9e55909721c62f09cdbf4b22d02ac1fcd5a9b66780f91e1cc4d8687fae7288cc9072a23a78f
2 parents 2805d60 + 8ad5bde commit 75e898c

File tree

9 files changed

+157
-175
lines changed

9 files changed

+157
-175
lines changed

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ Bitcoin-Qt.app
8080
# Unit-tests
8181
Makefile.test
8282
bitcoin-qt_test
83-
src/test/buildenv.py
8483

8584
# Resources cpp
8685
qrc_*.cpp
@@ -101,8 +100,7 @@ coverage_percent.txt
101100
linux-coverage-build
102101
linux-build
103102
win32-build
104-
test/functional/config.ini
105-
test/util/buildenv.py
103+
test/config.ini
106104
test/cache/*
107105

108106
!src/leveldb*/Makefile

Makefile.am

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ dist_noinst_SCRIPTS = autogen.sh
223223
EXTRA_DIST = $(top_srcdir)/share/genbuild.sh test/functional/test_runner.py test/functional $(DIST_CONTRIB) $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) $(BIN_CHECKS)
224224

225225
EXTRA_DIST += \
226-
test/util/bctest.py \
227226
test/util/bitcoin-util-test.py \
228227
test/util/data/bitcoin-util-test.json \
229228
test/util/data/blanktxv1.hex \
@@ -277,9 +276,6 @@ EXTRA_DIST += \
277276

278277
CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
279278

280-
# This file is problematic for out-of-tree builds if it exists.
281-
DISTCLEANFILES = test/util/buildenv.pyc
282-
283279
.INTERMEDIATE: $(COVERAGE_INFO)
284280

285281
DISTCHECK_CONFIGURE_FLAGS = --enable-man

configure.ac

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,13 +1161,11 @@ AC_SUBST(EVENT_PTHREADS_LIBS)
11611161
AC_SUBST(ZMQ_LIBS)
11621162
AC_SUBST(PROTOBUF_LIBS)
11631163
AC_SUBST(QR_LIBS)
1164-
AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist test/functional/config.ini])
1165-
AC_CONFIG_FILES([test/util/buildenv.py],[chmod +x test/util/buildenv.py])
1164+
AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist test/config.ini])
11661165
AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh])
11671166
AC_CONFIG_FILES([doc/Doxyfile])
11681167
AC_CONFIG_LINKS([test/functional/test_runner.py:test/functional/test_runner.py])
11691168
AC_CONFIG_LINKS([test/util/bitcoin-util-test.py:test/util/bitcoin-util-test.py])
1170-
AC_CONFIG_LINKS([test/util/bctest.py:test/util/bctest.py])
11711169

11721170
dnl boost's m4 checks do something really nasty: they export these vars. As a
11731171
dnl result, they leak into secp256k1's configure and crazy things happen.
@@ -1215,8 +1213,8 @@ esac
12151213
dnl Replace the BUILDDIR path with the correct Windows path if compiling on Native Windows
12161214
case ${OS} in
12171215
*Windows*)
1218-
sed 's/BUILDDIR="\/\([[a-z]]\)/BUILDDIR="\1:/' test/functional/config.ini > test/functional/config-2.ini
1219-
mv test/functional/config-2.ini test/functional/config.ini
1216+
sed 's/BUILDDIR="\/\([[a-z]]\)/BUILDDIR="\1:/' test/config.ini > test/config-2.ini
1217+
mv test/config-2.ini test/config.ini
12201218
;;
12211219
esac
12221220

src/Makefile.test.include

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ bitcoin_test_clean : FORCE
148148

149149
check-local:
150150
@echo "Running test/util/bitcoin-util-test.py..."
151-
$(PYTHON) $(top_builddir)/test/util/bitcoin-util-test.py
151+
$(top_builddir)/test/util/bitcoin-util-test.py
152152
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check
153153
if EMBEDDED_UNIVALUE
154154
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C univalue check

test/functional/config.ini.in renamed to test/config.ini.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

55
# These environment variables are set by the build process and read by
6-
# test/functional/test_runner.py
6+
# test/functional/test_runner.py and test/util/bitcoin-util-test.py
77

88
[environment]
99
SRCDIR=@abs_top_srcdir@

test/functional/test_runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def main():
180180

181181
# Read config generated by configure.
182182
config = configparser.ConfigParser()
183-
configfile = os.path.abspath(os.path.dirname(__file__)) + "/config.ini"
183+
configfile = os.path.abspath(os.path.dirname(__file__)) + "/../config.ini"
184184
config.read_file(open(configfile))
185185

186186
passon_args.append("--configfile=%s" % configfile)

test/util/bctest.py

Lines changed: 0 additions & 139 deletions
This file was deleted.

0 commit comments

Comments
 (0)