Skip to content

Commit 3192e52

Browse files
author
MarcoFalke
committed
Merge #9956: Reorganise qa directory
63d66ba Move src/test/bitcoin-util-test.py to test/util/bitcoin-util-test.py (John Newbery) 5b0bff4 Rename --enable-extended-rpc-tests to --enable-extended-functional-tests (John Newbery) a9bd622 Rename test/pull-tester/rpc-tests.py to test/functional/test_runner.py (John Newbery) c28ee91 Rename rpc-tests directory to functional (John Newbery) 00902c4 Rename qa directory to test (John Newbery) Tree-SHA512: ee7125c0c647d81590177beef2c8852c4ef76fdcf888096d9d4d360562a01d8d3b453345c3040487b2a043935bd1e7e80018f34462d6e02262bedbe23edcc576
2 parents 0c17afc + 63d66ba commit 3192e52

File tree

160 files changed

+252
-260
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+252
-260
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ coverage_percent.txt
101101
linux-coverage-build
102102
linux-build
103103
win32-build
104-
qa/pull-tester/tests_config.py
105-
qa/pull-tester/tests_config.ini
106-
qa/cache/*
104+
test/functional/config.ini
105+
test/util/buildenv.py
106+
test/cache/*
107107

108108
!src/leveldb*/Makefile
109109

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ script:
7070
- make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false )
7171
- export LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib
7272
- if [ "$RUN_TESTS" = "true" ]; then make $MAKEJOBS check VERBOSE=1; fi
73-
- if [ "$RUN_TESTS" = "true" ]; then qa/pull-tester/rpc-tests.py --coverage; fi
73+
- if [ "$RUN_TESTS" = "true" ]; then test/functional/test_runner.py --coverage; fi
7474
after_script:
7575
- echo $TRAVIS_COMMIT_RANGE
7676
- echo $TRAVIS_COMMIT_LOG

Makefile.am

Lines changed: 66 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \
6161

6262
COVERAGE_INFO = baseline_filtered_combined.info baseline.info \
6363
leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \
64-
baseline_filtered.info rpc_test.info rpc_test_filtered.info \
64+
baseline_filtered.info functional_test.info functional_test_filtered.info \
6565
leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info
6666

6767
dist-hook:
@@ -194,20 +194,20 @@ test_bitcoin.info: baseline_filtered_combined.info
194194
test_bitcoin_filtered.info: test_bitcoin.info
195195
$(LCOV) -r $< "/usr/include/*" -o $@
196196

197-
rpc_test.info: test_bitcoin_filtered.info
198-
-@TIMEOUT=15 python qa/pull-tester/rpc-tests.py $(EXTENDED_RPC_TESTS)
199-
$(LCOV) -c -d $(abs_builddir)/src --t rpc-tests -o $@
197+
functional_test.info: test_bitcoin_filtered.info
198+
-@TIMEOUT=15 python test/functional/test_runner.py $(EXTENDED_FUNCTIONAL_TESTS)
199+
$(LCOV) -c -d $(abs_builddir)/src --t functional-tests -o $@
200200
$(LCOV) -z -d $(abs_builddir)/src
201201
$(LCOV) -z -d $(abs_builddir)/src/leveldb
202202

203-
rpc_test_filtered.info: rpc_test.info
203+
functional_test_filtered.info: functional_test.info
204204
$(LCOV) -r $< "/usr/include/*" -o $@
205205

206206
test_bitcoin_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info
207207
$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@
208208

209-
total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info rpc_test_filtered.info
210-
$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -a rpc_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
209+
total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info functional_test_filtered.info
210+
$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -a functional_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
211211

212212
test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info
213213
$(GENHTML) -s $< -o $(@D)
@@ -223,14 +223,70 @@ endif
223223

224224
dist_noinst_SCRIPTS = autogen.sh
225225

