Skip to content

Commit

Permalink
Completely remove references to two builds in SystemTestsCompareTwo
Browse files Browse the repository at this point in the history
I'm not planning to implement the two-builds functionality in the near future,
so I'm backing that out for now to avoid confusion.

Test suite: None
Test baseline: N/A
Test namelist changes: N/A
Test status: N/A

Fixes: None

User interface changes?: No

Code review: None
  • Loading branch information
billsacks committed Aug 4, 2016
1 parent 83a8514 commit f21d807
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 51 deletions.
2 changes: 0 additions & 2 deletions utils/python/CIME/SystemTests/ers.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ def __init__(self, case):
initialize an object interface to the ERS system test
"""
SystemTestsCompareTwo.__init__(self, case,
two_builds_for_sharedlib = False,
two_builds_for_model = False,
run_two_suffix = 'rest',
run_one_description = 'initial run',
run_two_description = 'restart test')
Expand Down
2 changes: 0 additions & 2 deletions utils/python/CIME/SystemTests/lii.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ class LII(SystemTestsCompareTwo):

def __init__(self, case):
SystemTestsCompareTwo.__init__(self, case,
two_builds_for_sharedlib = False,
two_builds_for_model = False,
run_two_suffix = 'interp',
run_one_description = 'use_init_interp set to false',
run_two_description = 'use_init_interp set to true')
Expand Down
2 changes: 0 additions & 2 deletions utils/python/CIME/SystemTests/rep.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ class REP(SystemTestsCompareTwo):

def __init__(self, case):
SystemTestsCompareTwo.__init__(self, case,
two_builds_for_sharedlib = False,
two_builds_for_model = False,
run_two_suffix = 'rep2')

def _run_common_setup(self):
Expand Down
44 changes: 1 addition & 43 deletions utils/python/CIME/SystemTests/system_tests_compare_two.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ class SystemTestsCompareTwo(SystemTestsCommon):

def __init__(self,
case,
two_builds_for_sharedlib,
two_builds_for_model,
run_two_suffix = 'test',
run_one_description = '',
run_two_description = ''):
Expand All @@ -52,12 +50,6 @@ def __init__(self,
Args:
case: case object passsed to __init__ method of individual test
two_builds_for_sharedlib (bool): Whether two separate builds are
needed for the sharedlib build (this should be False for tests
that only change runtime options)
two_builds_for_model (bool): Whether two separate builds are needed
for the model build (this should be False for tests that only
change runtime options)
run_two_suffix (str, optional): Suffix appended to files output by
the second run. Defaults to 'test'. This can be anything other
than 'base' (which is the suffix used for the first run).
Expand All @@ -68,9 +60,6 @@ def __init__(self,
"""
SystemTestsCommon.__init__(self, case)

self._two_builds_for_sharedlib = two_builds_for_sharedlib
self._two_builds_for_model = two_builds_for_model

# NOTE(wjs, 2016-08-03) It is currently CRITICAL for run_one_suffix to
# be 'base', because this is assumed for baseline comparison and
# generation. Once that assumption is relaxed, then run_one_suffix can
Expand Down Expand Up @@ -150,12 +139,7 @@ def _pre_build(self):

def build(self, sharedlib_only=False, model_only=False):
self._pre_build()

if self._needs_two_builds(sharedlib_only = sharedlib_only,
model_only = model_only):
raise NotImplementedError('Two builds not yet implemented')
else:
SystemTestsCommon.build(self, sharedlib_only=sharedlib_only, model_only=model_only)
SystemTestsCommon.build(self, sharedlib_only=sharedlib_only, model_only=model_only)

def run(self):
"""
Expand Down Expand Up @@ -213,29 +197,3 @@ def get_compare_status(self):
"""
return self._status_compare

# ========================================================================
# Private methods
# ========================================================================

def _needs_two_builds(self, sharedlib_only, model_only):
if (not sharedlib_only and not model_only):
# building both at once
two_builds_needed = (self._two_builds_for_sharedlib or self._two_builds_for_model)
elif sharedlib_only:
two_builds_needed = self._two_builds_for_sharedlib
elif model_only:
two_builds_needed = self._two_builds_for_model
else:
raise ValueError('Invalid for both sharedlib_only and model_only to be set')

return two_builds_needed

def _has_two_executables(self):
if (self._two_builds_for_sharedlib or
self._two_builds_for_model):
two_executables = True
else:
two_executables = False

return two_executables

Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ def __init__(self,
case = CaseStub()
SystemTestsCompareTwo.__init__(self,
case,
two_builds_for_sharedlib = False,
two_builds_for_model = False,
run_two_suffix = run_two_suffix)

self._run_pass_suffixes = []
Expand Down

0 comments on commit f21d807

Please sign in to comment.