Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_runner.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2014-2019 The Bitcoin Core developers | # Copyright (c) 2014-2019 The Bitcoin Core developers | ||||
# Copyright (c) 2017 The Bitcoin developers | # Copyright (c) 2017 The Bitcoin developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
"""Run regression test suite. | """Run regression test suite. | ||||
This module calls down into individual test cases via subprocess. It will | This module calls down into individual test cases via subprocess. It will | ||||
forward all unrecognized arguments onto the individual test scripts. | forward all unrecognized arguments onto the individual test scripts. | ||||
For a description of arguments recognized by test scripts, see | For a description of arguments recognized by test scripts, see | ||||
`test/functional/test_framework/test_framework.py:BitcoinTestFramework.main`. | `test/functional/test_framework/test_framework.py:BitcoinTestFramework.main`. | ||||
""" | """ | ||||
import argparse | import argparse | ||||
from collections import deque | |||||
import configparser | import configparser | ||||
import datetime | import datetime | ||||
import json | |||||
import logging | |||||
import multiprocessing | |||||
import os | import os | ||||
import time | import re | ||||
import shutil | import shutil | ||||
import sys | |||||
import subprocess | import subprocess | ||||
import sys | |||||
import tempfile | import tempfile | ||||
import re | |||||
import logging | |||||
import xml.etree.ElementTree as ET | |||||
import json | |||||
import threading | import threading | ||||
import multiprocessing | import time | ||||
from queue import Queue, Empty | |||||
import unittest | import unittest | ||||
import xml.etree.ElementTree as ET | |||||
from collections import deque | |||||
from queue import Empty, Queue | |||||
# Formatting. Default colors to empty strings. | # Formatting. Default colors to empty strings. | ||||
BOLD, GREEN, RED, GREY = ("", ""), ("", ""), ("", ""), ("", "") | BOLD, GREEN, RED, GREY = ("", ""), ("", ""), ("", ""), ("", "") | ||||
try: | try: | ||||
# Make sure python thinks it can write unicode to its stdout | # Make sure python thinks it can write unicode to its stdout | ||||
"\u2713".encode("utf_8").decode(sys.stdout.encoding) | "\u2713".encode("utf_8").decode(sys.stdout.encoding) | ||||
TICK = "✓ " | TICK = "✓ " | ||||
CROSS = "✖ " | CROSS = "✖ " | ||||
▲ Show 20 Lines • Show All 861 Lines • Show Last 20 Lines |