226-
EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.py qa/rpc-tests $(DIST_CONTRIB) $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) $(BIN_CHECKS)
226+
EXTRA_DIST = $(top_srcdir)/share/genbuild.sh test/functional/test_runner.py test/functional $(DIST_CONTRIB) $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) $(BIN_CHECKS)
227+
228+
EXTRA_DIST += \
229+
test/util/bctest.py \
230+
test/util/bitcoin-util-test.py \
231+
test/util/data/bitcoin-util-test.json \
232+
test/util/data/blanktxv1.hex \
233+
test/util/data/blanktxv1.json \
234+
test/util/data/blanktxv2.hex \
235+
test/util/data/blanktxv2.json \
236+
test/util/data/tt-delin1-out.hex \
237+
test/util/data/tt-delin1-out.json \
238+
test/util/data/tt-delout1-out.hex \
239+
test/util/data/tt-delout1-out.json \
240+
test/util/data/tt-locktime317000-out.hex \
241+
test/util/data/tt-locktime317000-out.json \
242+
test/util/data/tx394b54bb.hex \
243+
test/util/data/txcreate1.hex \
244+
test/util/data/txcreate1.json \
245+
test/util/data/txcreate2.hex \
246+
test/util/data/txcreate2.json \
247+
test/util/data/txcreatedata1.hex \
248+
test/util/data/txcreatedata1.json \
249+
test/util/data/txcreatedata2.hex \
250+
test/util/data/txcreatedata2.json \
251+
test/util/data/txcreatedata_seq0.hex \
252+
test/util/data/txcreatedata_seq0.json \
253+
test/util/data/txcreatedata_seq1.hex \
254+
test/util/data/txcreatedata_seq1.json \
255+
test/util/data/txcreatemultisig1.hex \
256+
test/util/data/txcreatemultisig1.json \
257+
test/util/data/txcreatemultisig2.hex \
258+
test/util/data/txcreatemultisig2.json \
259+
test/util/data/txcreatemultisig3.hex \
260+
test/util/data/txcreatemultisig3.json \
261+
test/util/data/txcreatemultisig4.hex \
262+
test/util/data/txcreatemultisig4.json \
263+
test/util/data/txcreateoutpubkey1.hex \
264+
test/util/data/txcreateoutpubkey1.json \
265+
test/util/data/txcreateoutpubkey2.hex \
266+
test/util/data/txcreateoutpubkey2.json \
267+
test/util/data/txcreateoutpubkey3.hex \
268+
test/util/data/txcreateoutpubkey3.json \
269+
test/util/data/txcreatescript1.hex \
270+
test/util/data/txcreatescript1.json \
271+
test/util/data/txcreatescript2.hex \
272+
test/util/data/txcreatescript2.json \
273+
test/util/data/txcreatescript3.hex \
274+
test/util/data/txcreatescript3.json \
275+
test/util/data/txcreatescript4.hex \
276+
test/util/data/txcreatescript4.json \
277+
test/util/data/txcreatesignv1.hex \
278+
test/util/data/txcreatesignv1.json \
279+
test/util/data/txcreatesignv2.hex
227280

228281
CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
229282

283+
# This file is problematic for out-of-tree builds if it exists.
284+
DISTCLEANFILES = test/util/buildenv.pyc
285+
230286
.INTERMEDIATE: $(COVERAGE_INFO)
231287

232288
DISTCHECK_CONFIGURE_FLAGS = --enable-man
233289

234290
clean-local:
235-
rm -rf coverage_percent.txt test_bitcoin.coverage/ total.coverage/ qa/tmp/ cache/ $(OSX_APP)
236-
rm -rf qa/pull-tester/__pycache__
291+
rm -rf coverage_percent.txt test_bitcoin.coverage/ total.coverage/ test/tmp/ cache/ $(OSX_APP)
292+
rm -rf test/functional/__pycache__

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ submit new unit tests for old code. Unit tests can be compiled and run
5454
(assuming they weren't disabled in configure) with: `make check`. Further details on running
5555
and extending unit tests can be found in [/src/test/README.md](/src/test/README.md).
5656

57-
There are also [regression and integration tests](/qa) of the RPC interface, written
57+
There are also [regression and integration tests](/test), written
5858
in Python, that are run automatically on the build server.
59-
These tests can be run (if the [test dependencies](/qa) are installed) with: `qa/pull-tester/rpc-tests.py`
59+
These tests can be run (if the [test dependencies](/test) are installed) with: `test/functional/test_runner.py`
6060

6161
The Travis CI system makes sure that every pull request is built for Windows, Linux, and OS X, and that unit/sanity tests are run automatically.
6262

configure.ac

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ AC_ARG_ENABLE(bench,
124124
[use_bench=$enableval],
125125
[use_bench=yes])
126126

127-
AC_ARG_ENABLE([extended-rpc-tests],
128-
AS_HELP_STRING([--enable-extended-rpc-tests],[enable expensive RPC tests when using lcov (default no)]),
129-
[use_extended_rpc_tests=$enableval],
130-
[use_extended_rpc_tests=no])
127+
AC_ARG_ENABLE([extended-functional-tests],
128+
AS_HELP_STRING([--enable-extended-functional-tests],[enable expensive functional tests when using lcov (default no)]),
129+
[use_extended_functional_tests=$enableval],
130+
[use_extended_functional_tests=no])
131131

132132
AC_ARG_WITH([qrencode],
133133
[AS_HELP_STRING([--with-qrencode],
@@ -414,8 +414,8 @@ if test x$use_pkgconfig = xyes; then
414414
])
415415
fi
416416

417-
if test x$use_extended_rpc_tests != xno; then
418-
AC_SUBST(EXTENDED_RPC_TESTS, -extended)
417+
if test x$use_extended_functional_tests != xno; then
418+
AC_SUBST(EXTENDED_FUNCTIONAL_TESTS, --extended)
419419
fi
420420

421421
if test x$use_lcov = xyes; then
@@ -1147,10 +1147,12 @@ AC_SUBST(EVENT_PTHREADS_LIBS)
11471147
AC_SUBST(ZMQ_LIBS)
11481148
AC_SUBST(PROTOBUF_LIBS)
11491149
AC_SUBST(QR_LIBS)
1150-
AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist src/test/buildenv.py])
1151-
AC_CONFIG_FILES([qa/pull-tester/tests_config.ini],[chmod +x qa/pull-tester/tests_config.ini])
1150+
AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist test/functional/config.ini])
1151+
AC_CONFIG_FILES([test/util/buildenv.py],[chmod +x test/util/buildenv.py])
11521152
AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh])
1153-
AC_CONFIG_LINKS([qa/pull-tester/rpc-tests.py:qa/pull-tester/rpc-tests.py])
1153+
AC_CONFIG_LINKS([test/functional/test_runner.py:test/functional/test_runner.py])
1154+
AC_CONFIG_LINKS([test/util/bitcoin-util-test.py:test/util/bitcoin-util-test.py])
1155+
AC_CONFIG_LINKS([test/util/bctest.py:test/util/bctest.py])
11541156

