gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r9103 - gnunet/src/statistics


From: gnunet
Subject: [GNUnet-SVN] r9103 - gnunet/src/statistics
Date: Sun, 4 Oct 2009 06:17:19 -0600

Author: grothoff
Date: 2009-10-04 06:17:19 -0600 (Sun, 04 Oct 2009)
New Revision: 9103

Modified:
   gnunet/src/statistics/test_gnunet_statistics.sh
   gnunet/src/statistics/test_statistics_api_data.conf
Log:
use arm instead of bash-ish kill

Modified: gnunet/src/statistics/test_gnunet_statistics.sh
===================================================================
--- gnunet/src/statistics/test_gnunet_statistics.sh     2009-10-04 12:17:06 UTC 
(rev 9102)
+++ gnunet/src/statistics/test_gnunet_statistics.sh     2009-10-04 12:17:19 UTC 
(rev 9103)
@@ -1,13 +1,17 @@
-#!/bin/sh
+#!/bin/bash
 
 rm -rf /tmp/test-gnunetd-statistics/
 exe="./gnunet-statistics -c test_statistics_api_data.conf"
 base=/tmp/gnunet-test-statistics
+arm="gnunet-arm -c test_statistics_api_data.conf $DEBUG"
 #DEBUG="-L DEBUG"
 # -----------------------------------
 echo -n "Preparing: Starting service..."
-./gnunet-service-statistics $DEBUG -c test_statistics_api_data.conf  &
+
+$arm -s > /dev/null
 sleep 1
+$arm -i statistics > /dev/null
+sleep 1 
 echo "DONE"
 
 # 
----------------------------------------------------------------------------------
@@ -15,7 +19,7 @@
 
 if $exe -x 2> /dev/null; then
   echo "FAIL: error running $exe"
-  kill %%
+  $arm -e
   exit 1
 fi
 echo "PASS"
@@ -25,7 +29,7 @@
 
 if ! $exe $DEBUG -n test -s subsystem 42 ; then
   echo "FAIL: error running $exe"
-  kill %%
+  $arm -e
   exit 1
 fi
 echo "PASS"
@@ -35,7 +39,7 @@
 
 if ! $exe $DEBUG -n other -s osystem 43 ; then
   echo "FAIL: error running $exe"
-  kill %%
+  $arm -e
   exit 1
 fi
 echo "PASS"
@@ -45,13 +49,13 @@
 
 if ! $exe $DEBUG > $base.out; then
     echo "FAIL: error running $exe"
-    kill %%
+    $arm -e
     exit 1
 fi
 LINES=`cat $base.out | wc -l`
 if test $LINES -ne 2; then
     echo "FAIL: unexpected output"
-    kill %%
+    $arm -e
     exit 1
 fi
 echo "PASS"
@@ -61,13 +65,13 @@
 
 if ! $exe $DEBUG -n other > $base.out; then
     echo "FAIL: error running $exe"
-    kill %%
+    $arm -e
     exit 1
 fi
 LINES=`cat $base.out | grep 43 | wc -l`
 if test $LINES -ne 1; then
     echo "FAIL: unexpected output"
-    kill %%
+    $arm -e
     exit 1
 fi
 echo "PASS"
@@ -77,13 +81,13 @@
 
 if ! $exe $DEBUG -s subsystem > $base.out; then
     echo "FAIL: error running $exe"
-    kill %%
+    $arm -e
     exit 1
 fi
 LINES=`cat $base.out | grep 42 | wc -l`
 if test $LINES -ne 1; then
     echo "FAIL: unexpected output"
-    kill %%
+    $arm -e
     exit 1
 fi
 echo "PASS"
@@ -94,37 +98,31 @@
 
 if ! $exe $DEBUG -n lasting -s subsystem 40 -p; then
   echo "FAIL: error running $exe"
-  kill %%
+  $arm -e
   exit 1
 fi
 echo "PASS"
 
 # -----------------------------------
 echo -n "Restarting service..."
+$arm -k statistics > /dev/null
 sleep 1
-if ! kill %%;
-then
-  echo "FAIL: could not kill service"
-  kill %%
-  exit 1
-fi
+$arm -i statistics > /dev/null
 sleep 1
-./gnunet-service-statistics $DEBUG  -c test_statistics_api_data.conf  &
-sleep 1
+echo "DONE"
 
-
 # 
----------------------------------------------------------------------------------
 echo -n "TEST: checking persistence..."
 
 if ! $exe $DEBUG > $base.out; then
     echo "FAIL: error running $exe"
-    kill %%
+    $arm -e
     exit 1
 fi
 LINES=`cat $base.out | grep 40 | wc -l`
 if test $LINES -ne 1; then
     echo "FAIL: unexpected output"
-    kill %%
+    $arm -e
     exit 1
 fi
 echo "PASS"
@@ -136,7 +134,7 @@
 
 if ! $exe  $DEBUG -n lasting -s subsystem 40; then
   echo "FAIL: error running $exe"
-  kill %%
+  $arm -e
   exit 1
 fi
 echo "PASS"
@@ -144,34 +142,32 @@
 
 # -----------------------------------
 echo -n "Restarting service..."
+$arm -k statistics > /dev/null
 sleep 1
-if ! kill %%;
-then
-  echo "FAIL: could not kill service"
-  kill %%
-  exit 1
-fi
+$arm -i statistics > /dev/null
 sleep 1
-./gnunet-service-statistics $DEBUG -c test_statistics_api_data.conf  &
-sleep 1
+echo "DONE"
 
-
 # 
----------------------------------------------------------------------------------
 echo -n "TEST: checking removed persistence..."
 
 if ! $exe $DEBUG > $base.out; then
     echo "FAIL: error running $exe"
-    kill %%
+    $arm -e
     exit 1
 fi
 LINES=`cat $base.out | grep 40 | wc -l`
 if test $LINES -ne 0; then
     echo "FAIL: unexpected output"
-    kill %%
+    $arm -e
     exit 1
 fi
 echo "PASS"
 
-kill %%
+# -----------------------------------
+echo -n "Stopping service..."
+$arm -e > /dev/null
+sleep 1
+echo "DONE"
 rm -f $base.out
 rm -rf /tmp/test-gnunetd-statistics/

Modified: gnunet/src/statistics/test_statistics_api_data.conf
===================================================================
--- gnunet/src/statistics/test_statistics_api_data.conf 2009-10-04 12:17:06 UTC 
(rev 9102)
+++ gnunet/src/statistics/test_statistics_api_data.conf 2009-10-04 12:17:19 UTC 
(rev 9103)
@@ -1,5 +1,9 @@
 [PATHS]
 SERVICEHOME = /tmp/test-gnunetd-statistics/
+DEFAULTCONFIG = test_statistics_api_data.conf
 
 [statistics]
 PORT = 22353
+
+[arm]
+PORT = 22354





reply via email to

[Prev in Thread] Current Thread [Next in Thread]