mirror of
https://github.com/TREX-CoE/trexio.git
synced 2024-12-22 20:35:44 +01:00
adapt tests to optional HDF5
This commit is contained in:
parent
d42dc7f449
commit
c24484b86a
@ -1,3 +1,7 @@
|
|||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
#include "trexio.h"
|
#include "trexio.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -12,12 +16,14 @@ int main() {
|
|||||||
/*============== Main test launcher ================*/
|
/*============== Main test launcher ================*/
|
||||||
|
|
||||||
int rc;
|
int rc;
|
||||||
rc = system("rm -rf test_all.h5");
|
#ifdef HAVE_HDF5
|
||||||
|
rc = system("rm -f test_all.h5");
|
||||||
assert (rc == 0);
|
assert (rc == 0);
|
||||||
test_write("test_all.h5", TREXIO_HDF5);
|
test_write("test_all.h5", TREXIO_HDF5);
|
||||||
test_read ("test_all.h5", TREXIO_HDF5);
|
test_read ("test_all.h5", TREXIO_HDF5);
|
||||||
rc = system("rm -rf test_all.h5");
|
rc = system("rm -f test_all.h5");
|
||||||
assert (rc == 0);
|
assert (rc == 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
rc = system("rm -rf test_all.dir");
|
rc = system("rm -rf test_all.dir");
|
||||||
assert (rc == 0);
|
assert (rc == 0);
|
||||||
|
@ -17,14 +17,16 @@ program test_trexio
|
|||||||
|
|
||||||
call test_read_void('test_write_f.dir', TREXIO_TEXT)
|
call test_read_void('test_write_f.dir', TREXIO_TEXT)
|
||||||
|
|
||||||
call system('rm -rf test_write_f.h5')
|
! No way to conditionally check whether compilation was done with HDF5
|
||||||
print *, 'call test_write(''test_write_f.h5'', TREXIO_HDF5)'
|
! So temporarily disable the test for HDF5 back end at the moment
|
||||||
call test_write('test_write_f.h5', TREXIO_HDF5)
|
! call system('rm -rf test_write_f.h5')
|
||||||
print *, 'call test_read(''test_write_f.h5'', TREXIO_HDF5)'
|
! print *, 'call test_write(''test_write_f.h5'', TREXIO_HDF5)'
|
||||||
call test_read('test_write_f.h5', TREXIO_HDF5)
|
! call test_write('test_write_f.h5', TREXIO_HDF5)
|
||||||
call system('rm -rf test_write_f.h5')
|
! print *, 'call test_read(''test_write_f.h5'', TREXIO_HDF5)'
|
||||||
|
! call test_read('test_write_f.h5', TREXIO_HDF5)
|
||||||
call test_read_void('test_write_f.h5', TREXIO_HDF5)
|
! call system('rm -rf test_write_f.h5')
|
||||||
|
!
|
||||||
|
! call test_read_void('test_write_f.h5', TREXIO_HDF5)
|
||||||
|
|
||||||
end program test_trexio
|
end program test_trexio
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user