Skip to content

Commit

Permalink
added test to cmake build
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Sep 4, 2019
1 parent 5eaa61d commit 1503141
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
4 changes: 4 additions & 0 deletions src/ncint/ncint_pio.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ nc_def_async(MPI_Comm world, int num_io_procs, int *io_proc_list,
if ((ret = PIO_NCINT_initialize()))
return ret;

/* Change error handling so we can test inval parameters. */
if ((ret = PIOc_set_iosystem_error_handling(PIO_DEFAULT, PIO_RETURN_ERROR, NULL)))
return ret;

/* Call the PIOc_ function to initialize the intracomm. */
if ((ret = PIOc_init_async(world, num_io_procs, io_proc_list,
component_count, num_procs_per_comp, proc_list,
Expand Down
3 changes: 3 additions & 0 deletions tests/cunit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ if (NOT PIO_USE_MPISERIAL)
target_link_libraries (test_async_multi2 pioc)
add_executable (test_async_manyproc EXCLUDE_FROM_ALL test_async_manyproc.c test_common.c)
target_link_libraries (test_async_manyproc pioc)
add_executable (test_async_1d EXCLUDE_FROM_ALL test_async_1d.c)
target_link_libraries (test_async_1d pioc)
endif ()
endif ()
add_executable (test_spmd EXCLUDE_FROM_ALL test_spmd.c test_common.c)
Expand Down Expand Up @@ -140,6 +142,7 @@ if(PIO_USE_MALLOC)
add_dependencies (tests test_async_multicomp)
add_dependencies (tests test_async_multi2)
add_dependencies (tests test_async_manyproc)
add_dependencies (tests test_async_1d)
endif ()

# Test Timeout in seconds.
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_vard'
'test_darray_fill test_darray_vard test_async_1d'

success1=true
success2=true
Expand Down
2 changes: 1 addition & 1 deletion tests/cunit/test_async_1d.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ int main(int argc, char **argv)
/* Make sure we have 4 tasks. */
if (ntasks != TARGET_NTASKS) ERR(ERR_WRONG);

PIOc_set_log_level(4);
/* PIOc_set_log_level(4); */

/* Change error handling so we can test inval parameters. */
if ((ret = PIOc_set_iosystem_error_handling(PIO_DEFAULT, PIO_RETURN_ERROR, NULL)))
Expand Down
6 changes: 3 additions & 3 deletions tests/ncint/tst_pio_async.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ main(int argc, char **argv)
int i;

/* Turn on logging for PIO library. */
PIOc_set_log_level(4);
if (!my_rank)
nc_set_log_level(3);
/* PIOc_set_log_level(4); */
/* if (!my_rank) */
/* nc_set_log_level(3); */

/* Initialize the intracomm. The IO task will not return from
* this call until the PIOc_finalize() is called by the
Expand Down

0 comments on commit 1503141

Please sign in to comment.