Skip to content

Commit

Permalink
fix issues with check_input_data
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Apr 18, 2016
1 parent ac6441b commit b8d2258
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
3 changes: 1 addition & 2 deletions utils/python/CIME/SystemTests/sms.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ def __init__(self, caseroot, case):
"""
initialize an object interface to the SMS system test
"""
expectedrunvars = ["CONTINUE_RUN", "REST_OPTION", "HIST_OPTION", "HIST_N"]
SystemTestsCommon.__init__(self, caseroot, case, expectedrunvars)
SystemTestsCommon.__init__(self, caseroot, case)

def run(self):
self._case.set_value("CONTINUE_RUN",False)
Expand Down
11 changes: 8 additions & 3 deletions utils/python/CIME/check_input_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,22 @@ def download_if_in_repo(svn_loc, input_data_root, rel_path):
"""
Return True if successfully downloaded
"""
rel_path = rel_path.strip('/')
full_url = os.path.join(svn_loc, rel_path)

full_path = os.path.join(input_data_root, rel_path)
logging.info("Trying to download file: '%s' to path '%s'" % (full_url, full_path))
# Make sure local path exists, create if it does not
if(not os.path.exists(os.path.dirname(full_path))):
os.makedirs(os.path.dirname(full_path))

stat = run_cmd("svn --non-interactive --trust-server-cert ls %s" % full_url, ok_to_fail=True)
stat, out, err = run_cmd("svn --non-interactive --trust-server-cert ls %s" % full_url, ok_to_fail=True)
if (stat != 0):
logging.warning("SVN repo '%s' does not have file '%s'" % (svn_loc, rel_path))
logging.warning("SVN repo '%s' does not have file '%s'" % (svn_loc, full_url))
return False
else:
stat, output, errput = \
run_cmd("svn --non-interactive --trust-server-cert export %s %s" % (full_url, full_path))
run_cmd("svn --non-interactive --trust-server-cert export %s %s" % (full_url, full_path), ok_to_fail=True)
if (stat != 0):
logging.warning("svn export failed with output: %s and errput %s" % (output, errput))
return False
Expand Down

0 comments on commit b8d2258

Please sign in to comment.