diff options
author | Elena Pourmal <epourmal@hdfgroup.org> | 2002-09-23 22:06:01 (GMT) |
---|---|---|
committer | Elena Pourmal <epourmal@hdfgroup.org> | 2002-09-23 22:06:01 (GMT) |
commit | f5096c200093eaf5b7dae72a3f672b2d7f457ca6 (patch) | |
tree | 457ebff96156da5e20133905167b7ac714428c30 /fortran/test/fortranlib_test.f90 | |
parent | 47fc4908325071261476bbdabb1be696323f9298 (diff) | |
download | hdf5-f5096c200093eaf5b7dae72a3f672b2d7f457ca6.zip hdf5-f5096c200093eaf5b7dae72a3f672b2d7f457ca6.tar.gz hdf5-f5096c200093eaf5b7dae72a3f672b2d7f457ca6.tar.bz2 |
[svn-r5940]
Purpose:
Bug fix, code improvement
Description:
Fortran tests didn't cleanup created files. Also HDF5_PREFIX and
HDF5_PARAPREFIX were not used to specify location of the files.
There was a redundant file in the testpar directory that contained
an error reporting function used by both serial and parallel tests.
Solution:
Created library h5test_fortran.a that contains functions used by the
serial and parallel tests. It includes Fortran and C functions that
may be called from Fortran programs to report errors, to modify
file names and to cleanup files after run. Modified test code to
use new functions.
Platforms tested:
Linux 2.2 (eirene) serial
IRIX64 (modi4) parallel with HDF5_PREFIX and HDF5_PARAPREFIX set to $SCR
Solris 2.7 with mpich 1.2.4 with HDF5_PARAPREFIX set to /tmp/epourmal
Diffstat (limited to 'fortran/test/fortranlib_test.f90')
-rw-r--r-- | fortran/test/fortranlib_test.f90 | 51 |
1 files changed, 34 insertions, 17 deletions
diff --git a/fortran/test/fortranlib_test.f90 b/fortran/test/fortranlib_test.f90 index 2c5c13a..7756eee 100644 --- a/fortran/test/fortranlib_test.f90 +++ b/fortran/test/fortranlib_test.f90 @@ -1,3 +1,18 @@ + +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! ! ! ! Testing Fortran functionality. @@ -30,6 +45,8 @@ CHARACTER(LEN=8) :: success = ' PASSED ' CHARACTER(LEN=8) :: failure = '*FAILED*' CHARACTER(LEN=4) :: e_format ='(8a)' + LOGICAL :: cleanup = .TRUE. +! LOGICAL :: cleanup = .FALSE. CALL h5open_f(error) write(*,*) ' ========================== ' @@ -40,7 +57,7 @@ ! write(*,*) '=========================================' error_string = failure - CALL mountingtest(mounting_total_error) + CALL mountingtest(cleanup, mounting_total_error) IF (mounting_total_error == 0) error_string = success write(*, fmt = '(14a)', advance = 'no') ' Mounting test' write(*, fmt = '(56x,a)', advance = 'no') ' ' @@ -49,7 +66,7 @@ total_error = total_error + mounting_total_error error_string = failure - CALL reopentest(reopen_total_error) + CALL reopentest(cleanup, reopen_total_error) IF (reopen_total_error == 0) error_string = success write(*, fmt = '(12a)', advance = 'no') ' Reopen test' write(*, fmt = '(58x,a)', advance = 'no') ' ' @@ -63,7 +80,7 @@ ! write(*,*) '=========================================' error_string = failure - CALL datasettest(dataset_total_error) + CALL datasettest(cleanup, dataset_total_error) IF (dataset_total_error == 0) error_string = success write(*, fmt = '(13a)', advance = 'no') ' Dataset test' write(*, fmt = '(57x,a)', advance = 'no') ' ' @@ -71,7 +88,7 @@ total_error = total_error + dataset_total_error error_string = failure - CALL extenddsettest(extend_dataset_total_error) + CALL extenddsettest(cleanup, extend_dataset_total_error) IF (extend_dataset_total_error == 0) error_string = success write(*, fmt = '(24a)', advance = 'no') ' Extendible dataset test' write(*, fmt = '(46x,a)', advance = 'no') ' ' @@ -84,7 +101,7 @@ ! write(*,*) '=========================================' error_string = failure - CALL dataspace_basic_test(dataspace_total_error) + CALL dataspace_basic_test(cleanup, dataspace_total_error) IF (dataspace_total_error == 0) error_string = success write(*, fmt = '(21a)', advance = 'no') ' Basic dataspace test' write(*, fmt = '(49x,a)', advance = 'no') ' ' @@ -98,7 +115,7 @@ ! write(*,*) '=========================================' error_string = failure - CALL refobjtest(refobj_total_error) + CALL refobjtest(cleanup, refobj_total_error) IF (refobj_total_error == 0) error_string = success write(*, fmt = '(25a)', advance = 'no') ' Reference to object test' write(*, fmt = '(45x,a)', advance = 'no') ' ' @@ -106,7 +123,7 @@ total_error = total_error + refobj_total_error error_string = failure - CALL refregtest(refreg_total_error) + CALL refregtest(cleanup, refreg_total_error) IF (refreg_total_error == 0) error_string = success write(*, fmt = '(33a)', advance = 'no') ' Reference to dataset region test' write(*, fmt = '(37x,a)', advance = 'no') ' ' @@ -119,7 +136,7 @@ ! write(*,*) '=========================================' error_string = failure - CALL test_basic_select(basic_select_total_error) + CALL test_basic_select(cleanup, basic_select_total_error) IF (basic_select_total_error == 0) error_string = success write(*, fmt = '(21a)', advance = 'no') ' Basic selection test' write(*, fmt = '(49x,a)', advance = 'no') ' ' @@ -127,7 +144,7 @@ total_error = total_error + basic_select_total_error error_string = failure - CALL test_select_hyperslab( hyperslab_total_error) + CALL test_select_hyperslab( cleanup, hyperslab_total_error) IF ( hyperslab_total_error == 0) error_string = success write(*, fmt = '(25a)', advance = 'no') ' Hyperslab selection test' write(*, fmt = '(45x,a)', advance = 'no') ' ' @@ -135,7 +152,7 @@ total_error = total_error + hyperslab_total_error error_string = failure - CALL test_select_element(element_total_error) + CALL test_select_element(cleanup, element_total_error) IF (element_total_error == 0) error_string = success write(*, fmt = '(23a)', advance = 'no') ' Element selection test' write(*, fmt = '(47x,a)', advance = 'no') ' ' @@ -149,7 +166,7 @@ ! write(*,*) '=========================================' error_string = failure - CALL basic_data_type_test(basic_datatype_total_error) + CALL basic_data_type_test(cleanup, basic_datatype_total_error) IF (basic_datatype_total_error == 0) error_string = success write(*, fmt = '(20a)', advance = 'no') ' Basic datatype test' write(*, fmt = '(50x,a)', advance = 'no') ' ' @@ -157,7 +174,7 @@ total_error = total_error + basic_datatype_total_error error_string = failure - CALL compoundtest(total_error_compoundtest) + CALL compoundtest(cleanup, total_error_compoundtest) IF (total_error_compoundtest == 0) error_string = success write(*, fmt = '(23a)', advance = 'no') ' Compound datatype test' write(*, fmt = '(47x,a)', advance = 'no') ' ' @@ -170,7 +187,7 @@ ! write(*,*) '=========================================' error_string = failure - CALL external_test(external_total_error) + CALL external_test(cleanup, external_total_error) IF (external_total_error == 0) error_string = success write(*, fmt = '(22a)', advance = 'no') ' External dataset test' write(*, fmt = '(48x,a)', advance = 'no') ' ' @@ -183,7 +200,7 @@ ! write(*,*) '=========================================' error_string = failure - CALL attribute_test(attribute_total_error) + CALL attribute_test(cleanup, attribute_total_error) write(*, fmt = '(15a)', advance = 'no') ' Attribute test' write(*, fmt = '(55x,a)', advance = 'no') ' ' IF (attribute_total_error == 0) error_string = success @@ -196,7 +213,7 @@ ! write(*,*) '=========================================' error_string = failure - CALL identifier_test(identifier_total_error) + CALL identifier_test(cleanup, identifier_total_error) IF (identifier_total_error == 0) error_string = success write(*, fmt = '(16a)', advance = 'no') ' Identifier test' write(*, fmt = '(54x,a)', advance = 'no') ' ' @@ -209,7 +226,7 @@ ! write(*,*) '=========================================' error_string = failure - CALL group_test(group_total_error) + CALL group_test(cleanup, group_total_error) IF (group_total_error == 0) error_string = success write(*, fmt = '(11a)', advance = 'no') ' Group test' write(*, fmt = '(59x,a)', advance = 'no') ' ' @@ -217,7 +234,7 @@ total_error = total_error + identifier_total_error error_string = failure - CALL error_report_test(error_total_error) + CALL error_report_test(cleanup, error_total_error) IF (error_total_error == 0) error_string = success write(*, fmt = '(11a)', advance = 'no') ' Error test' write(*, fmt = '(59x,a)', advance = 'no') ' ' |