From f6a2bc0692ff9b4eb3cf35b3458acc3b527a5f66 Mon Sep 17 00:00:00 2001 From: Eduardo Ramos Testillano Date: Sun, 25 Jun 2017 21:28:20 +0200 Subject: [PATCH] RPATH skipped. Added testing so library. Improve support for default CCR configuration in st client --- CMakeLists.txt | 3 +++ dynamic/launcher/gx/00001/CCR-I.xml | 5 +++++ dynamic/launcher/gx/00001/CCR-T.xml | 5 +++++ example/diameter/launcher/deploy.sh | 1 + .../launcher/deployments/st-client/checkStatus.sh | 10 +++++++--- .../diameter/launcher/deployments/st-client/program.sh | 2 +- 6 files changed, 22 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b2f7460..fdeaae9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,9 @@ set(VERSION_MAJOR 1) set(VERSION_MINOR 0) set(VERSION_PATCH 0) +# Dynamic libraries not linked to build tree: +set(CMAKE_SKIP_RPATH TRUE) + # Build type: if(NOT CMAKE_BUILD_TYPE) message(WARNING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel.") diff --git a/dynamic/launcher/gx/00001/CCR-I.xml b/dynamic/launcher/gx/00001/CCR-I.xml index 3c5ed41..750b595 100644 --- a/dynamic/launcher/gx/00001/CCR-I.xml +++ b/dynamic/launcher/gx/00001/CCR-I.xml @@ -1,7 +1,12 @@ + + + + diff --git a/dynamic/launcher/gx/00001/CCR-T.xml b/dynamic/launcher/gx/00001/CCR-T.xml index d5cc2e7..b52a6f2 100644 --- a/dynamic/launcher/gx/00001/CCR-T.xml +++ b/dynamic/launcher/gx/00001/CCR-T.xml @@ -1,7 +1,12 @@ + + + + diff --git a/example/diameter/launcher/deploy.sh b/example/diameter/launcher/deploy.sh index c5a5101..d96ddee 100755 --- a/example/diameter/launcher/deploy.sh +++ b/example/diameter/launcher/deploy.sh @@ -168,6 +168,7 @@ mkdir -p $DPATH/test-reports # Dynamic libs: cp -r $LIB_DIR/dynamic/launcher $DPATH/dynlibs +cp $LIB_DIR/libanna_testing_shared.so $DPATH/dynlibs # Get stuff from leaf directories: cd $LIB_DIR/dynamic/launcher diff --git a/example/diameter/launcher/deployments/st-client/checkStatus.sh b/example/diameter/launcher/deployments/st-client/checkStatus.sh index ec658cb..7bbdb3b 100755 --- a/example/diameter/launcher/deployments/st-client/checkStatus.sh +++ b/example/diameter/launcher/deployments/st-client/checkStatus.sh @@ -4,10 +4,13 @@ ADML_CONNECTIONS=`cat .st_conf_adml_connections 2>/dev/null` ADML_INSTANCES=`cat .st_conf_adml_instances 2>/dev/null` RESULT_CODE=0 +cd $(dirname $0) +#[ -z "$ADML_CONNECTIONS" -o -z "$ADML_INSTANCES" ] && { echo "Miss configuration. Run ./configure.sh" ; exit 3 ; } + echo -n "Checking instances ... " ADML_INSTANCES_ALIVE=$(pgrep ADML- | wc -l) echo -n "$ADML_INSTANCES_ALIVE instances alive" -if [ $ADML_INSTANCES_ALIVE -ne $ADML_INSTANCES ] +if [ $ADML_INSTANCES_ALIVE -lt $ADML_INSTANCES ] then echo " ! (expected $ADML_INSTANCES configured)" RESULT_CODE=1 @@ -15,10 +18,11 @@ else echo fi +cmd="netstat -a | grep :diameter | grep ESTABLISHED | wc -l" echo -n "Checking connections ... " -ADML_CONNECTIONS_ALIVE=$(netstat -a | grep :diameter | grep ESTABLISHED | wc -l) +ADML_CONNECTIONS_ALIVE=$(eval $cmd) ADML_TOTAL_CONNECTIONS=$((ADML_CONNECTIONS*ADML_INSTANCES)) -echo -n "$ADML_CONNECTIONS_ALIVE connections established" +echo -n "$ADML_CONNECTIONS_ALIVE connections established (using '$cmd')" if [ $ADML_CONNECTIONS_ALIVE -ne $ADML_TOTAL_CONNECTIONS ] then echo " ! (expected $ADML_TOTAL_CONNECTIONS configured)" diff --git a/example/diameter/launcher/deployments/st-client/program.sh b/example/diameter/launcher/deployments/st-client/program.sh index 8c461ac..a5f1ae1 100755 --- a/example/diameter/launcher/deployments/st-client/program.sh +++ b/example/diameter/launcher/deployments/st-client/program.sh @@ -83,7 +83,7 @@ EOF } advice_to_squeeze_idle_cpu () { - local idle=$(top -b -d 0.1 -n 2 | grep 'Cpu(s):'| tail -1 | awk '{print $8}' | sed 's/,/./') + local idle=$(top -b -d 1 -n 2 | grep 'Cpu(s):'| tail -1 | awk '{print $8}' | sed 's/,/./') sleep 10 echo echo "Idle cpu now: $idle. Check the system CPU with top. If is not overcommited, consider" -- 2.20.1