Skip to content

Commit

Permalink
Merge pull request ESMCI#1397 from NCAR/ejh_turn_off_tests
Browse files Browse the repository at this point in the history
allow tests to be built but not run in autotools build
  • Loading branch information
edhartnett authored Apr 11, 2019
2 parents a29460e + 1640c98 commit cf1764e
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ AC_ARG_ENABLE([papi], [AS_HELP_STRING([--disable-papi],
test "x$enable_papi" = xno || enable_papi=yes
AC_MSG_RESULT($enable_papi)

# Does the user want to disable test runs?
AC_MSG_CHECKING([whether test runs should be enabled for make check])
AC_ARG_ENABLE([test-runs], [AS_HELP_STRING([--disable-test-runs],
[disable running run_test.sh test scripts for make check. Tests will still be built.])])
test "x$enable_test_runs" = xno || enable_test_runs=yes
AC_MSG_RESULT($enable_test_runs)
AM_CONDITIONAL(RUN_TESTS, [test "x$enable_test_runs" = xyes])

# Does the user want to enable Fortran library?
AC_MSG_CHECKING([whether Fortran library should be built])
AC_ARG_ENABLE([fortran],
Expand Down
2 changes: 2 additions & 0 deletions examples/c/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ AM_CPPFLAGS = -I$(top_srcdir)/src/clib
# Build the tests for make check.
check_PROGRAMS = example1 examplePio darray_no_async

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

# Distribute the test script.
EXTRA_DIST = run_tests.sh
Expand Down
2 changes: 2 additions & 0 deletions tests/cunit/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ test_darray_async test_darray_async_many test_darray_2sync \
test_async_multicomp test_async_multi2 test_async_manyproc \
test_darray_fill test_decomp_frame test_perf2

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

# Source code for each test.
test_intercomm2_SOURCES = test_intercomm2.c test_common.c pio_tests.h
Expand Down
2 changes: 2 additions & 0 deletions tests/general/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ pio_iosystem_tests_SOURCES = pio_iosystem_tests.F90
pio_iosystem_tests2_SOURCES = pio_iosystem_tests2.F90
pio_iosystem_tests3_SOURCES = pio_iosystem_tests3.F90

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

%.F90: %.F90.in
util/pio_tf_f90gen.pl --annotate-source --out=$@ $<
Expand Down
2 changes: 2 additions & 0 deletions tests/performance/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ check_PROGRAMS = pioperf

pioperf_SOURCES = pioperformance.F90

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

EXTRA_DIST = CMakeLists.txt gensimple.pl Pioperformance.md pioperf.nl \
run_tests.sh
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ libglobal_vars_la_SOURCES = global_vars.F90
libncdf_tests_la_SOURCES = ncdf_tests.F90
libbasic_tests_la_SOURCES = basic_tests.F90

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

# Distribute the test script.
EXTRA_DIST = CMakeLists.txt run_tests.sh input.nl
Expand Down

0 comments on commit cf1764e

Please sign in to comment.