aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework/test_framework.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2017-03-24 13:57:36 +0100
committerMarcoFalke <falke.marco@gmail.com>2017-03-24 13:58:03 +0100
commitca209230c8e73745cf8cfc79f500c9c46e103306 (patch)
tree17512238d6e61f261f5dc1215aabb18e454856b9 /test/functional/test_framework/test_framework.py
parenta230b0588788dbe1ac84622aea169c577b381241 (diff)
parent0c1ade6a4b3921da6f8f2b17c8fc23e15edef426 (diff)
downloadbitcoin-ca209230c8e73745cf8cfc79f500c9c46e103306.tar.xz
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
Diffstat (limited to 'test/functional/test_framework/test_framework.py')
-rwxr-xr-xtest/functional/test_framework/test_framework.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py
index 8656a1ca6a..26a8aacb41 100755
--- a/test/functional/test_framework/test_framework.py
+++ b/test/functional/test_framework/test_framework.py
@@ -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