From f278315081b24b59bf73e9613e552e3519200a71 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Mon, 28 May 2012 04:39:18 +0000 Subject: Improve error reporting with a reason code. Improve debug and audit logging. Fix test scripts to cleanup state from previous builds and correctly report test errors. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1343138 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/modules/wsgi/gae-stop | 6 +++++- sca-cpp/trunk/modules/wsgi/http-test | 3 +++ sca-cpp/trunk/modules/wsgi/util-test | 1 + sca-cpp/trunk/modules/wsgi/wiring-test | 1 + sca-cpp/trunk/modules/wsgi/wsgi-stop | 6 +++++- sca-cpp/trunk/modules/wsgi/wsgi-test | 1 + 6 files changed, 16 insertions(+), 2 deletions(-) (limited to 'sca-cpp/trunk/modules/wsgi') diff --git a/sca-cpp/trunk/modules/wsgi/gae-stop b/sca-cpp/trunk/modules/wsgi/gae-stop index c0ff29cfaa..5bb2965515 100755 --- a/sca-cpp/trunk/modules/wsgi/gae-stop +++ b/sca-cpp/trunk/modules/wsgi/gae-stop @@ -26,4 +26,8 @@ python_prefix=`cat $here/../python/python.prefix` gae_prefix=`cat $here/gae.prefix` py="$python_prefix/bin/python $gae_prefix/dev_appserver.py -a 0.0.0.0 -p $port $root" -kill `ps -ef | grep -v grep | grep "${py}" | awk '{ print $2 }'` +k=`ps -ef | grep -v grep | grep "${py}" | awk '{ print $2 }'` +if [ "$k" != "" ]; then + kill $k +fi + diff --git a/sca-cpp/trunk/modules/wsgi/http-test b/sca-cpp/trunk/modules/wsgi/http-test index aef76d47c4..d6c608571e 100755 --- a/sca-cpp/trunk/modules/wsgi/http-test +++ b/sca-cpp/trunk/modules/wsgi/http-test @@ -18,6 +18,7 @@ # under the License. # Setup +rm -rf tmp mkdir -p tmp ./wsgi-start target 8090 2>/dev/null sleep 2 @@ -25,6 +26,8 @@ sleep 2 # Test JSON-RPC here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` python_prefix=`cat $here/../python/python.prefix` +export LD_LIBRARY_PATH=$python_prefix/lib:$LD_LIBRARY_PATH + $python_prefix/bin/python http-test.py rc=$? diff --git a/sca-cpp/trunk/modules/wsgi/util-test b/sca-cpp/trunk/modules/wsgi/util-test index 184eb1c788..3bdfc018ff 100755 --- a/sca-cpp/trunk/modules/wsgi/util-test +++ b/sca-cpp/trunk/modules/wsgi/util-test @@ -20,6 +20,7 @@ # Run Python util test cases here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` python_prefix=`cat $here/../python/python.prefix` +export LD_LIBRARY_PATH=$python_prefix/lib:$LD_LIBRARY_PATH $python_prefix/bin/python stream-test.py rc=$? diff --git a/sca-cpp/trunk/modules/wsgi/wiring-test b/sca-cpp/trunk/modules/wsgi/wiring-test index 35d96a3889..cbecc201e8 100755 --- a/sca-cpp/trunk/modules/wsgi/wiring-test +++ b/sca-cpp/trunk/modules/wsgi/wiring-test @@ -26,6 +26,7 @@ if [ "$uri" = "" ]; then fi # Setup +rm -rf tmp mkdir -p tmp ./wsgi-start target 8090 2>/dev/null sleep 2 diff --git a/sca-cpp/trunk/modules/wsgi/wsgi-stop b/sca-cpp/trunk/modules/wsgi/wsgi-stop index e47967e528..3d388ac313 100755 --- a/sca-cpp/trunk/modules/wsgi/wsgi-stop +++ b/sca-cpp/trunk/modules/wsgi/wsgi-stop @@ -25,4 +25,8 @@ port=$2 python_prefix=`cat $here/../python/python.prefix` py="$python_prefix/bin/python composite.py $port" -kill `ps -ef | grep -v grep | grep "${py}" | awk '{ print $2 }'` +k=`ps -ef | grep -v grep | grep "${py}" | awk '{ print $2 }'` +if [ "$k" != "" ]; then + kill $k +fi + diff --git a/sca-cpp/trunk/modules/wsgi/wsgi-test b/sca-cpp/trunk/modules/wsgi/wsgi-test index c17e29047d..f8334b33ad 100755 --- a/sca-cpp/trunk/modules/wsgi/wsgi-test +++ b/sca-cpp/trunk/modules/wsgi/wsgi-test @@ -22,6 +22,7 @@ here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $h curl_prefix=`cat $here/../http/curl.prefix` # Setup +rm -rf tmp mkdir -p tmp ./wsgi-start target 8090 2>/dev/null sleep 2 -- cgit v1.2.3