-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3977 from jasonb5/add_chksum_argument
dds --chksum argument to case.submit and create_test allowing users to verify checksums without explicitly calling check_input_data with --chksum. Test suite: scripts_regression_tests.py Test baseline: n/a Test namelist changes: n/a Test status: bit for bit Fixes #3467 User interface changes?: n/a Update gh-pages html (Y/N)?: N
- Loading branch information
Showing
6 changed files
with
112 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import os | ||
import unittest | ||
from unittest import mock | ||
|
||
from CIME.test_scheduler import TestScheduler | ||
|
||
class TestTestScheduler(unittest.TestCase): | ||
|
||
@mock.patch.dict(os.environ, {"CIME_MODEL": "cesm"}) | ||
@mock.patch("time.strftime", return_value="00:00:00") | ||
def test_chksum(self, strftime): # pylint: disable=unused-argument | ||
ts = TestScheduler( | ||
["SEQ_Ln9.f19_g16_rx1.A.ubuntu-latest_gnu"], | ||
machine_name="ubuntu-latest", | ||
chksum=True, | ||
test_root="/tests", | ||
) | ||
|
||
with mock.patch.object(ts, "_shell_cmd_for_phase") as _shell_cmd_for_phase: | ||
ts._run_phase("SEQ_Ln9.f19_g16_rx1.A.ubuntu-latest_gnu") # pylint: disable=protected-access | ||
|
||
_shell_cmd_for_phase.assert_called_with( | ||
"SEQ_Ln9.f19_g16_rx1.A.ubuntu-latest_gnu", | ||
"./case.submit --skip-preview-namelist --no-batch --chksum", | ||
"RUN", | ||
from_dir="/tests/SEQ_Ln9.f19_g16_rx1.A.ubuntu-latest_gnu.00:00:00", | ||
) |