[Ultrapossum-cvs 666] ultrapossum/module/test ...

Back to archive index

Masato Taruishi taru****@users*****
2004年 10月 6日 (水) 02:11:14 JST


===================================================================
RCS file: ultrapossum/module/test/runtest,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ultrapossum/module/test/runtest	2004/10/05 13:50:43	1.1
+++ ultrapossum/module/test/runtest	2004/10/05 17:11:14	1.2
@@ -41,7 +41,7 @@
 objectClass: top
 objectClass: organization
 o: $TESTORGANIZATION
-" | $addcmd 1>&2 || true
+" | $addcmd > /dev/null 2> /dev/null || true
 }
  
 test_term() {
@@ -49,19 +49,20 @@
     $MODULEDIR/server/startup start
     tmpstart=1
   fi
-  ldapdelete -r -x -D $ROOTDN -w $ROOTPW $TESTSUFFIX 1>&2
+  ldapdelete -r -x -D $ROOTDN -w $ROOTPW $TESTSUFFIX > /dev/null 2> /dev/null
   if test "$tmpstart" = "1"; then
     $MODULEDIR/server/startup stop
   fi
 }
 
-ldapdelete -r -x -D $ROOTDN -w $ROOTPW $TESTSUFFIX 1>&2 || true
+ldapdelete -r -x -D $ROOTDN -w $ROOTPW $TESTSUFFIX > /dev/null 2> /dev/null || true
 test_init
 
 tests=`find $TESTSCRIPTSDIR -type f | sort | grep $INCLUDE_TEST`
 for e in $tests
 do
   echo -n "Testing $e... "
+  echo "Running $e" 1>&2
   if $SHAREDIR/envexec $e 1>&2; then
     echo "ok"
     test_term
===================================================================
RCS file: ultrapossum/module/test/ultrapossum-test,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ultrapossum/module/test/ultrapossum-test	2004/10/05 13:50:43	1.1
+++ ultrapossum/module/test/ultrapossum-test	2004/10/05 17:11:14	1.2
@@ -22,6 +22,11 @@
 eval `ultrapossum-config init`
 trap "eval `ultrapossum-config term`" 0
 
+if test "x$HOST" != "x$MASTER"; then
+  echo "Must be run on master: $MASTER" 1>&2
+  exit 1
+fi
+
 ERRORFILE=$LOGDIR/ultrapossum-test-error
 
 install -d  $LOGDIR
@@ -32,13 +37,15 @@
   cp /dev/null $ERRORFILE
 fi
 
-if test -x "/etc/init.d/ultrapossum-server"; then
-  /etc/init.d/ultrapossum-server restart
-else
-  echo -n "Restarting UltraPossum server... "
-  $MODULEDIR/server/startup stop || true
-  $MODULEDIR/server/startup start
-  echo "done"
+if test "x`$MODULEDIR/server/startup master_status`" = "xstopped"; then
+  if test -x "/etc/init.d/ultrapossum-server"; then
+    /etc/init.d/ultrapossum-server restart
+  else
+    echo -n "Restarting UltraPossum server... "
+    $MODULEDIR/server/startup stop || true
+    $MODULEDIR/server/startup start
+    echo "done"
+  fi
 fi
 $MODULEDIR/test/runtest 2>> $ERRORFILE
 



Ultrapossum-cvs メーリングリストの案内
Back to archive index