[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r9054 - gnunet/src/arm
From: |
gnunet |
Subject: |
[GNUnet-SVN] r9054 - gnunet/src/arm |
Date: |
Thu, 1 Oct 2009 14:19:46 -0600 |
Author: grothoff
Date: 2009-10-01 14:19:44 -0600 (Thu, 01 Oct 2009)
New Revision: 9054
Modified:
gnunet/src/arm/arm.h
gnunet/src/arm/test_gnunet_arm.sh
Log:
better ARM test script
Modified: gnunet/src/arm/arm.h
===================================================================
--- gnunet/src/arm/arm.h 2009-10-01 18:10:27 UTC (rev 9053)
+++ gnunet/src/arm/arm.h 2009-10-01 20:19:44 UTC (rev 9054)
@@ -27,6 +27,6 @@
#include "gnunet_common.h"
-#define DEBUG_ARM GNUNET_YES
+#define DEBUG_ARM GNUNET_NO
#endif
Modified: gnunet/src/arm/test_gnunet_arm.sh
===================================================================
--- gnunet/src/arm/test_gnunet_arm.sh 2009-10-01 18:10:27 UTC (rev 9053)
+++ gnunet/src/arm/test_gnunet_arm.sh 2009-10-01 20:19:44 UTC (rev 9054)
@@ -6,6 +6,21 @@
out=/tmp/test-gnunetd-arm.log
#DEBUG="-L DEBUG"
+# -------------------------------------------
+echo -n "TEST: can this script work?... "
+LINES=`ps -C gnunet-service-arm -o pid= | wc -l`
+if test $LINES -ne 0; then
+ echo "No (arm exists). Exiting early."
+ exit 0
+fi
+LINES=`ps -C gnunet-service-resolver -o pid= | wc -l`
+if test $LINES -ne 0; then
+ echo "No (resolver exists). Exiting early."
+ exit 0
+fi
+echo "Yes."
+
+
#
----------------------------------------------------------------------------------
echo -n "TEST: Bad argument checking... "
@@ -24,7 +39,7 @@
cat $out
exit 1
fi
-LINES=`ps ax | grep gnunet-service-arm | grep -v grep | wc -l`
+LINES=`ps -u $USER -C gnunet-service-arm -o pid= | wc -l`
if test $LINES -eq 0; then
echo "FAIL: found $LINES gnunet-service-arm processes"
echo "Command output was:"
@@ -44,7 +59,7 @@
exit 1
fi
sleep 1
-LINES=`ps ax | grep gnunet-service-resolver | grep -v grep | wc -l`
+LINES=`ps -C gnunet-service-resolver -o pid= | wc -l`
if test $LINES -ne 1; then
echo "FAIL: unexpected output (got $LINES lines, wanted 1)"
echo "Command output was:"
@@ -86,8 +101,14 @@
exit 1
fi
sleep 1
-LINES=`ps ax | grep gnunet-service-resolver | grep -v grep | wc -l`
+LINES=`ps -C gnunet-service-resolver -o pid= | wc -l`
if test $LINES -ne 0; then
+ sleep 5
+ LINES=`ps -C gnunet-service-resolver -o pid= | wc -l`
+fi
+if test $LINES -ne 0; then
+ sleep 2
+
echo "FAIL: unexpected output"
echo "Command output was:"
cat $out
@@ -122,8 +143,12 @@
exit 1
fi
sleep 1
-LINES=`ps ax | grep gnunet-service-arm | grep -v grep | wc -l`
+LINES=`ps -C gnunet-service-arm -o pid= | wc -l`
if test $LINES -ne 0; then
+ sleep 5
+ LINES=`ps -C gnunet-service-arm -o pid= | wc -l`
+fi
+if test $LINES -ne 0; then
echo "FAIL: unexpected output, still have $LINES gnunet-service-arm
processes"
echo "Command output was:"
cat $out
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r9054 - gnunet/src/arm,
gnunet <=