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

Catch all errors when ESMF build fails (various ways) #93

Open
theurich opened this issue Oct 25, 2023 · 0 comments
Open

Catch all errors when ESMF build fails (various ways) #93

theurich opened this issue Oct 25, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@theurich
Copy link
Member

The current test script implementation does correctly catch and report libesmf build errors. However, while working on the trace preload library issues under Darwin, there was a temporary issue introduced on the ESMF side that resulted in failing of build target build_tracelibs. When that happened, the test scripts would abort, instead of reporting the ESMF build failure as they should. The backtrace from one of the failed runs was captured:

+ tee /Users/oehmke/ESMF_AutoTest/gfortranclang_12.2.0_14.0.0_mpich_O_develop/build.log

Traceback (most recent call last):

  File "/Users/oehmke/ESMF_AutoTest/./esmf-test-scripts/python_scripts/test_esmf.py", line 359, in <module>

    go(args)

  File "/Users/oehmke/ESMF_AutoTest/./esmf-test-scripts/python_scripts/test_esmf.py", line 302, in go

    test.start()

  File "/Users/oehmke/ESMF_AutoTest/./esmf-test-scripts/python_scripts/test_esmf.py", line 271, in start

    _submit_case(_c)  # may bock

  File "/Users/oehmke/ESMF_AutoTest/./esmf-test-scripts/python_scripts/test_esmf.py", line 199, in _submit_case

    _case.submit(no_artifacts=self.no_artifacts)

  File "/Users/oehmke/ESMF_AutoTest/esmf-test-scripts/python_scripts/case.py", line 109, in submit

    self.build_job_num = self.machine.scheduler.submit_job(script_file=self.build_script)

  File "/Users/oehmke/ESMF_AutoTest/esmf-test-scripts/python_scripts/noscheduler.py", line 18, in submit_job

    cmd.runcmd(f"{script_file}")

  File "/Users/oehmke/ESMF_AutoTest/esmf-test-scripts/python_scripts/cmd.py", line 20, in runcmd

    raise cpe

  File "/Users/oehmke/ESMF_AutoTest/esmf-test-scripts/python_scripts/cmd.py", line 15, in runcmd

    out = subprocess.check_output(cmd, shell=True, stderr=_stderr).strip().decode("utf-8")

  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/subprocess.py", line 424, in check_output

    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,

  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/subprocess.py", line 528, in run

    raise CalledProcessError(retcode, process.args,

subprocess.CalledProcessError: Command '/Users/oehmke/ESMF_AutoTest/gfortranclang_12.2.0_14.0.0_mpich_O_develop/build.bat' returned non-zero exit 

status 2.

Instead of this abort, all ESMF build errors are expected to be caught by the test system and pushed correctly to the artifacts repo.

@theurich theurich added the bug Something isn't working label Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant