Skip to content

Commit

Permalink
getting fortran tests working
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Mar 25, 2019
1 parent d01847e commit b5054f6
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ libncdf_tests_la_SOURCES = ncdf_tests.F90
libbasic_tests_la_SOURCES = basic_tests.F90

# Tests will run from a bash script.
#TESTS = run_tests.sh
TESTS = run_tests.sh

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

# Clean up files produced during testing.
CLEANFILES = *.nc *.log
27 changes: 27 additions & 0 deletions tests/unit/run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/sh
# This is a test script for PIO for tests/unit directory.
# Ed Hartnett 3/25/19

# Stop execution of script if error is returned.
set -e

# Stop loop if ctrl-c is pressed.
trap exit INT TERM

printf 'running PIO tests...\n'

PIO_TESTS='pio_unit_test_driver'

success1=true
for TEST in $PIO_TESTS
do
success1=false
echo "running ${TEST}"
mpiexec -n 4 ./${TEST} && success1=true || break
done

# Did we succeed?
if test x$success1 = xtrue; then
exit 0
fi
exit 1

0 comments on commit b5054f6

Please sign in to comment.