From fad798be76dd5e330463c837fda768477d536078 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Tue, 19 May 2020 11:08:51 -0400 Subject: [PATCH] test: Default --previous-releases to false if dir is empty --- test/functional/test_framework/test_framework.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 45bca63c94..716fa1d845 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -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")