X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2Fdeployments%2Fbasic%2Fconfigure.sh;h=5257578b941b98af6a79a4e8ee0bf51607ea8fef;hb=ebd820491574c758104c09ca06bf3347ed87c88f;hp=c377a13f8df2d505b595d9e642a1ddde1a818057;hpb=b8d9d3d86c425cf545bbee4fa48522157a55c3bd;p=anna.git diff --git a/example/diameter/launcher/deployments/basic/configure.sh b/example/diameter/launcher/deployments/basic/configure.sh index c377a13..5257578 100755 --- a/example/diameter/launcher/deployments/basic/configure.sh +++ b/example/diameter/launcher/deployments/basic/configure.sh @@ -4,18 +4,8 @@ # VARIABLES # ############# -# Diameter dictionary: -STD_DICTIONARY=stacks/avps_etsi.xml,stacks/avps_ietf.xml,stacks/avps_tgpp.xml,stacks/commands_baseProtocol.xml -APP_DICTIONARY=stacks/commands_qosControl.xml -DICTIONARY=$STD_DICTIONARY,$APP_DICTIONARY - -# Communication endpoints: -LOCAL_STANDARD_ENDPOINT=localhost:3868 -EXAMPLE_ENTITY_4_BALANCER=192.168.12.11:3868,192.168.12.21:3868 -CONNS=10 - # General -EXE_BN=ADL-launcher +EXE_BN=ADML ############# # FUNCTIONS # @@ -34,12 +24,13 @@ createRunScript () { cat << EOF > run.sh #!/bin/bash cd \`dirname \$0\` -STARTED=\`pgrep $1 2>/dev/null\` +STARTED=\`pgrep $1$ 2>/dev/null\` [ \$? -eq 0 ] && { echo "Already started!"; echo "\$STARTED" ; exit 1 ; } -0> launcher.traces -rm -f counters/* +0> launcher.trace +rm -f counters/* test-reports/* # Execution line: -./$@ & +export LD_LIBRARY_PATH=\$PWD/dynlibs +./$@ --services services.xml & echo \$! > .pid EOF @@ -68,13 +59,16 @@ read option tol=$(get_tol $option) [ "$tol" = "" ] && _exit "Option '$option' not implemented !!" +# Services +ln -sf services/${tol}.xml services.xml + # Tracing -TRACING="-cntDir counters" +DEBUG="--cntDir counters --tmDir test-reports" echo echo "Enable debug traces ? (y/n) [n]:" read enable [ "$enable" = "" ] && enable=n -[ "$enable" = "y" ] && TRACING="$TRACING -trace debug" +[ "$enable" = "y" ] && DEBUG="$DEBUG --trace debug" # Kindness KINDNESS= @@ -83,7 +77,7 @@ echo "Strict xml for decoded messages ? (y/n) [y]:" echo " (ignoring flags turns a made-up xml representation; execute './$EXE_BN | grep -A1 ignoreFlags:' for more help)" read strict [ "$strict" = "" ] && strict=y -[ "$strict" = "n" ] && KINDNESS="-ignoreFlags" +[ "$strict" = "n" ] && KINDNESS="--ignoreFlags" if [ "$option" = "s" ] then echo @@ -91,33 +85,33 @@ then echo " (ignoring errors, the process won't answer Failed-AVP automatically; execute './$EXE_BN | grep -A1 ignoreErrors:' for more help)" read i_errors [ "$i_errors" = "" ] && i_errors=n - [ "$i_errors" = "y" ] && KINDNESS="$KINDNESS -ignoreErrors" + [ "$i_errors" = "y" ] && KINDNESS="$KINDNESS --ignoreErrors" fi # Run script: -EXE_LINK=ADL-$tol -ln -sf $EXE_BN $EXE_LINK +EXE_LINK=`basename $PWD` +[ "$EXE_BN" != "$EXE_LINK" ] && ln -sf $EXE_BN $EXE_LINK case $tol in client) ENTITY=$LOCAL_STANDARD_ENDPOINT - createRunScript $EXE_LINK -dictionary $DICTIONARY -entity $ENTITY -entityServerSessions $CONNS -diameterServerSessions 0 $KINDNESS $TRACING & + createRunScript $EXE_LINK $KINDNESS $DEBUG & ;; server) SERVER=$LOCAL_STANDARD_ENDPOINT - createRunScript $EXE_LINK -dictionary $DICTIONARY -diameterServer $SERVER -diameterServerSessions $CONNS -entityServerSessions 0 $KINDNESS $TRACING & + createRunScript $EXE_LINK $KINDNESS $DEBUG & ;; balancer) SERVER=$LOCAL_STANDARD_ENDPOINT ENTITY=$EXAMPLE_ENTITY_4_BALANCER - createRunScript $EXE_LINK -dictionary $DICTIONARY -entity $ENTITY -entityServerSessions $CONNS -diameterServer $SERVER -diameterServerSessions $CONNS -balance $KINDNESS $TRACING & + createRunScript $EXE_LINK $KINDNESS $DEBUG & ;; dummy) - createRunScript $EXE_LINK -dictionary $DICTIONARY -entityServerSessions 0 -diameterServerSessions 0 $KINDNESS $TRACING & + createRunScript $EXE_LINK $KINDNESS $DEBUG & ;; esac @@ -125,3 +119,4 @@ esac echo echo "Created 'run.sh' script !" echo +