diff --git a/.travis.yml b/.travis.yml index 0b6663cd..a5252912 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,9 +4,7 @@ before_install: - sudo apt-get install gfortran install: - pip install pyyaml - - pip install sphinx - - pip install sphinx_rtd_theme==0.2.5b1 - - pip install sphinxcontrib-bibtex + - pip install -r docs/py_requirements.txt python: - '2.7' - '3.6' diff --git a/MARBL_tools/run_test_suite.sh b/MARBL_tools/run_test_suite.sh index 2af703ee..82830f62 100755 --- a/MARBL_tools/run_test_suite.sh +++ b/MARBL_tools/run_test_suite.sh @@ -73,75 +73,80 @@ echo "$ ./bld_lib.py --no_pause" STATUS=$(check_return $?) print_status "bld_lib.py --no_pause" >> $OUTFILE -# Build stand-alone executable -cd ${MARBL_ROOT}/tests/bld_tests -echo "$ ./bld_exe.py --no_pause" -./bld_exe.py --no_pause -STATUS=$(check_return $?) -print_status "bld_exe.py --no_pause" >> $OUTFILE - -# get_put unit test -cd ${MARBL_ROOT}/tests/unit_tests/get_put -echo "$ ./get_put.py" -./get_put.py -STATUS=$(check_return $?) -print_status "get_put.py" >> $OUTFILE - -# marbl_utils unit test -cd ${MARBL_ROOT}/tests/unit_tests/utils_routines -echo "$ ./marbl_utils.py" -./marbl_utils.py -STATUS=$(check_return $?) -print_status "marbl_utils.py" >> $OUTFILE - -# Initialize MARBL -cd ${MARBL_ROOT}/tests/regression_tests/init -echo "$ ./init.py" -./init.py -STATUS=$(check_return $?) -print_status "init.py" >> $OUTFILE - -# Initialize MARBL, clean up memory, initialize again -cd ${MARBL_ROOT}/tests/regression_tests/init-twice -echo "$ ./init-twice.py" -./init-twice.py -STATUS=$(check_return $?) -print_status "init-twice.py" >> $OUTFILE - -# Generate a settings file (Fortran) -cd ${MARBL_ROOT}/tests/regression_tests/gen_input_file -echo "$ ./gen_input_file.py" -./gen_input_file.py -STATUS=$(check_return $?) -print_status "gen_input_file.py" >> $OUTFILE - -# Print all diagnostics MARBL can provide -cd ${MARBL_ROOT}/tests/regression_tests/requested_diags -echo "$ ./requested_diags.py" -./requested_diags.py -STATUS=$(check_return $?) -print_status "requested_diags.py" >> $OUTFILE - -# Print all forcings MARBL requires -cd ${MARBL_ROOT}/tests/regression_tests/requested_forcings -echo "$ ./requested_forcings.py" -./requested_forcings.py -STATUS=$(check_return $?) -print_status "requested_forcings.py" >> $OUTFILE - -# Print all restoring fields being requested -cd ${MARBL_ROOT}/tests/regression_tests/requested_restoring -echo "$ ./requested_restoring.py" -./requested_restoring.py -i ${MARBL_ROOT}/tests/input_files/marbl_with_restore.input -STATUS=$(check_return $?) -print_status "requested_restoring.py" >> $OUTFILE - -# Print all tracers MARBL computes tendencies for -cd ${MARBL_ROOT}/tests/regression_tests/requested_tracers -echo "$ ./requested_tracers.py" -./requested_tracers.py -STATUS=$(check_return $?) -print_status "requested_tracers.py" >> $OUTFILE +# Build stand-alone executable (only if library built successfully) +if [ "${STATUS}" == "PASS" ]; then + cd ${MARBL_ROOT}/tests/bld_tests + echo "$ ./bld_exe.py --no_pause" + ./bld_exe.py --no_pause + STATUS=$(check_return $?) + print_status "bld_exe.py --no_pause" >> $OUTFILE +fi + +# Only test Fortran executable if build was successful +if [ "${STATUS}" == "PASS" ]; then + # get_put unit test + cd ${MARBL_ROOT}/tests/unit_tests/get_put + echo "$ ./get_put.py" + ./get_put.py + STATUS=$(check_return $?) + print_status "get_put.py" >> $OUTFILE + + # marbl_utils unit test + cd ${MARBL_ROOT}/tests/unit_tests/utils_routines + echo "$ ./marbl_utils.py" + ./marbl_utils.py + STATUS=$(check_return $?) + print_status "marbl_utils.py" >> $OUTFILE + + # Initialize MARBL + cd ${MARBL_ROOT}/tests/regression_tests/init + echo "$ ./init.py" + ./init.py + STATUS=$(check_return $?) + print_status "init.py" >> $OUTFILE + + # Initialize MARBL, clean up memory, initialize again + cd ${MARBL_ROOT}/tests/regression_tests/init-twice + echo "$ ./init-twice.py" + ./init-twice.py + STATUS=$(check_return $?) + print_status "init-twice.py" >> $OUTFILE + + # Generate a settings file (Fortran) + cd ${MARBL_ROOT}/tests/regression_tests/gen_input_file + echo "$ ./gen_input_file.py" + ./gen_input_file.py + STATUS=$(check_return $?) + print_status "gen_input_file.py" >> $OUTFILE + + # Print all diagnostics MARBL can provide + cd ${MARBL_ROOT}/tests/regression_tests/requested_diags + echo "$ ./requested_diags.py" + ./requested_diags.py + STATUS=$(check_return $?) + print_status "requested_diags.py" >> $OUTFILE + + # Print all forcings MARBL requires + cd ${MARBL_ROOT}/tests/regression_tests/requested_forcings + echo "$ ./requested_forcings.py" + ./requested_forcings.py + STATUS=$(check_return $?) + print_status "requested_forcings.py" >> $OUTFILE + + # Print all restoring fields being requested + cd ${MARBL_ROOT}/tests/regression_tests/requested_restoring + echo "$ ./requested_restoring.py" + ./requested_restoring.py -i ${MARBL_ROOT}/tests/input_files/marbl_with_restore.input + STATUS=$(check_return $?) + print_status "requested_restoring.py" >> $OUTFILE + + # Print all tracers MARBL computes tendencies for + cd ${MARBL_ROOT}/tests/regression_tests/requested_tracers + echo "$ ./requested_tracers.py" + ./requested_tracers.py + STATUS=$(check_return $?) + print_status "requested_tracers.py" >> $OUTFILE +fi echo "----" cat $OUTFILE diff --git a/docs/py_requirements.txt b/docs/py_requirements.txt new file mode 100644 index 00000000..0556e8de --- /dev/null +++ b/docs/py_requirements.txt @@ -0,0 +1,3 @@ +Sphinx==1.7.5 +sphinx-rtd-theme==0.2.5b1 +sphinxcontrib-bibtex==0.4.0 diff --git a/docs/sphinx-requirements.txt b/docs/sphinx-requirements.txt deleted file mode 100644 index fc6e8f7f..00000000 --- a/docs/sphinx-requirements.txt +++ /dev/null @@ -1,35 +0,0 @@ -alabaster==0.7.10 -asn1crypto==0.24.0 -Babel==2.6.0 -certifi==2018.4.16 -cffi==1.11.5 -chardet==3.0.4 -cryptography==2.2.2 -docutils==0.14 -enum34==1.1.6 -idna==2.6 -imagesize==1.0.0 -ipaddress==1.0.22 -Jinja2==2.10 -latexcodec==1.0.5 -MarkupSafe==1.0 -oset==0.1.3 -packaging==17.1 -pybtex==0.21 -pybtex-docutils==0.2.1 -pycparser==2.18 -Pygments==2.2.0 -pyOpenSSL==18.0.0 -pyparsing==2.2.0 -PySocks==1.6.8 -pytz==2018.4 -PyYAML==3.12 -requests==2.18.4 -six==1.11.0 -snowballstemmer==1.2.1 -Sphinx==1.7.5 -sphinx-rtd-theme==0.3.1 -sphinxcontrib-bibtex==0.4.0 -sphinxcontrib-websupport==1.1.0 -typing==3.6.4 -urllib3==1.22