Skip to content

Commit

Permalink
adding vard testing
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Jun 5, 2019
1 parent aa26496 commit 2ec36c7
Show file tree
Hide file tree
Showing 4 changed files with 374 additions and 10 deletions.
4 changes: 3 additions & 1 deletion tests/cunit/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ test_darray_multivar3 test_darray_1d test_darray_3d \
test_decomp_uneven test_decomps test_rearr test_darray_async_simple \
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 test_async_perf
test_darray_fill test_decomp_frame test_perf2 test_async_perf \
test_darray_vard

if RUN_TESTS
# Tests will run from a bash script.
Expand Down Expand Up @@ -63,6 +64,7 @@ test_darray_fill_SOURCES = test_darray_fill.c test_common.c pio_tests.h
test_decomp_frame_SOURCES = test_decomp_frame.c test_common.c pio_tests.h
test_perf2_SOURCES = test_perf2.c test_common.c pio_tests.h
test_async_perf_SOURCES = test_async_perf.c test_common.c pio_tests.h
test_darray_vard_SOURCES = test_darray_vard.c test_common.c pio_tests.h

# Distribute the test script.
EXTRA_DIST = run_tests.sh
Expand Down
2 changes: 1 addition & 1 deletion tests/cunit/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ PIO_TESTS='test_intercomm2 test_async_mpi test_spmd test_rearr test_async_simple
'test_darray_multivar test_darray_multivar2 test_darray_multivar3 test_darray_1d '\
'test_darray_3d test_decomp_uneven test_decomps test_darray_async_simple '\
'test_darray_async test_darray_async_many test_darray_2sync test_async_multicomp '\
'test_darray_fill'
'test_darray_fill test_darray_vard'

success1=true
success2=true
Expand Down
16 changes: 8 additions & 8 deletions tests/cunit/test_darray.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,18 +271,18 @@ int test_darray(int iosysid, int ioid, int num_flavors, int *flavor, int my_rank
test_data_in) != PIO_EBADID)
ERR(ERR_WRONG);

/* /\* Set the record number. *\/ */
/* if ((ret = PIOc_setframe(ncid2, varid, 0))) */
/* ERR(ret); */

/* /\* Read the data. *\/ */
/* if ((ret = PIOc_read_darray(ncid2, varid, ioid, arraylen, test_data_in))) */
/* ERR(ret); */
/* Set the record number. */
if ((ret = PIOc_setframe(ncid2, varid, 0)))
ERR(ret);

/* Read the data. */
if ((ret = PIOc_get_vard(ncid2, varid, ioid, 0, (void *)test_data_in)))
if ((ret = PIOc_read_darray(ncid2, varid, ioid, arraylen, test_data_in)))
ERR(ret);

/* /\* Read the data. *\/ */
/* if ((ret = PIOc_get_vard(ncid2, varid, ioid, 0, (void *)test_data_in))) */
/* ERR(ret); */

/* Check the results. */
for (int f = 0; f < arraylen; f++)
{
Expand Down
Loading

0 comments on commit 2ec36c7

Please sign in to comment.