Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compare two test case names match #1832

Merged
merged 6 commits into from
Aug 23, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions scripts/lib/CIME/SystemTests/system_tests_compare_two.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ def __init__(self,
self._case2 = None

self._setup_cases_if_not_yet_done()

# Since case 2 has the same name as case1 it's CIME_OUTPUT_ROOT must also be different
self._case2.set_value("CIME_OUTPUT_ROOT",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should go in the _setup_cases function, in order to keep the init method cleaner and so that any problem is protected by the try... except block in _setup_cases_if_not_yet_done.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved

os.path.join(self._case1.get_value("CIME_OUTPUT_ROOT"),
self._case1.get_value("CASE")))
# ========================================================================
# Methods that MUST be implemented by specific tests that inherit from this
# base class
Expand Down Expand Up @@ -195,11 +198,9 @@ def _get_caseroot2(self):
Assumes that self._case1 is already set to point to the case1 object,
and that self._run_two_suffix is already set.
"""
casename1 = self._case1.get_value("CASE")
casename2 = self._case1.get_value("CASE")
caseroot1 = self._case1.get_value("CASEROOT")

casename2 = "{}.{}".format(casename1, self._run_two_suffix)

# Nest the case directory for case2 inside the case directory for case1
caseroot2 = os.path.join(caseroot1, casename2)

Expand Down