Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/test_framework.py
Show First 20 Lines • Show All 126 Lines • ▼ Show 20 Lines | def main(self): | ||||
parser.add_argument("--configfile", dest="configfile", default=os.path.abspath(os.path.dirname(os.path.realpath( | parser.add_argument("--configfile", dest="configfile", default=os.path.abspath(os.path.dirname(os.path.realpath( | ||||
__file__)) + "/../../config.ini"), help="Location of the test framework config file (default: %(default)s)") | __file__)) + "/../../config.ini"), help="Location of the test framework config file (default: %(default)s)") | ||||
parser.add_argument("--pdbonfailure", dest="pdbonfailure", default=False, action="store_true", | parser.add_argument("--pdbonfailure", dest="pdbonfailure", default=False, action="store_true", | ||||
help="Attach a python debugger if test fails") | help="Attach a python debugger if test fails") | ||||
parser.add_argument("--usecli", dest="usecli", default=False, action="store_true", | parser.add_argument("--usecli", dest="usecli", default=False, action="store_true", | ||||
help="use bitcoin-cli instead of RPC for all commands") | help="use bitcoin-cli instead of RPC for all commands") | ||||
parser.add_argument("--perf", dest="perf", default=False, action="store_true", | parser.add_argument("--perf", dest="perf", default=False, action="store_true", | ||||
help="profile running nodes with perf for the duration of the test") | help="profile running nodes with perf for the duration of the test") | ||||
parser.add_argument("--valgrind", dest="valgrind", default=False, action="store_true", | |||||
help="run nodes under the valgrind memory error detector: expect at least a ~10x slowdown, valgrind 3.14 or later required") | |||||
parser.add_argument("--randomseed", type=int, | parser.add_argument("--randomseed", type=int, | ||||
help="set a random seed for deterministically reproducing a previous test run") | help="set a random seed for deterministically reproducing a previous test run") | ||||
parser.add_argument("--with-axionactivation", dest="axionactivation", default=False, action="store_true", | parser.add_argument("--with-axionactivation", dest="axionactivation", default=False, action="store_true", | ||||
help="Activate axion update on timestamp {}".format(TIMESTAMP_IN_THE_PAST)) | help="Activate axion update on timestamp {}".format(TIMESTAMP_IN_THE_PAST)) | ||||
self.add_options(parser) | self.add_options(parser) | ||||
self.options = parser.parse_args() | self.options = parser.parse_args() | ||||
▲ Show 20 Lines • Show All 240 Lines • ▼ Show 20 Lines | def add_nodes(self, num_nodes, extra_args=None, | ||||
bitcoin_cli=self.options.bitcoincli, | bitcoin_cli=self.options.bitcoincli, | ||||
coverage_dir=self.options.coveragedir, | coverage_dir=self.options.coveragedir, | ||||
cwd=self.options.tmpdir, | cwd=self.options.tmpdir, | ||||
extra_conf=extra_confs[i], | extra_conf=extra_confs[i], | ||||
extra_args=extra_args[i], | extra_args=extra_args[i], | ||||
use_cli=self.options.usecli, | use_cli=self.options.usecli, | ||||
emulator=self.options.emulator, | emulator=self.options.emulator, | ||||
start_perf=self.options.perf, | start_perf=self.options.perf, | ||||
use_valgrind=self.options.valgrind, | |||||
)) | )) | ||||
if self.options.axionactivation: | if self.options.axionactivation: | ||||
self.nodes[i].extend_default_args( | self.nodes[i].extend_default_args( | ||||
["-axionactivationtime={}".format(TIMESTAMP_IN_THE_PAST)]) | ["-axionactivationtime={}".format(TIMESTAMP_IN_THE_PAST)]) | ||||
def start_node(self, i, *args, **kwargs): | def start_node(self, i, *args, **kwargs): | ||||
"""Start a bitcoind""" | """Start a bitcoind""" | ||||
▲ Show 20 Lines • Show All 263 Lines • Show Last 20 Lines |