Skip to content

Conversation

@billsacks
Copy link
Member

@billsacks billsacks commented Nov 7, 2025

Description

I'd like to add an FUNITSHARE system test - an extension of the FUNIT test that will run the CESM_share tests on derecho as part of prealpha testing. I needed a couple of small additions in CIME to allow this to work:

(1) Allowing new System Test types to be defined in the "allactive" area in addition to the cime_config associated with each component.

(2) Allowing extra arguments to the run_tests.py command.

See ESCOMP/CESM#362 for the CESM changes that leverage this.

Checklist

  • My code follows the style guidlines of this proejct (black formatting)
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • I have added tests that excerise my feature/fix and existing tests continue to pass
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding additions and changes to the documentation

@billsacks billsacks requested a review from jedwards4b November 7, 2025 00:58
@codecov
Copy link

codecov bot commented Nov 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 42.05%. Comparing base (eb5e6bf) to head (2d14723).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #4895       +/-   ##
===========================================
+ Coverage   31.43%   42.05%   +10.62%     
===========================================
  Files         264      134      -130     
  Lines       38683    19739    -18944     
  Branches     8386     4366     -4020     
===========================================
- Hits        12161     8302     -3859     
+ Misses      25281    10632    -14649     
+ Partials     1241      805      -436     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@billsacks
Copy link
Member Author

I'm looking into the test failures... I think they're due to some mock return values that I need to adjust. I'm working on figuring out which of the case.get_value.side_effects need to be adjusted and how....

The previous commit introduced an extra call to case.get_value to get
SYSTEM_TESTS_DIR for component=allactive. This broke the mock get_value
returns. To make these returns more robust, I have changed the way
they're done to be based on a dictionary lookup rather than an ordered
list.

This kind of replacement should probably be done for other
case.get_value mocks. Note that I identified the argument values that
needed to be handled with this code:

   for i, call in enumerate(case.get_value.call_args_list):
       print(f"  Call {i}: {call}")
@billsacks
Copy link
Member Author

I have fixed the offending case.get_value mock replacements. I reworked them to be based on dictionary lookups rather than ordered lists because this felt more robust / future-proof. In my view, this should eventually be done for other similar case.get_value replacements, since the previous design made it hard to figure out what was wrong with the test and how to fix it. (And I noticed that the previous version seemed to have some incorrect return values, though it happened to work okay by chance.)

I identified the argument values that needed to be handled by adding the following near the end of each test:

   for i, call in enumerate(case.get_value.call_args_list):
       print(f"  Call {i}: {call}")

billsacks added a commit to billsacks/cesm that referenced this pull request Nov 8, 2025
@billsacks billsacks changed the title Changes needed for CESM to define an FUNITSHARE system test in the allactive area [WIP] Changes needed for CESM to define an FUNITSHARE system test in the allactive area Nov 8, 2025
@billsacks
Copy link
Member Author

In doing some more testing of this branch, I realized it causes problems with running tests that are defined by a component (e.g., clm-defined tests), I think because now two different paths resolve to the same place so CIME thinks there are multiple definitions of the test. I'll do something to resolve this and then remove the WIP label.

Or if multiple SYSTEM_TESTS_DIRs resolve to the same path....

This happened when I introduced an entry for allactive: in a standalone
checkout of CTSM, COMP_ROOT_DIR_LND is the same as SRCROOT, so the
allactive and clm CONFIG_TESTS_FILEs and SYSTEM_TESTS_DIRs pointed to
the same path, causing an error.
@billsacks billsacks changed the title [WIP] Changes needed for CESM to define an FUNITSHARE system test in the allactive area Changes needed for CESM to define an FUNITSHARE system test in the allactive area Nov 9, 2025
@billsacks
Copy link
Member Author

In doing some more testing of this branch, I realized it causes problems with running tests that are defined by a component (e.g., clm-defined tests), I think because now two different paths resolve to the same place so CIME thinks there are multiple definitions of the test. I'll do something to resolve this and then remove the WIP label.

I have resolved this issue, so this is ready for review.

@billsacks
Copy link
Member Author

See also ESCOMP/CESM#362, the CESM PR that needs these changes.

@billsacks
Copy link
Member Author

The e3sm system-testing failure is:

Submit files
   Send to group: Nightly
   SubmitURL: http://my.cdash.org/submit.php?project=ACME_test
  Set CURLOPT_SSLVERSION to CURL_SSLVERSION_TLSv1_2
  Set CURLOPT_SSL_VERIFYPEER to off
  Set CURLOPT_SSL_VERIFYHOST to off
   Upload file: /home/cime/cases/scripts_regression_test.20251109_194551/jenkins_test_fake_testing_only_20251109_195952/Testing/20251109-2000/Configure.xml to http://my.cdash.org/submit.php?project=ACME_test&FileName=docker___jenkins_generic_job_mixed_20251109_200017___20251109-2000-Nightly___XML___Configure.xml&build=jenkins_generic_job_mixed_20251109_200017&site=docker&stamp=20251109-2000-Nightly&MD5=0bdcf84e23c3625739e601af313a1bda Size: 462
   Error when uploading file: /home/cime/cases/scripts_regression_test.20251109_194551/jenkins_test_fake_testing_only_20251109_195952/Testing/20251109-2000/Configure.xml
   Error message was: Failed to connect to my.cdash.org port 80 after 49 ms: Could not connect to server
   Problems when submitting via HTTP
Errors while running CTest
Output from these tests are in: /home/cime/cases/scripts_regression_test.20251109_194551/jenkins_test_fake_testing_only_20251109_195952/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.
ERROR: All cdash upload attempts failed

I'm not sure what to do about this....?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant