From 30fee2b4da466372f2a7d9bee85fc7af49746d60 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Tue, 12 Apr 2011 11:19:22 -0500 Subject: [svn-r20479] Fixed issue HDFFV-5866 (BZ 2156). Changed scripts to run examples to use specific names for compiled executable files instead of a.out, which did not work on Cywin as it produces a.exe by default. Removed issue from known problems section of RELEASE.txt. Tested with h5committest and Cygwin 1.7.8 on Windows 7. --- c++/examples/run-c++-ex.sh.in | 15 +++++++++++---- examples/run-c-ex.sh.in | 23 +++++++++++++++++++---- fortran/examples/run-fortran-ex.sh.in | 22 ++++++++++++++++++---- hl/c++/examples/run-hlc++-ex.sh.in | 10 ++++++---- hl/examples/run-hlc-ex.sh.in | 28 ++++++++++++++++++++++++---- hl/fortran/examples/run-hlfortran-ex.sh.in | 9 +++++---- release_docs/RELEASE.txt | 2 -- 7 files changed, 83 insertions(+), 26 deletions(-) diff --git a/c++/examples/run-c++-ex.sh.in b/c++/examples/run-c++-ex.sh.in index bd7106e..21db584 100755 --- a/c++/examples/run-c++-ex.sh.in +++ b/c++/examples/run-c++-ex.sh.in @@ -43,17 +43,18 @@ H5TOOL_BIN="${prefix}/bin/${H5TOOL}" # The path of the tool binary #### Run test #### RunTest() { + TEST_EXEC=$1 Test=$1".cpp" echo echo "################# $1 #################" - ${H5TOOL_BIN} $Test + ${H5TOOL_BIN} -o $TEST_EXEC $Test if [ $? -ne 0 ] then echo "messed up compiling $Test" exit 1 fi - ./a.out + ./$TEST_EXEC } @@ -64,12 +65,19 @@ RunTest() if [ $? -eq 0 ] then if (RunTest create &&\ + rm create &&\ RunTest readdata &&\ + rm readdata &&\ RunTest writedata &&\ + rm writedata &&\ RunTest compound &&\ + rm compound &&\ RunTest extend_ds &&\ + rm extend_ds &&\ RunTest chunks &&\ - RunTest h5group); then + rm chunks &&\ + RunTest h5group &&\ + rm h5group); then EXIT_VALUE=${EXIT_SUCCESS} else EXIT_VALUE=${EXIT_FAILURE} @@ -77,7 +85,6 @@ then fi # Cleanup -rm a.out rm *.o rm *.h5 echo diff --git a/examples/run-c-ex.sh.in b/examples/run-c-ex.sh.in index 2bc1cd4..0627eb8 100755 --- a/examples/run-c-ex.sh.in +++ b/examples/run-c-ex.sh.in @@ -47,17 +47,18 @@ H5TOOL_BIN="${prefix}/bin/${H5TOOL}" # The path of the tool binary #### Run test #### RunTest() { + TEST_EXEC=$1 Test=$1".c" echo echo "################# $1 #################" - ${H5TOOL_BIN} $Test + ${H5TOOL_BIN} -o $TEST_EXEC $Test if [ $? -ne 0 ] then echo "messed up compiling $Test" exit 1 fi - ./a.out + ./$TEST_EXEC } @@ -78,20 +79,35 @@ fi if [ $? -eq 0 ] then if (RunTest h5_write &&\ + rm h5_write &&\ RunTest h5_read &&\ + rm h5_read &&\ RunTest h5_extend_write &&\ + rm h5_extend_write &&\ RunTest h5_chunk_read &&\ + rm h5_chunk_read &&\ RunTest h5_compound &&\ + rm h5_compound &&\ RunTest h5_group &&\ + rm h5_group &&\ RunTest h5_select &&\ + rm h5_select &&\ RunTest h5_attribute &&\ + rm h5_attribute &&\ RunTest h5_mount &&\ + rm h5_mount &&\ RunTest h5_reference &&\ + rm h5_reference &&\ RunTest h5_drivers &&\ + rm h5_drivers &&\ RunTest h5_ref2reg &&\ + rm h5_ref2reg &&\ RunTest h5_extlink &&\ + rm h5_extlink &&\ RunTest h5_elink_unix2win &&\ - RunTest h5_shared_mesg); then + rm h5_elink_unix2win &&\ + RunTest h5_shared_mesg &&\ + rm h5_shared_mesg); then EXIT_VALUE=${EXIT_SUCCESS} else EXIT_VALUE=${EXIT_FAILURE} @@ -99,7 +115,6 @@ then fi # Cleanup -rm a.out rm *.o rm *.h5 rm -rf red blue u2w diff --git a/fortran/examples/run-fortran-ex.sh.in b/fortran/examples/run-fortran-ex.sh.in index b29eaaf..2ab4aef 100755 --- a/fortran/examples/run-fortran-ex.sh.in +++ b/fortran/examples/run-fortran-ex.sh.in @@ -49,17 +49,18 @@ H5TOOL_BIN="${prefix}/bin/${H5TOOL}" # The path of the tool binary #### Run test #### RunTest() { + TEST_EXEC=$1 Test=$1".f90" echo echo "################# $1 #################" - ${H5TOOL_BIN} $Test + ${H5TOOL_BIN} -o $TEST_EXEC $Test if [ $? -ne 0 ] then echo "messed up compiling $Test" exit 1 fi - ./a.out + ./$TEST_EXEC } @@ -70,19 +71,33 @@ RunTest() if [ $? -eq 0 ] then if (RunTest dsetexample &&\ + rm dsetexample &&\ RunTest fileexample &&\ + rm fileexample &&\ RunTest rwdsetexample &&\ + rm rwdsetexample &&\ RunTest attrexample &&\ + rm attrexample &&\ RunTest groupexample &&\ + rm groupexample &&\ RunTest grpsexample &&\ + rm grpsexample &&\ RunTest grpdsetexample &&\ + rm grpdsetexample &&\ RunTest hyperslab &&\ + rm hyperslab &&\ RunTest selectele &&\ + rm selectele &&\ RunTest grpit &&\ + rm grpit &&\ RunTest refobjexample &&\ + rm refobjexample &&\ RunTest refregexample &&\ + rm refregexample &&\ RunTest mountexample &&\ - RunTest compound); then + rm mountexample &&\ + RunTest compound &&\ + rm compound); then EXIT_VALUE=${EXIT_SUCCESS} else EXIT_VALUE=${EXIT_FAILURE} @@ -90,7 +105,6 @@ then fi # Cleanup -rm a.out rm *.o rm *.h5 echo diff --git a/hl/c++/examples/run-hlc++-ex.sh.in b/hl/c++/examples/run-hlc++-ex.sh.in index d43606e..b800981 100755 --- a/hl/c++/examples/run-hlc++-ex.sh.in +++ b/hl/c++/examples/run-hlc++-ex.sh.in @@ -42,17 +42,18 @@ H5TOOL_BIN="${prefix}/bin/${H5TOOL}" # The path of the tool binary #### Run test #### RunTest() { + TEST_EXEC=$1 Test=$1".cpp" echo echo "################# $1 #################" - ${H5TOOL_BIN} $Test + ${H5TOOL_BIN} -o $TEST_EXEC $Test if [ $? -ne 0 ] then echo "messed up compiling $Test" exit 1 fi - ./a.out + ./$TEST_EXEC } @@ -63,7 +64,9 @@ RunTest() if [ $? -eq 0 ] then if (RunTest ptExampleFL &&\ - RunTest ptExampleVL); then + rm ptExampleFL &&\ + RunTest ptExampleVL &&\ + rm ptExampleVL); then EXIT_VALUE=${EXIT_SUCCESS} else EXIT_VALUE=${EXIT_FAILURE} @@ -71,7 +74,6 @@ then fi # Cleanup -rm a.out rm *.o rm *.h5 echo diff --git a/hl/examples/run-hlc-ex.sh.in b/hl/examples/run-hlc-ex.sh.in index 86c6276..ae3fcdb 100755 --- a/hl/examples/run-hlc-ex.sh.in +++ b/hl/examples/run-hlc-ex.sh.in @@ -47,17 +47,18 @@ H5TOOL_BIN="${prefix}/bin/${H5TOOL}" # The path of the tool binary #### Run test #### RunTest() { + TEST_EXEC=$1 Test=$1".c" echo echo "################# $1 #################" - ${H5TOOL_BIN} $Test + ${H5TOOL_BIN} -o $TEST_EXEC $Test if [ $? -ne 0 ] then echo "messed up compiling $Test" exit 1 fi - ./a.out + ./$TEST_EXEC } @@ -68,25 +69,45 @@ RunTest() if [ $? -eq 0 ] then if (RunTest ex_lite1 &&\ + rm ex_lite1 &&\ RunTest ex_lite2 &&\ + rm ex_lite2 &&\ RunTest ex_lite3 &&\ + rm ex_lite3 &&\ RunTest ptExampleFL &&\ + rm ptExampleFL &&\ RunTest ptExampleVL &&\ + rm ptExampleVL &&\ RunTest ex_image1 &&\ + rm ex_image1 &&\ RunTest ex_image2 &&\ + rm ex_image2 &&\ RunTest ex_table_01 &&\ + rm ex_table_01 &&\ RunTest ex_table_02 &&\ + rm ex_table_02 &&\ RunTest ex_table_03 &&\ + rm ex_table_03 &&\ RunTest ex_table_04 &&\ + rm ex_table_04 &&\ RunTest ex_table_05 && + rm ex_table_05 && RunTest ex_table_06 &&\ + rm ex_table_06 &&\ RunTest ex_table_07 &&\ + rm ex_table_07 &&\ RunTest ex_table_08 &&\ + rm ex_table_08 &&\ RunTest ex_table_09 &&\ + rm ex_table_09 &&\ RunTest ex_table_10 &&\ + rm ex_table_10 &&\ RunTest ex_table_11 &&\ + rm ex_table_11 &&\ RunTest ex_table_12 &&\ - RunTest ex_ds1); then + rm ex_table_12 &&\ + RunTest ex_ds1 &&\ + rm ex_ds1); then EXIT_VALUE=${EXIT_SUCCESS} else EXIT_VALUE=${EXIT_FAILURE} @@ -94,7 +115,6 @@ then fi # Cleanup -rm a.out rm *.o rm *.h5 echo diff --git a/hl/fortran/examples/run-hlfortran-ex.sh.in b/hl/fortran/examples/run-hlfortran-ex.sh.in index 364b438..919771d 100755 --- a/hl/fortran/examples/run-hlfortran-ex.sh.in +++ b/hl/fortran/examples/run-hlfortran-ex.sh.in @@ -48,17 +48,18 @@ H5TOOL_BIN="${prefix}/bin/${H5TOOL}" # The path of the tool binary #### Run test #### RunTest() { + TEST_EXEC=$1 Test=$1".f90" echo echo "################# $1 #################" - ${H5TOOL_BIN} $Test + ${H5TOOL_BIN} -o $TEST_EXEC $Test if [ $? -ne 0 ] then echo "messed up compiling $Test" exit 1 fi - ./a.out + ./$TEST_EXEC } @@ -68,7 +69,8 @@ RunTest() # Run tests if [ $? -eq 0 ] then - if (RunTest exlite); then + if (RunTest exlite &&\ + rm exlite); then EXIT_VALUE=${EXIT_SUCCESS} else EXIT_VALUE=${EXIT_FAILURE} @@ -76,7 +78,6 @@ then fi # Cleanup -rm a.out rm *.o rm *.h5 echo diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index b77a272..c01ca41 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -415,8 +415,6 @@ Known Problems ============== * --with-mpe configure option does not work with Mpich2. AKC - 2011/03/10) -* examples/run-all-ex.sh does not work on Cygwin. (NAF - 2011/02/11) - * If parallel gmake (e.g., gmake -j 4) is used, the "gmake clean" command sometimes fails in the perform directory due to the attempt to remove the executable of h5perf or h5perf_serial by two "parallel" commands. This error -- cgit v0.12