Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
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
18 changes: 9 additions & 9 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,28 +39,28 @@ jobs:
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ghcr.io/ESMCI/cime
tags: |
type=raw,value=latest,enable=${{ github.event_name == 'push' }}
type=ref,event=pr,enable=${{ github.event_name == 'pull_request' }}
type=sha,format=long
- name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
target: base
context: docker/
Expand All @@ -76,7 +76,7 @@ jobs:
timeout-minutes: 2
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v2
with:
Expand All @@ -102,7 +102,7 @@ jobs:
python-version: ['3.8', '3.9', '3.10']
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Run tests
shell: bash
env:
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
driver: "mct"
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Cache inputdata
uses: actions/cache@v2
with:
Expand Down
13 changes: 11 additions & 2 deletions CIME/hist_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
FIELDLISTS_DIFFER = "had a different field list from"
DIFF_COMMENT = "did NOT match"
FAILED_OPEN = "Failed to open file"
IDENTICAL = "the two files seem to be IDENTICAL"
# COMPARISON_COMMENT_OPTIONS should include all of the above: these are any of the special
# comment strings that describe the reason for a comparison failure
COMPARISON_COMMENT_OPTIONS = set(
Expand Down Expand Up @@ -719,6 +720,8 @@ def get_ts_synopsis(comments):

>>> get_ts_synopsis('')
''
>>> get_ts_synopsis('\n')
''
>>> get_ts_synopsis('big error')
'big error'
>>> get_ts_synopsis('big error\n')
Expand All @@ -740,13 +743,19 @@ def get_ts_synopsis(comments):
>>> get_ts_synopsis('file1=\nfile2=\nFailed to open file\n')
'ERROR CPRNC failed to open files'
>>> get_ts_synopsis('file1=\nfile2=\nSome other error\n')
'Could not interpret CPRNC output'
'ERROR Could not interpret CPRNC output'
>>> get_ts_synopsis('file1=\nfile2=\n diff_test: the two files seem to be IDENTICAL \n')
''
"""
comments = comments.strip()

if comments == "" or "\n" not in comments:
return comments

# Empty synopsis when files are identicial
if re.search(IDENTICAL, comments) is not None:
return ""

fieldlist_differences = re.search(FIELDLISTS_DIFFER, comments) is not None
baseline_fail = re.search(NO_COMPARE, comments) is not None
real_fail = [
Expand Down Expand Up @@ -779,6 +788,6 @@ def get_ts_synopsis(comments):
elif open_fail:
synopsis = "ERROR CPRNC failed to open files"
else:
synopsis = "Could not interpret CPRNC output"
synopsis = "ERROR Could not interpret CPRNC output"

return synopsis
Loading