Skip to content

Commit

Permalink
Merge pull request ESMCI#1741 from NCAR/ejh_more_testing_2
Browse files Browse the repository at this point in the history
converting rest of run_test.sh scripts to accept user-provided mpiexec command
  • Loading branch information
edwardhartnett authored Aug 28, 2020
2 parents 3c02032 + 81de16e commit 3ce5db5
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/a4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,12 @@ jobs:
- name: autotools build
run: |
set -x
gcc --version
echo 'export PATH=/home/runner/mpich/bin:$PATH' > .bashrc
source .bashrc
export CC=/home/runner/mpich/bin/mpicc
export FC=/home/runner/mpich/bin/mpifort
autoreconf -i
./configure
./configure --enable-fortran
make -j check
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ is_enabled(HDF5_HAS_PAR_FILTERS HAS_PAR_FILTERS)
is_enabled(HAVE_NETCDF4 HAS_NETCDF4)
is_enabled(HAVE_NETCDF_PAR HAS_NETCDF4_PAR)
is_enabled(HAVE_NETCDF_INTEGRATION HAS_NETCDF_INTEGRATION)
is_enabled(PIO_ENABLE_FORTRAN HAS_PIO_FORTRAN)

# Generate file from template.
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/libpio.settings.in"
Expand Down
5 changes: 5 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,12 @@ AC_CONFIG_FILES([tests/general/pio_tutil.F90:tests/general/util/pio_tutil.F90])
AC_CONFIG_FILES([tests/cunit/run_tests.sh], [chmod ugo+x tests/cunit/run_tests.sh])
AC_CONFIG_FILES([tests/ncint/run_tests.sh], [chmod ugo+x tests/ncint/run_tests.sh])
AC_CONFIG_FILES([tests/ncint/run_perf.sh], [chmod ugo+x tests/ncint/run_perf.sh])
AC_CONFIG_FILES([tests/fncint/run_tests.sh], [chmod ugo+x tests/fncint/run_tests.sh])
AC_CONFIG_FILES([tests/general/run_tests.sh], [chmod ugo+x tests/general/run_tests.sh])
AC_CONFIG_FILES([tests/performance/run_tests.sh], [chmod ugo+x tests/performance/run_tests.sh])
AC_CONFIG_FILES([tests/unit/run_tests.sh], [chmod ugo+x tests/unit/run_tests.sh])
AC_CONFIG_FILES([examples/c/run_tests.sh], [chmod ugo+x examples/c/run_tests.sh])
AC_CONFIG_FILES([examples/f03/run_tests.sh], [chmod ugo+x examples/f03/run_tests.sh])

# Args:
# 1. netcdf_meta.h variable
Expand Down Expand Up @@ -448,6 +452,7 @@ AC_SUBST([HAS_PAR_FILTERS], [$have_par_filters])
AC_SUBST([HAS_NETCDF4], [$have_netcdf4])
AC_SUBST([HAS_NETCDF4_PAR], [$have_netcdf_par])
AC_SUBST([HAS_NETCDF_INTEGRATION], [$enable_netcdf_integration])
AC_SUBST([HAS_PIO_FORTRAN], [$enable_fortran])

# Create the build summary file.
AC_CONFIG_FILES([libpio.settings
Expand Down
4 changes: 3 additions & 1 deletion examples/f03/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ TESTS = run_tests.sh
endif # RUN_TESTS

# Distribute the test script.
EXTRA_DIST = CMakeLists.txt run_tests.sh
EXTRA_DIST = CMakeLists.txt run_tests.sh.in

# Clean up files produced during testing.
CLEANFILES = *.nc *.log *.mod

DISTCLEANFILES = run_tests.sh
2 changes: 1 addition & 1 deletion examples/f03/run_tests.sh → examples/f03/run_tests.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ for TEST in $PIO_TESTS
do
success1=false
echo "running ${TEST}"
mpiexec -n 4 ./${TEST} && success1=true
@WITH_MPIEXEC@ -n 4 ./${TEST} && success1=true
if test $success1 = false; then
break
fi
Expand Down
1 change: 1 addition & 0 deletions libpio.settings.in
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ NetCDF/HDF5 Par I/O: @HAS_NETCDF4_PAR@
NetCDF Integration: @HAS_NETCDF_INTEGRATION@
PIO Logging: @HAS_LOGGING@
MPIEXEC: @WITH_MPIEXEC@
Fortran: @HAS_PIO_FORTRAN@

2 changes: 2 additions & 0 deletions tests/fncint/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ EXTRA_DIST = run_tests.sh

# Clean up files produced during testing.
CLEANFILES = *.nc *.log

DISTCLEANFILES = run_tests.sh
2 changes: 1 addition & 1 deletion tests/fncint/run_tests.sh → tests/fncint/run_tests.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ for TEST in $PIO_TESTS
do
success1=false
echo "running ${TEST}"
mpiexec -n 4 ./${TEST} && success1=true
@WITH_MPIEXEC@ -n 4 ./${TEST} && success1=true
if test $success1 = false; then
break
fi
Expand Down
4 changes: 3 additions & 1 deletion tests/general/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ pio_rearr_opts2.F90:pio_rearr_opts2.F90.in
pio_rearr_opts.F90:pio_rearr_opts.F90.in

# Distribute the test script.
EXTRA_DIST = CMakeLists.txt run_tests.sh ncdf_fail.F90.in \
EXTRA_DIST = CMakeLists.txt run_tests.sh.in ncdf_fail.F90.in \
ncdf_get_put.F90.in ncdf_inq.F90.in ncdf_simple_tests.F90.in \
pio_decomp_fillval.F90.in pio_decomp_frame_tests.F90.in \
pio_decomp_tests_1d.F90.in pio_decomp_tests_2d.F90.in \
Expand All @@ -101,3 +101,5 @@ pio_rearr_opts2.F90.in pio_rearr_opts.F90.in

# Clean up files produced during testing.
CLEANFILES = *.nc *.log *.mod

DISTCLEANFILES = run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ for TEST in $PIO_TESTS
do
success1=false
echo "running ${TEST}"
mpiexec -n 4 ./${TEST} && success1=true
@WITH_MPIEXEC@ -n 4 ./${TEST} && success1=true
if test $success1 = false; then
break
fi
Expand Down
4 changes: 3 additions & 1 deletion tests/performance/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ TESTS = run_tests.sh
endif # RUN_TESTS

EXTRA_DIST = CMakeLists.txt gensimple.pl Pioperformance.md pioperf.nl \
run_tests.sh
run_tests.sh.in

# Clean up files produced during testing.
CLEANFILES = *.nc *.log *.mod

DISTCLEANFILES = run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ for TEST in $PIO_TESTS
do
success1=false
echo "running ${TEST}"
mpiexec -n 4 ./${TEST} && success1=true
@WITH_MPIEXEC@ -n 4 ./${TEST} && success1=true
if test $success1 = false; then
break
fi
Expand Down

0 comments on commit 3ce5db5

Please sign in to comment.