diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-01-05 20:51:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-05 20:51:25 (GMT) |
commit | cedd2a41f5143834084a6e2f609929f19a55cb2b (patch) | |
tree | 9ea93a5932b4d47972c3da26527b9225548d1a79 /test/test_mirror.sh.in | |
parent | 363b26fa0d9dadcd96e611ed38956afeaa94851a (diff) | |
download | hdf5-cedd2a41f5143834084a6e2f609929f19a55cb2b.zip hdf5-cedd2a41f5143834084a6e2f609929f19a55cb2b.tar.gz hdf5-cedd2a41f5143834084a6e2f609929f19a55cb2b.tar.bz2 |
Brings mirror VFD test fixes from develop (#2392)
Diffstat (limited to 'test/test_mirror.sh.in')
-rw-r--r-- | test/test_mirror.sh.in | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/test/test_mirror.sh.in b/test/test_mirror.sh.in index b3e75c6..fbc7ede 100644 --- a/test/test_mirror.sh.in +++ b/test/test_mirror.sh.in @@ -22,7 +22,10 @@ nerrors=0 SERVER_VERBOSITY="--verbosity=1" -SERVER_PORT="--port=3000" +# Choose random ephemeral port number +RANDOM_PORT=$[ $RANDOM % 16384 + 49152 ] +echo "Using port: $RANDOM_PORT" +SERVER_PORT="--port=$RANDOM_PORT" ############################################################################### @@ -45,7 +48,9 @@ done RUN_DIR=mirror_vfd_test MIRROR_UTILS=../utils/mirror_vfd # TODO: presupposes from test/ -mkdir $RUN_DIR +if [[ ! -d $RUN_DIR ]] ; then + mkdir $RUN_DIR +fi # Copy program files into dedicated test directory for FILE in $MIRROR_UTILS/mirror_* ; do @@ -61,6 +66,10 @@ cp mirror_vfd $RUN_DIR # wrapper script. Copy these libs builds if appropriate. if [ -f $MIRROR_UTILS/.libs/mirror_server ] ; then RUN_LIBS=$RUN_DIR/.libs + # Delete previous .libs directory, to remove any generated libtool files + if [[ -d $RUN_LIBS ]] ; then + rm -rf $RUN_LIBS + fi mkdir $RUN_LIBS for FILE in $MIRROR_UTILS/.libs/mirror_* ; do case "$FILE" in @@ -77,12 +86,15 @@ echo "Launching Mirror Server" SERVER_ARGS="$SERVER_PORT $SERVER_VERBOSITY" ./mirror_server $SERVER_ARGS & -./mirror_vfd +./mirror_vfd $SERVER_PORT nerrors=$? echo "Stopping Mirror Server" ./mirror_server_stop $SERVER_PORT +# Wait for background server process to exit +wait + ############################################################################### ## Report and exit ############################################################################### |