Skip to content

Commit eb3d1b3

Browse files
committed
Merge pull request #7135
fa3a38a [qa] pull-tester: Cleanup (run keypool, tidy stdout) (MarcoFalke)
2 parents 30c2d8c + fa3a38a commit eb3d1b3

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

qa/pull-tester/rpc-tests.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"""
2323

2424
import os
25+
import time
2526
import shutil
2627
import sys
2728
import subprocess
@@ -47,6 +48,10 @@
4748
passOn = ""
4849
p = re.compile("^--")
4950

51+
bold = ("","")
52+
if (os.name == 'posix'):
53+
bold = ('\033[0m', '\033[1m')
54+
5055
for arg in sys.argv[1:]:
5156
if arg == '--coverage':
5257
ENABLE_COVERAGE = 1
@@ -93,6 +98,7 @@
9398
'blockchain.py',
9499
'disablewallet.py',
95100
'sendheaders.py',
101+
'keypool.py',
96102
]
97103
testScriptsExt = [
98104
'bip65-cltv.py',
@@ -106,7 +112,6 @@
106112
'pruning.py',
107113
'forknotify.py',
108114
'invalidateblock.py',
109-
'keypool.py',
110115
# 'rpcbind_test.py', #temporary, bug in libevent, see #6655
111116
'smartfees.py',
112117
'maxblocksinflight.py',
@@ -127,7 +132,7 @@ def runtests():
127132

128133
if ENABLE_COVERAGE:
129134
coverage = RPCCoverage()
130-
print("Initializing coverage directory at %s" % coverage.dir)
135+
print("Initializing coverage directory at %s\n" % coverage.dir)
131136

132137
if(ENABLE_WALLET == 1 and ENABLE_UTILS == 1 and ENABLE_BITCOIND == 1):
133138
rpcTestDir = buildDir + '/qa/rpc-tests/'
@@ -142,10 +147,12 @@ def runtests():
142147
or run_extended
143148
or testScripts[i] in opts
144149
or re.sub(".py$", "", testScripts[i]) in opts ):
145-
print("Running testscript " + testScripts[i] + "...")
146150

151+
print("Running testscript %s%s%s ..." % (bold[1], testScripts[i], bold[0]))
152+
time0 = time.time()
147153
subprocess.check_call(
148154
rpcTestDir + testScripts[i] + flags, shell=True)
155+
print("Duration: %s s\n" % (int(time.time() - time0)))
149156

150157
# exit if help is called so we print just one set of
151158
# instructions
@@ -157,12 +164,14 @@ def runtests():
157164
for i in range(len(testScriptsExt)):
158165
if (run_extended or testScriptsExt[i] in opts
159166
or re.sub(".py$", "", testScriptsExt[i]) in opts):
167+
160168
print(
161169
"Running 2nd level testscript "
162-
+ testScriptsExt[i] + "...")
163-
170+
+ "%s%s%s ..." % (bold[1], testScriptsExt[i], bold[0]))
171+
time0 = time.time()
164172
subprocess.check_call(
165173
rpcTestDir + testScriptsExt[i] + flags, shell=True)
174+
print("Duration: %s s\n" % (int(time.time() - time0)))
166175

167176
if coverage:
168177
coverage.report_rpc_coverage()

0 commit comments

Comments
 (0)