From accbcf0113e68508899d9811037198033f1ba349 Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Thu, 16 Jun 2011 21:11:47 +0000
Subject: [PATCH] Improve staf support for Mac OS X in the Trunk Update to latest version of staf and services. Use macosx-universal as we test mostly on OS 10.6+, 64bits.

---
 opendj-sdk/opends/tests/staf-tests/shared/staf/staf-controller.cfg |    8 ++++++--
 opendj-sdk/opends/tests/staf-tests/shared/ant/build.properties     |    6 +++---
 opendj-sdk/opends/tests/staf-tests/shared/ant/build.xml            |    2 +-
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/opendj-sdk/opends/tests/staf-tests/shared/ant/build.properties b/opendj-sdk/opends/tests/staf-tests/shared/ant/build.properties
index c2eb2e3..6f31232 100644
--- a/opendj-sdk/opends/tests/staf-tests/shared/ant/build.properties
+++ b/opendj-sdk/opends/tests/staf-tests/shared/ant/build.properties
@@ -85,9 +85,9 @@
 opends.name=${default.opends.name}
 
 # Java section
-java.path=${java.home}/..
-local.javahome=${java.home}/..
-remote.javahome=${java.home}/..
+java.path=${java.home}
+local.javahome=${java.home}
+remote.javahome=${java.home}
 
 # STAF section
 staf.shared.dir=${shared.dir}/staf
diff --git a/opendj-sdk/opends/tests/staf-tests/shared/ant/build.xml b/opendj-sdk/opends/tests/staf-tests/shared/ant/build.xml
index ed6d63d..e0f9f6b 100644
--- a/opendj-sdk/opends/tests/staf-tests/shared/ant/build.xml
+++ b/opendj-sdk/opends/tests/staf-tests/shared/ant/build.xml
@@ -131,7 +131,7 @@
         <switch value="${os.arch}">
           <case value="x86_64">
             <!-- Linux i386 -->
-            <property name="os.myname" value="macosx-i386"/>
+            <property name="os.myname" value="macosx-universal"/>
           </case>
         </switch>
 
diff --git a/opendj-sdk/opends/tests/staf-tests/shared/staf/staf-controller.cfg b/opendj-sdk/opends/tests/staf-tests/shared/staf/staf-controller.cfg
index d449ef0..c3ff04c 100644
--- a/opendj-sdk/opends/tests/staf-tests/shared/staf/staf-controller.cfg
+++ b/opendj-sdk/opends/tests/staf-tests/shared/staf/staf-controller.cfg
@@ -22,6 +22,7 @@
 #
 #
 #      Copyright 2007-2010 Sun Microsystems, Inc.
+#      Portions Copyright 2011 ForgeRock AS
 
 # Change default data directory
 SET DATADIR {STAF/Config/STAFRoot}/data-${local.hostname}
@@ -59,17 +60,20 @@
 # EVENT SERVICE CONFIGURATION
 SERVICE Event LIBRARY JSTAF \
   EXECUTE ${staf.install.dir}/${event.name}/STAFEvent.jar \
-  OPTION JVMNAME=eventJVM-${local.hostname}
+  OPTION JVMNAME=eventJVM-${local.hostname} \
+  OPTION JVM=${local.javahome}/bin/java
 
 # EVENTMANAGER SERVICE CONFIGURATION
 SERVICE EventManager LIBRARY JSTAF \
   EXECUTE ${staf.install.dir}/${eventmanager.name}/STAFEventManager.jar \
-  OPTION JVMNAME=eventmanagerJVM-${local.hostname}
+  OPTION JVMNAME=eventmanagerJVM-${local.hostname} \
+  OPTION JVM=${local.javahome}/bin/java
 
 # EMAIL SERVICE CONFIGURATION
 SERVICE Email LIBRARY JSTAF \
   EXECUTE ${staf.install.dir}/${email.name}/STAFEmail.jar \
   OPTION JVMNAME=emailJVM-${local.hostname}  \
+  OPTION JVM=${local.javahome}/bin/java \
   PARMS "MAILSERVER ${email.server.host} PORT ${email.server.port}"
 
 SET MAXQUEUESIZE 10000

--
Gitblit v1.10.0