Skip to content

Commit

Permalink
Merge pull request #1238 from ESMCI/jgfouca/create_test_better_output
Browse files Browse the repository at this point in the history
Improve create_test output
Setup cs.status as the first action instead of last.

When a case is completed, add a little extra text for the user so they can estimate progress

Test suite: scripts_regression_tests --fast
Test baseline:
Test namelist changes:
Test status: bit for bit

Fixes #1176

User interface changes?: cs.status produced early, minor create_test output changes

Code review: @jedwards4b
  • Loading branch information
jedwards4b authored Mar 14, 2017
2 parents d050c08 + 0b0fc5b commit 867711d
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions scripts/lib/CIME/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def __init__(self, test_names, test_data=None,
self._test_data = {} if test_data is None else test_data # Format: {test_name -> {data_name -> data}}
self._mpilib = mpilib # allow override of default mpilib
self._allow_baseline_overwrite = allow_baseline_overwrite
self._completed_tests = 0

self._machobj = Machines(machine=machine_name)

Expand Down Expand Up @@ -642,8 +643,15 @@ def _consumer(self, test, test_phase, phase_method):
if status != TEST_PEND_STATUS:
self._update_test_status(test, test_phase, status)

status_str = "Finished %s for test %s in %f seconds (%s)" %\
(test_phase, test, elapsed_time, status)
if not self._work_remains(test):
self._completed_tests += 1
total = len(self._tests)
status_str = "Finished %s for test %s in %f seconds (%s). [COMPLETED %d of %d]" % \
(test_phase, test, elapsed_time, status, self._completed_tests, total)
else:
status_str = "Finished %s for test %s in %f seconds (%s)" % \
(test_phase, test, elapsed_time, status)

if not success:
status_str += " Case dir: %s" % self._get_test_dir(test)
logger.info(status_str)
Expand Down Expand Up @@ -775,13 +783,13 @@ def run_tests(self, wait=False):
for test in self._tests:
logger.info( " %s"% test)

# Setup cs files
self._setup_cs_files()

self._producer()

expect(threading.active_count() == 1, "Leftover threads?")

# Setup cs files
self._setup_cs_files()

wait_handles_report = False
if not self._no_run and not self._no_batch:
if wait:
Expand Down

0 comments on commit 867711d

Please sign in to comment.