test: Default --previous-releases to false if dir is empty

pull/764/head
MarcoFalke 5 years ago
parent faf1c3cc58
commit fad798be76
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548

@ -156,7 +156,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
parser.add_argument("--portseed", dest="port_seed", default=os.getpid(), type=int,
help="The seed to use for assigning port numbers (default: current process id)")
parser.add_argument("--previous-releases", dest="prev_releases", action="store_true",
default=os.path.isdir(previous_releases_path),
default=os.path.isdir(previous_releases_path) and bool(os.listdir(previous_releases_path)),
help="Force test of previous releases (default: %(default)s)")
parser.add_argument("--coveragedir", dest="coveragedir",
help="Write tested RPC commands into this directory")

Loading…
Cancel
Save