System test refinement
[anna.git] / example / diameter / launcher / DEPLOY.sh
index e44e928..1023729 100755 (executable)
@@ -8,6 +8,7 @@ MSGDTD=../../../include/anna/diameter/codec/message.dtd
 DCTDTD=../../../include/anna/diameter/stack/dictionary.dtd
 BASE_PROT=commands_baseProtocol.xml
 SERVICES=./resources/services_examples
+STACK_EXAMPLES=./resources/stack_examples
 SRVDTD=$SERVICES/services.dtd
 
 # Executables in priority order:
@@ -17,6 +18,7 @@ EXECS=( $EXEC_installed ./release/example_diameter_launcher ./debug/example_diam
 # Stack management
 STACKMGMT_EXEC_installed=/opt/bin/anna/example_diameter_stackManagement
 STACKMGMT_EXECS=( $STACKMGMT_EXEC_installed ../stackManagement/release/example_diameter_stackManagement ../stackManagement/debug/example_diameter_stackManagement )
+:1
 
 #############
 # FUNCTIONS #
@@ -54,17 +56,17 @@ createRunScript () {
   [ "$1" = "b" ] && return
 
   local other=
-  [ "$1" = "a" ] && { exe=ADML-launcher ; other="--httpServer \`grep -v ^# .httpServer\`"; }
-  [ "$1" = "f" ] && { exe=ADML-ftclient ; ln -s ADML-launcher $exe ; }
-  [ "$1" = "s" ] && { exe=ADML-stclient ; other="--disableLogs"; ln -s ADML-launcher $exe ; }
+  [ "$1" = "a" ] && other="--httpServer \`grep -v ^# .httpServer\`"
+  [ "$1" = "f" ] && ln -s ADML-launcher $EXE
+  [ "$1" = "s" ] && { other="--disableLogs"; ln -s ADML-launcher $EXE ; }
 
   echo "Creating 'run.sh' script ..."
 
   cat << EOF > run.sh
 #!/bin/bash
 cd \`dirname \$0\`
-EXE=$exe
-STARTED=\`pgrep \$EXE 2>/dev/null\`
+EXE=$EXE
+STARTED=\`pgrep \$EXE$ 2>/dev/null\`
 [ \$? -eq 0 ] && { echo "Already started!"; echo "\$STARTED" ; exit 1 ; }
 ./pre-start.sh
 0> launcher.trace
@@ -154,7 +156,7 @@ then
   echo " (a)dvanced version:     includes burst management script and templates for different scenarios. Automatic configuration during start."
   echo " (b)asic version:        4 types of launcher (client, server, balancer, dummy), lightly configured and managed through SIGURS2 method."
   echo " (f)unction test client: special client with regexp scheduler script based on splitted traffic logs. Requires a server to perform the tests."
-  echo " (s)ystem test client:   special client for stress testing. Requires a server to perform the tests."
+  echo " (s)ystem test client:   special client for stress testing. Requires a server/s to perform the tests."
   echo
   echo "Input option [b]:"
   read option
@@ -204,6 +206,7 @@ else
 fi
 
 [ -d $DPATH ] && _exit "The installation path '$DPATH' must not exists."
+EXE=ADML-`basename $DPATH`
 
 echo "Copying to '$DPATH' ..."
 mkdir -p $DPATH
@@ -222,6 +225,8 @@ cp -rL $DEPLOYMENTS_DIR/* $DPATH
 cp $SETUPS_DIR/*xml $DPATH/stacks
 cp $SETUPS_DIR/*sh $DPATH/stacks
 cp $SETUPS_DIR/readme.txt $DPATH/stacks
+mkdir $DPATH/stacks/other_examples
+cp $STACK_EXAMPLES/* $DPATH/stacks/other_examples 
 cp $MSGDTD $DPATH/DTDs
 cp $DCTDTD $DPATH/DTDs
 cp $SRVDTD $DPATH/DTDs