summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'fortran')
-rw-r--r--fortran/examples/Makefile.am4
-rw-r--r--fortran/examples/Makefile.in24
-rw-r--r--fortran/examples/run-fortran-ex.sh.in32
3 files changed, 43 insertions, 17 deletions
diff --git a/fortran/examples/Makefile.am b/fortran/examples/Makefile.am
index e994d4e..feed32c 100644
--- a/fortran/examples/Makefile.am
+++ b/fortran/examples/Makefile.am
@@ -26,6 +26,8 @@ if BUILD_PARALLEL_CONDITIONAL
EXAMPLE_PROG_PARA=ph5example
endif
+INSTALL_SCRIPT_FILES = run-fortran-ex.sh
+
# These are the programs that 'make all' or 'make tests' will build and
# that 'make check' will run. List them in the order in which they should
# be run.
@@ -41,7 +43,6 @@ INSTALL_FILES=h5_crtdat.f90 h5_rdwt.f90 \
h5_crtatt.f90 h5_crtgrp.f90 h5_crtgrpar.f90 h5_crtgrpd.f90 \
h5_extend.f90 h5_subset.f90 h5_cmprss.f90 hyperslab.f90 selectele.f90 refobjexample.f90 \
refregexample.f90 mountexample.f90 compound.f90 ph5example.f90
-INSTALL_SCRIPT_FILES = run-fortran-ex.sh
# Add attention tests for Fortran 2003 features
@@ -52,6 +53,7 @@ if FORTRAN_2003_CONDITIONAL_F
compound_fortran2003.f90 compound_complex_fortran2003.f90
endif
TEST_SCRIPT=testh5fc.sh
+TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES)
# Mark this directory as part of the Fortran API
FORTRAN_API=yes
diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in
index ce2251d..0e69f8e 100644
--- a/fortran/examples/Makefile.in
+++ b/fortran/examples/Makefile.in
@@ -624,6 +624,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5
# Compile parallel fortran examples only if parallel is enabled
@BUILD_PARALLEL_CONDITIONAL_TRUE@EXAMPLE_PROG_PARA = ph5example
+INSTALL_SCRIPT_FILES = run-fortran-ex.sh
# These are the programs that 'make all' or 'make tests' will build and
# that 'make check' will run. List them in the order in which they should
@@ -641,8 +642,8 @@ INSTALL_FILES = h5_crtdat.f90 h5_rdwt.f90 h5_crtatt.f90 h5_crtgrp.f90 \
h5_cmprss.f90 hyperslab.f90 selectele.f90 refobjexample.f90 \
refregexample.f90 mountexample.f90 compound.f90 ph5example.f90 \
$(am__append_2)
-INSTALL_SCRIPT_FILES = run-fortran-ex.sh
TEST_SCRIPT = testh5fc.sh
+TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES)
# Mark this directory as part of the Fortran API
FORTRAN_API = yes
@@ -1122,27 +1123,34 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
uninstall-examples:
@if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \
set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \
- fi
+ fi
@if test -n "$(INSTALL_SCRIPT_FILES)" -a -d $(EXAMPLEDIR); then \
set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_SCRIPT_FILES); \
- fi
+ fi
@if test -n "$(INSTALL_TOP_FILES)" -a -d $(EXAMPLETOPDIR); then \
set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_FILES); \
- fi
+ fi
@if test -n "$(INSTALL_TOP_SCRIPT_FILES)" -a -d $(EXAMPLETOPDIR); then \
set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_SCRIPT_FILES); \
- fi
+ fi
installcheck-local:
@if test "$(STATIC_SHARED)" = "static, shared"; then \
H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \
$(MAKE) $(AM_MAKEFLAGS) clean; \
H5CCFLAGS="" $(MAKE) $(AM_MAKEFLAGS) check; \
- elif test "$(STATIC_SHARED)" = "shared"; then \
+ elif test "$(STATIC_SHARED)" = "shared"; then \
H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \
- else \
+ else \
$(MAKE) $(AM_MAKEFLAGS) check; \
- fi
+ fi
+ @if test "$(INSTALL_FILES)" -a $(TEST_EXAMPLES_SCRIPT) -a -d $(EXAMPLEDIR); then \
+ echo "============================"; \
+ echo "Testing $(TEST_EXAMPLES_SCRIPT)"; \
+ echo "============================"; \
+ (cd $(EXAMPLEDIR); \
+ /bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \
+ fi
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
diff --git a/fortran/examples/run-fortran-ex.sh.in b/fortran/examples/run-fortran-ex.sh.in
index c5c379e..ead7361 100644
--- a/fortran/examples/run-fortran-ex.sh.in
+++ b/fortran/examples/run-fortran-ex.sh.in
@@ -63,19 +63,15 @@ RunTest()
./$TEST_EXEC
}
-
+F2003_ENABLED=@HAVE_FORTRAN_2003@
################## MAIN ##################
# Run tests
if [ $? -eq 0 ]
then
- if (RunTest h5_cmprss &&\
- rm h5_cmprss &&\
- RunTest h5_crtdat &&\
+ if (RunTest h5_crtdat &&\
rm h5_crtdat &&\
- RunTest h5_extend &&\
- rm h5_extend &&\
RunTest h5_rdwt &&\
rm h5_rdwt &&\
RunTest h5_crtatt &&\
@@ -86,14 +82,16 @@ then
rm h5_crtgrpar &&\
RunTest h5_crtgrpd &&\
rm h5_crtgrpd &&\
+ RunTest h5_extend &&\
+ rm h5_extend &&\
RunTest h5_subset &&\
rm h5_subset &&\
+ RunTest h5_cmprss &&\
+ rm h5_cmprss &&\
RunTest hyperslab &&\
rm hyperslab &&\
RunTest selectele &&\
rm selectele &&\
- RunTest grpit &&\
- rm grpit &&\
RunTest refobjexample &&\
rm refobjexample &&\
RunTest refregexample &&\
@@ -108,6 +106,24 @@ then
fi
fi
+if [ $EXIT_VALUE -eq ${EXIT_SUCCESS} -a "$F2003_ENABLED" = "yes" ]
+then
+# Add attention tests for Fortran 2003 features
+ if (RunTest rwdset_fortran2003 &&\
+ rm rwdset_fortran2003 &&\
+ RunTest nested_derived_type &&\
+ rm nested_derived_type &&\
+ RunTest compound_fortran2003 &&\
+ rm compound_fortran2003 &&\
+ RunTest compound_complex_fortran2003 &&\
+ rm compound_complex_fortran2003); then
+ EXIT_VALUE=${EXIT_SUCCESS}
+ else
+ EXIT_VALUE=${EXIT_FAILURE}
+ fi
+fi
+
+
# Cleanup
rm *.o
rm *.h5