Skip to content

Commit 4bd125f

Browse files
committed
tests: Print dots by default
1 parent 29f429d commit 4bd125f

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

test/functional/test_runner.py

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def main():
222222
parser.add_argument('--help', '-h', '-?', action='store_true', help='print help text and exit')
223223
parser.add_argument('--jobs', '-j', type=int, default=4, help='how many test scripts to run in parallel. Default=4.')
224224
parser.add_argument('--keepcache', '-k', action='store_true', help='the default behavior is to flush the cache directory on startup. --keepcache retains the cache from the previous testrun.')
225-
parser.add_argument('--quiet', '-q', action='store_true', help='only print results summary and failure logs')
225+
parser.add_argument('--quiet', '-q', action='store_true', help='only print dots, results summary and failure logs')
226226
parser.add_argument('--tmpdirprefix', '-t', default=tempfile.gettempdir(), help="Root directory for datadirs")
227227
parser.add_argument('--failfast', action='store_true', help='stop execution after the first test failure')
228228
args, unknown_args = parser.parse_known_args()
@@ -321,11 +321,10 @@ def main():
321321
enable_coverage=args.coverage,
322322
args=passon_args,
323323
combined_logs_len=args.combinedlogslen,
324-
failfast=args.failfast,
325-
level=logging_level
324+
failfast=args.failfast
326325
)
327326

328-
def run_tests(test_list, src_dir, build_dir, tmpdir, jobs=1, enable_coverage=False, args=None, combined_logs_len=0, failfast=False, level=logging.DEBUG):
327+
def run_tests(test_list, src_dir, build_dir, tmpdir, jobs=1, enable_coverage=False, args=None, combined_logs_len=0, failfast=False):
329328
args = args or []
330329

331330
# Warn if bitcoind is already running (unix only)
@@ -360,7 +359,7 @@ def run_tests(test_list, src_dir, build_dir, tmpdir, jobs=1, enable_coverage=Fal
360359
raise
361360

362361
#Run Tests
363-
job_queue = TestHandler(jobs, tests_dir, tmpdir, test_list, flags, level)
362+
job_queue = TestHandler(jobs, tests_dir, tmpdir, test_list, flags)
364363
start_time = time.time()
365364
test_results = []
366365

@@ -441,14 +440,13 @@ class TestHandler:
441440
Trigger the test scripts passed in via the list.
442441
"""
443442

444-
def __init__(self, num_tests_parallel, tests_dir, tmpdir, test_list=None, flags=None, logging_level=logging.DEBUG):
443+
def __init__(self, num_tests_parallel, tests_dir, tmpdir, test_list=None, flags=None):
445444
assert(num_tests_parallel >= 1)
446445
self.num_jobs = num_tests_parallel
447446
self.tests_dir = tests_dir
448447
self.tmpdir = tmpdir
449448
self.test_list = test_list
450449
self.flags = flags
451-
self.logging_level = logging_level
452450
self.num_running = 0
453451
self.jobs = []
454452

@@ -496,14 +494,12 @@ def get_next(self):
496494
status = "Failed"
497495
self.num_running -= 1
498496
self.jobs.remove(job)
499-
if self.logging_level == logging.DEBUG:
500-
clearline = '\r' + (' ' * dot_count) + '\r'
501-
print(clearline, end='', flush=True)
502-
dot_count = 0
497+
clearline = '\r' + (' ' * dot_count) + '\r'
498+
print(clearline, end='', flush=True)
499+
dot_count = 0
503500
return TestResult(name, status, int(time.time() - start_time)), testdir, stdout, stderr
504-
if self.logging_level == logging.DEBUG:
505-
print('.', end='', flush=True)
506-
dot_count += 1
501+
print('.', end='', flush=True)
502+
dot_count += 1
507503

508504
def kill_and_join(self):
509505
"""Send SIGKILL to all jobs and block until all have ended."""

0 commit comments

Comments
 (0)