diff options
Diffstat (limited to 'hl/c++')
-rwxr-xr-x | hl/c++/examples/run-hlc++-ex.sh.in | 10 |
1 files changed, 6 insertions, 4 deletions
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 |