mirror of
https://github.com/dashpay/dash.git
synced 2024-12-28 05:23:01 +01:00
[qa] pull-tester: Exit early when no tests are run
This commit is contained in:
parent
fa05e22e91
commit
faa4f22342
@ -41,15 +41,6 @@ if 'ENABLE_UTILS' not in vars():
|
|||||||
if 'ENABLE_ZMQ' not in vars():
|
if 'ENABLE_ZMQ' not in vars():
|
||||||
ENABLE_ZMQ=0
|
ENABLE_ZMQ=0
|
||||||
|
|
||||||
# python-zmq may not be installed. Handle this gracefully and with some helpful info
|
|
||||||
if ENABLE_ZMQ:
|
|
||||||
try:
|
|
||||||
import zmq
|
|
||||||
except ImportError as e:
|
|
||||||
print("WARNING: \"import zmq\" failed. Set ENABLE_ZMQ=0 or " \
|
|
||||||
"to run zmq tests, see dependency info in /qa/README.md.")
|
|
||||||
raise e
|
|
||||||
|
|
||||||
ENABLE_COVERAGE=0
|
ENABLE_COVERAGE=0
|
||||||
|
|
||||||
#Create a set to store arguments and create the passOn string
|
#Create a set to store arguments and create the passOn string
|
||||||
@ -76,11 +67,24 @@ if "BITCOIND" not in os.environ:
|
|||||||
if "BITCOINCLI" not in os.environ:
|
if "BITCOINCLI" not in os.environ:
|
||||||
os.environ["BITCOINCLI"] = buildDir + '/src/bitcoin-cli' + EXEEXT
|
os.environ["BITCOINCLI"] = buildDir + '/src/bitcoin-cli' + EXEEXT
|
||||||
|
|
||||||
#Disable Windows tests by default
|
|
||||||
if EXEEXT == ".exe" and "-win" not in opts:
|
if EXEEXT == ".exe" and "-win" not in opts:
|
||||||
print "Win tests currently disabled. Use -win option to enable"
|
# https://github.com/bitcoin/bitcoin/commit/d52802551752140cf41f0d9a225a43e84404d3e9
|
||||||
|
print "Win tests currently disabled by default. Use -win option to enable"
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
if not (ENABLE_WALLET == 1 and ENABLE_UTILS == 1 and ENABLE_BITCOIND == 1):
|
||||||
|
print "No rpc tests to run. Wallet, utils, and bitcoind must all be enabled"
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
|
# python-zmq may not be installed. Handle this gracefully and with some helpful info
|
||||||
|
if ENABLE_ZMQ:
|
||||||
|
try:
|
||||||
|
import zmq
|
||||||
|
except ImportError as e:
|
||||||
|
print("WARNING: \"import zmq\" failed. Set ENABLE_ZMQ=0 or " \
|
||||||
|
"to run zmq tests, see dependency info in /qa/README.md.")
|
||||||
|
raise e
|
||||||
|
|
||||||
#Tests
|
#Tests
|
||||||
testScripts = [
|
testScripts = [
|
||||||
'bip68-112-113-p2p.py',
|
'bip68-112-113-p2p.py',
|
||||||
@ -119,6 +123,9 @@ testScripts = [
|
|||||||
'p2p-versionbits-warning.py',
|
'p2p-versionbits-warning.py',
|
||||||
'importprunedfunds.py',
|
'importprunedfunds.py',
|
||||||
]
|
]
|
||||||
|
if ENABLE_ZMQ:
|
||||||
|
testScripts.append('zmq_test.py')
|
||||||
|
|
||||||
testScriptsExt = [
|
testScriptsExt = [
|
||||||
'bip9-softforks.py',
|
'bip9-softforks.py',
|
||||||
'bip65-cltv.py',
|
'bip65-cltv.py',
|
||||||
@ -143,11 +150,6 @@ testScriptsExt = [
|
|||||||
'pruning.py', # leave pruning last as it takes a REALLY long time
|
'pruning.py', # leave pruning last as it takes a REALLY long time
|
||||||
]
|
]
|
||||||
|
|
||||||
#Enable ZMQ tests
|
|
||||||
if ENABLE_ZMQ == 1:
|
|
||||||
testScripts.append('zmq_test.py')
|
|
||||||
|
|
||||||
|
|
||||||
def runtests():
|
def runtests():
|
||||||
coverage = None
|
coverage = None
|
||||||
|
|
||||||
@ -155,7 +157,6 @@ def runtests():
|
|||||||
coverage = RPCCoverage()
|
coverage = RPCCoverage()
|
||||||
print("Initializing coverage directory at %s\n" % coverage.dir)
|
print("Initializing coverage directory at %s\n" % coverage.dir)
|
||||||
|
|
||||||
if(ENABLE_WALLET == 1 and ENABLE_UTILS == 1 and ENABLE_BITCOIND == 1):
|
|
||||||
rpcTestDir = buildDir + '/qa/rpc-tests/'
|
rpcTestDir = buildDir + '/qa/rpc-tests/'
|
||||||
run_extended = '-extended' in opts
|
run_extended = '-extended' in opts
|
||||||
cov_flag = coverage.flag if coverage else ''
|
cov_flag = coverage.flag if coverage else ''
|
||||||
@ -200,9 +201,6 @@ def runtests():
|
|||||||
print("Cleaning up coverage data")
|
print("Cleaning up coverage data")
|
||||||
coverage.cleanup()
|
coverage.cleanup()
|
||||||
|
|
||||||
else:
|
|
||||||
print "No rpc tests to run. Wallet, utils, and bitcoind must all be enabled"
|
|
||||||
|
|
||||||
|
|
||||||
class RPCCoverage(object):
|
class RPCCoverage(object):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user