Skip to content

Commit

Permalink
Merge pull request #1998 from ESMCI/jgfouca/only_report_memory_tput_e…
Browse files Browse the repository at this point in the history
…rrors_once

Only report mem and tput errors once.
Also, a PASS should never override an earlier failure.

Test suite: code_checker
Test baseline:
Test namelist changes:
Test status: [bit for bit, roundoff, climate changing]

Fixes #1995

User interface changes?: N

Update gh-pages html (Y/N)?: N

Code review: @jedwards4b
  • Loading branch information
jedwards4b authored Oct 27, 2017
2 parents 09b7b8e + c353589 commit 9202dbb
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions scripts/lib/CIME/SystemTests/system_tests_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,12 +404,13 @@ def _compare_baseline(self):
blmem = 0 if blmem == [] else blmem[-1][1]
curmem = memlist[-1][1]
diff = (curmem-blmem)/blmem
if(diff < 0.1):
if diff < 0.1 and self._test_status.get_status(MEMCOMP_PHASE) is None:
self._test_status.set_status(MEMCOMP_PHASE, TEST_PASS_STATUS)
else:
elif self._test_status.get_status(MEMCOMP_PHASE) != TEST_FAIL_STATUS:
comment = "Error: Memory usage increase > 10% from baseline"
self._test_status.set_status(MEMCOMP_PHASE, TEST_FAIL_STATUS, comments=comment)
append_testlog(comment)

# compare throughput to baseline
current = self._get_throughput(cpllog)
baseline = self._get_throughput(baselog)
Expand All @@ -420,10 +421,10 @@ def _compare_baseline(self):
if tolerance is None:
tolerance = 0.25
expect(tolerance > 0.0, "Bad value for throughput tolerance in test")
if diff < tolerance:
if diff < tolerance and self._test_status.get_status(THROUGHPUT_PHASE) is None:
self._test_status.set_status(THROUGHPUT_PHASE, TEST_PASS_STATUS)
else:
comment = "Error: Computation time increase > %f pct from baseline" % tolerance*100
elif self._test_status.get_status(THROUGHPUT_PHASE) != TEST_FAIL_STATUS:
comment = "Error: Computation time increase > {:d} pct from baseline".format(int(tolerance*100))
self._test_status.set_status(THROUGHPUT_PHASE, TEST_FAIL_STATUS, comments=comment)
append_testlog(comment)

Expand Down

0 comments on commit 9202dbb

Please sign in to comment.