Merge #10053: [test] Allow functional test cases to be skipped
0c1ade6
Skip rpcbind_test if OS/network requirements are not met. (John Newbery)232b666
Allow test cases to be skipped (John Newbery) Tree-SHA512: d90c956ba6e27e53f422cba6267bdcc60faef9370a7e66b7f6480137f84d9a813442ac477b20fbbc540be2b4636928be910c46e221570ab3b9a5b9f0f11f7fc8
This commit is contained in:
commit
ca209230c8
3 changed files with 39 additions and 14 deletions
test/functional/test_framework
|
@ -27,9 +27,12 @@ from .util import (
|
|||
)
|
||||
from .authproxy import JSONRPCException
|
||||
|
||||
|
||||
class BitcoinTestFramework(object):
|
||||
|
||||
TEST_EXIT_PASSED = 0
|
||||
TEST_EXIT_FAILED = 1
|
||||
TEST_EXIT_SKIPPED = 77
|
||||
|
||||
def __init__(self):
|
||||
self.num_nodes = 4
|
||||
self.setup_clean_chain = False
|
||||
|
@ -182,11 +185,11 @@ class BitcoinTestFramework(object):
|
|||
print("".join(deque(open(f), MAX_LINES_TO_PRINT)))
|
||||
if success:
|
||||
self.log.info("Tests successful")
|
||||
sys.exit(0)
|
||||
sys.exit(self.TEST_EXIT_PASSED)
|
||||
else:
|
||||
self.log.error("Test failed. Test logging available at %s/test_framework.log", self.options.tmpdir)
|
||||
logging.shutdown()
|
||||
sys.exit(1)
|
||||
sys.exit(self.TEST_EXIT_FAILED)
|
||||
|
||||
def _start_logging(self):
|
||||
# Add logger and logging handlers
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue