From cf96820c1886c651b78f04d8b29cef192748270c Mon Sep 17 00:00:00 2001 From: Ed Date: Thu, 28 Mar 2019 14:20:25 -0600 Subject: [PATCH] more codacy fixes --- tests/cunit/run_tests.sh | 10 ++++++++-- tests/cunit/test_darray_multivar3.c | 7 +++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/tests/cunit/run_tests.sh b/tests/cunit/run_tests.sh index 105bfd1b90c..5d5b92f2778 100755 --- a/tests/cunit/run_tests.sh +++ b/tests/cunit/run_tests.sh @@ -25,7 +25,10 @@ for TEST in $PIO_TESTS do success1=false echo "running ${TEST}" - mpiexec -n 4 ./${TEST} && success1=true || break + mpiexec -n 4 ./${TEST} && success1=true + if test $success1 = false; then + break + fi done PIO_TESTS_8='test_async_multi2' @@ -34,7 +37,10 @@ for TEST in $PIO_TESTS_8 do success2=false echo "running ${TEST}" - mpiexec -n 8 ./${TEST} && success2=true || break + mpiexec -n 8 ./${TEST} && success2=true + if test $success2 = false; then + break + fi done # Did we succeed? diff --git a/tests/cunit/test_darray_multivar3.c b/tests/cunit/test_darray_multivar3.c index dc12b9e0c20..eeba70aa689 100644 --- a/tests/cunit/test_darray_multivar3.c +++ b/tests/cunit/test_darray_multivar3.c @@ -276,11 +276,8 @@ int main(int argc, char **argv) { int my_rank; int ntasks; - int num_flavors; /* Number of PIO netCDF flavors in this build. */ - int flavor[NUM_FLAVORS]; /* iotypes for the supported netCDF IO flavors. */ MPI_Comm test_comm; /* A communicator for this test. */ int ioid; - int dim_len_2d[NDIM2] = {X_DIM_LEN, Y_DIM_LEN}; int ret; /* Return code. */ /* Initialize test. */ @@ -297,7 +294,9 @@ int main(int argc, char **argv) int iosysid; /* The ID for the parallel I/O system. */ int ioproc_stride = 1; /* Stride in the mpi rank between io tasks. */ int ioproc_start = 0; /* Zero based rank of first processor to be used for I/O. */ - int ret; /* Return code. */ + int dim_len_2d[NDIM2] = {X_DIM_LEN, Y_DIM_LEN}; + int num_flavors; /* Number of PIO netCDF flavors in this build. */ + int flavor[NUM_FLAVORS]; /* iotypes for the supported netCDF IO flavors. */ /* Figure out iotypes. */ if ((ret = get_iotypes(&num_flavors, flavor)))