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

Better TravisCI output #287

Merged

Conversation

mnlevy1981
Copy link
Collaborator

I created a bash script MARBL_tools/run_test_suite.sh that runs 15 different tests (stand-alone python like yaml_to_json.py as well as python scripts that build / launch the Fortran stand-alone driver like bld_exe.py and init.py). It provides a nice summary at the end of the test:

Test Results:
1. yaml_to_json.py: PASS
2. MARBL_generate_settings_file.py: PASS
3. MARBL_generate_diagnostics_file.py: PASS
4. make clean: PASS
5. bld_lib.py --no_pause: PASS
6. bld_exe.py --no_pause: PASS
7. get_put.py: PASS
8. marbl_utils.py: PASS
9. init.py: PASS
10. init-twice.py: PASS
11. gen_input_file.py: PASS
12. requested_diags.py: PASS
13. requested_forcings.py: PASS
14. requested_restoring.py: PASS
15. requested_tracers.py: PASS

15 tests were run, and 0 failed.

The .travis.yml file now has Travis CI run two distinct tests: first it builds the documentation, and then it runs run_test_suite.sh.

Travis CI should run a single script that runs individual tests - this also
lets developers run a single script and get easy-to-parse results.
POP now restores ALK and ALK_ALT_CO2, and that is reflected in an example input
file.
The --no_pause option for the build tests (bld_lib.py and bld_exe.py) means
those scripts run without the "Press [return] to continue..." prompt between
compilers. This is great for automated testing, and run_test_suite.sh uses this
new flag.

Also added a "make clean" test and "./bld_lib --no_pause" prior to the
"./bld_exe --no_pause" test.
Expect test failures since sphinx is not being loaded into Travis environment
Need sphinx, sphinx_rtd_theme (specifically 0.2.5b1, since that's what we are
currently using), and sphinxcontrib-bibtex
Also updated .travis.yml to pip install -r docs/py_requirements.txt and updated
run_test_suite.sh to only run Fortran tests if the executable builds correctly.
If bld_lib.py or bld_exe.py fails, then marbl_testing_class.py returns a status
of 1. (Similarly, if one of the stand-alone tests fail, the python returns 1).
@mnlevy1981 mnlevy1981 merged commit 3e35491 into marbl-ecosys:cesm2.0 Jun 14, 2018
@mnlevy1981 mnlevy1981 deleted the enhancement/better-travis-output branch June 20, 2018 15:47
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