11551157
dnl boost's m4 checks do something really nasty: they export these vars. As a
11561158
dnl result, they leak into secp256k1's configure and crazy things happen.
@@ -1198,8 +1200,8 @@ esac
11981200
dnl Replace the BUILDDIR path with the correct Windows path if compiling on Native Windows
11991201
case ${OS} in
12001202
*Windows*)
1201-
sed 's/BUILDDIR="\/\([[a-z]]\)/BUILDDIR="\1:/' qa/pull-tester/tests_config.py > qa/pull-tester/tests_config-2.py
1202-
mv qa/pull-tester/tests_config-2.py qa/pull-tester/tests_config.py
1203+
sed 's/BUILDDIR="\/\([[a-z]]\)/BUILDDIR="\1:/' test/functional/config.ini > test/functional/config-2.ini
1204+
mv test/functional/config-2.ini test/functional/config.ini
12031205
;;
12041206
esac
12051207

contrib/devtools/copyright_header.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
'src/tinyformat.h',
3333
'src/leveldb/util/env_win.cc',
3434
'src/crypto/ctaes/bench.c',
35-
'qa/rpc-tests/test_framework/bignum.py',
35+
'test/functional/test_framework/bignum.py',
3636
# python init:
3737
'*__init__.py',
3838
]

contrib/rpm/bitcoin.spec

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,8 @@ rm -f %{buildroot}%{_bindir}/test_*
311311

312312
%check
313313
make check
314-
pushd src
315-
srcdir=. test/bitcoin-util-test.py
316-
popd
317-
qa/pull-tester/rpc-tests.py -extended
314+
srcdir=src test/bitcoin-util-test.py
315+
test/functional/test_runner.py --extended
318316

319317
%post libs -p /sbin/ldconfig
320318

doc/developer-notes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Run with the -testnet option to run with "play bitcoins" on the test network, if
132132
are testing multi-machine code that needs to operate across the internet.
133133

134134
If you are testing something that can run on one machine, run with the -regtest option.
135-
In regression test mode, blocks can be created on-demand; see qa/rpc-tests/ for tests
135+
In regression test mode, blocks can be created on-demand; see test/functional/ for tests
136136
that run in -regtest mode.
137137

138138
**DEBUG_LOCKORDER**
@@ -252,7 +252,7 @@ Wallet
252252

253253
- *Rationale*: In RPC code that conditionally uses the wallet (such as
254254
`validateaddress`) it is easy to forget that global pointer `pwalletMain`
255-
can be NULL. See `qa/rpc-tests/disablewallet.py` for functional tests
255+
can be NULL. See `test/functional/disablewallet.py` for functional tests
256256
exercising the API with `-disablewallet`
257257

258258
- Include `db_cxx.h` (BerkeleyDB header) only when `ENABLE_WALLET` is set

qa/README.md

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

0 commit comments

Comments
 (0)