diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-05-13 21:58:24 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-05-13 21:58:24 +0000 |
commit | fe3fbf6860e1ba5f2ff32def6ed8a63148fd98fa (patch) | |
tree | fe8bc2b0178ae1b93d62fd37f53f4502b6e8cfb4 | |
parent | 71760f525ac2c6ff9f2ce302cf737c6703165557 (diff) | |
download | ATCD-fe3fbf6860e1ba5f2ff32def6ed8a63148fd98fa.tar.gz |
fixed traps, and use port that depends on uid
-rwxr-xr-x | TAO/tests/Param_Test/run_test.sh | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/TAO/tests/Param_Test/run_test.sh b/TAO/tests/Param_Test/run_test.sh index 6af06e1af7a..8b0a7ef384c 100755 --- a/TAO/tests/Param_Test/run_test.sh +++ b/TAO/tests/Param_Test/run_test.sh @@ -1,25 +1,37 @@ #!/bin/sh # $Id$ -PORT=30001 -IORFILE=theior -INVOCATION=sii +uid=`id | cut -c5-20 | cut -f1 -d"("` +port=`expr 30001 + $uid` +iorfile=theior +invocation=sii + +if [ `uname -s` = 'SunOS' ]; then + #### SunOS sh's trap doesn't understand symbolic names for signals. + sigchld=18 +else + sigchld='SIGCHLD' + # Don't do this on SunOS. It goes into an endless loop. + trap "start_server" $sigchld +fi + start_server() { - ./server -ORBobjrefstyle url -ORBport $PORT -o $IORFILE 2>&1 | sed -e 's/^/SERVER: /' & + ./server -ORBobjrefstyle url -ORBport $port -o $iorfile 2>&1 | \ + sed -e 's/^/SERVER: /' & server_pid=`ps | grep server | grep -v grep | awk '{print $1;}'` sleep 2 # Give the server a chance to start up } # Restart the server if we get SIGCHLD, i.e., the server died. -trap "start_server" SIGCHLD start_server -trap "kill $server_pid; rm -f $IORFILE" 0 1 2 3 15 +trap "kill $server_pid; rm -f $iorfile" 0 1 2 3 15 -TYPES="short ubstring fixed_struct strseq var_struct nested_struct struct_seq objref" -for type in $TYPES +types="short ubstring fixed_struct strseq var_struct nested_struct struct_seq objref" +for type in $types do echo "BEGIN Testing type $type" - ./client -f $IORFILE -i $INVOCATION -t $type 2>&1 | sed -e "s/^/CLIENT($type): /" + ./client -f $iorfile -i $invocation -t $type 2>&1 | \ + sed -e "s/^/CLIENT($type): /" echo "END Testing type $type" done |