From 3ba8990254552a67762fc978019fc55a996f80db Mon Sep 17 00:00:00 2001
From: al_xipe <al_xipe@localhost>
Date: Thu, 19 Oct 2006 16:37:32 +0000
Subject: [PATCH] changed the wipeout to only sleep 10 seconds if the server actually had to be stopped fixed issue on platform specific command calls

---
 opends/tests/default.installer.properties |    2 ++
 opends/tests/installer.xml                |   27 +++++++++++++++++++--------
 2 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/opends/tests/default.installer.properties b/opends/tests/default.installer.properties
index d4e39f4..e913db9 100644
--- a/opends/tests/default.installer.properties
+++ b/opends/tests/default.installer.properties
@@ -5,3 +5,5 @@
 host.name=localhost
 install.dir=${project.home}/build/install
 full.install.dir=${install.dir}/${product.name}-${product.version}
+windows.list=Windows XP,Windows 2000,Windows 2003
+unix.list=SunOS,Linux
diff --git a/opends/tests/installer.xml b/opends/tests/installer.xml
index a6382dc..de6faa0 100644
--- a/opends/tests/installer.xml
+++ b/opends/tests/installer.xml
@@ -144,11 +144,11 @@
           unless="product.running" >
 		<echo message="Starting ${product.name} ${product.version}... on ${os.name}" />
     <exec
-		  os="Windows XP,windows,dos"
+      os="${windows.list}"
       executable="${full.install.dir}\bin\start-ds.bat"
      spawn="true"                                                           />
     <exec
-      os="unix"
+      os="${unix.list}"
       executable="${full.install.dir}/bin/start-ds.sh"
       spawn="true"                                                           />
   </target>
@@ -168,7 +168,7 @@
           description="stop the server">
 		<echo message="Stopping ${product.name} ${product.version}..." />
     <exec
-      os="Windows XP,windows,dos"
+      os="${windows.list}"
       executable="${full.install.dir}\bin\stop-ds.bat"
       spawn="true">
       <arg line="-h ${host.name}"/>
@@ -178,7 +178,7 @@
       <arg value="${bind.dn}"    />
     </exec>
     <exec 
-      os="unix"
+      os="${unix.list}"
       executable="${full.install.dir}/bin/stop-ds.sh" 
       spawn="true"                                   >
       <arg line="-h ${host.name}"/>
@@ -197,6 +197,19 @@
     </condition>
 		<antcall target="stop.do" />
 	</target>
+  
+  <target name="sleep" if="product.running">
+    <echo message="Give the server some time to shut down and release locks..." />
+    <sleep seconds="10"         />  
+  </target>
+  <target name="stop.sleep" >
+    <condition property="product.running">
+      <socket port="${port.ldap}" server="${host.name}"/>
+    </condition>
+		<antcall target="stop.do" />
+    <antcall target="sleep" />
+	</target>
+
 	<!-- end of stop related targets -->
 	
 	<!-- status -->
@@ -243,10 +256,8 @@
 	
 	<target name="wipeout">
 	  <echo message="Wipeout: removing product" />
-		<antcall target="stop"      />
-    <echo message="Give the server some time to shut down and release locks..." />
-    <sleep seconds="10"         />
-		<antcall target="uninstall" />
+		<antcall target="stop.sleep"  />
+		<antcall target="uninstall"   />
 	</target>
 	<!--  end of macros related targets-->
 </project>

--
Gitblit v1.10.0