From cf48edeb9ed75fe7290b183ecb2a37de367d733a Mon Sep 17 00:00:00 2001
From: Christophe Sovant <christophe.sovant@forgerock.com>
Date: Wed, 14 May 2008 13:30:55 +0000
Subject: [PATCH] Fix compilation problem for SNMP tests
---
opendj-sdk/opends/tests/shared/functions/utils.xml | 13 +++++++++++--
opendj-sdk/opends/tests/shared/functions/snmp.xml | 4 ++--
opendj-sdk/opends/tests/functional-tests/testcases/snmp/snmp_trap_defaultconf.xml | 1 +
opendj-sdk/opends/tests/shared/functions/stafcmd.xml | 6 +++---
opendj-sdk/opends/tests/shared/functions/topology.xml | 10 +++++-----
5 files changed, 22 insertions(+), 12 deletions(-)
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/snmp/snmp_trap_defaultconf.xml b/opendj-sdk/opends/tests/functional-tests/testcases/snmp/snmp_trap_defaultconf.xml
index 5d3e088..826c6a4 100644
--- a/opendj-sdk/opends/tests/functional-tests/testcases/snmp/snmp_trap_defaultconf.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/snmp/snmp_trap_defaultconf.xml
@@ -81,6 +81,7 @@
<call function="'SNMPTrapListener'">
{
+ 'location' : STAF_REMOTE_HOSTNAME ,
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpTrapPort' : SNMP_TRAP_PORT ,
'snmpTrapCommunity' : 'OpenDS' ,
diff --git a/opendj-sdk/opends/tests/shared/functions/snmp.xml b/opendj-sdk/opends/tests/shared/functions/snmp.xml
index c8f065e..e94a689 100755
--- a/opendj-sdk/opends/tests/shared/functions/snmp.xml
+++ b/opendj-sdk/opends/tests/shared/functions/snmp.xml
@@ -392,10 +392,10 @@
{
'location' : location ,
'type' : 'STRING',
- 'name' : 'STAF/Env/LD_LIBRARY_PATH'
+ 'name' : 'STAF/Env/STAF_DIR'
}
</call>
- <script>jstaf_jarfile = '%s/JSTAF.jar' % STAFResult</script>
+ <script>jstaf_jarfile = '%s/lib/JSTAF.jar' % STAFResult</script>
<!-- Build the command -->
<script>
diff --git a/opendj-sdk/opends/tests/shared/functions/stafcmd.xml b/opendj-sdk/opends/tests/shared/functions/stafcmd.xml
index bbc2731..ab709ca 100755
--- a/opendj-sdk/opends/tests/shared/functions/stafcmd.xml
+++ b/opendj-sdk/opends/tests/shared/functions/stafcmd.xml
@@ -784,7 +784,7 @@
</function>
<!-- Send event -->
- <function name="SendEvent">
+ <function name="SendEvent" scope="local">
<function-prolog>
Send event.
</function-prolog>
@@ -817,7 +817,7 @@
</function>
<!-- Wait event -->
- <function name="WaitEvent">
+ <function name="WaitEvent" scope="local">
<function-prolog>
Wait event.
</function-prolog>
@@ -850,7 +850,7 @@
</function>
<!-- Delete event -->
- <function name="DeleteEvent">
+ <function name="DeleteEvent" scope="local">
<function-prolog>
Delete event.
</function-prolog>
diff --git a/opendj-sdk/opends/tests/shared/functions/topology.xml b/opendj-sdk/opends/tests/shared/functions/topology.xml
index 94c11d1..c5db739 100755
--- a/opendj-sdk/opends/tests/shared/functions/topology.xml
+++ b/opendj-sdk/opends/tests/shared/functions/topology.xml
@@ -281,7 +281,7 @@
'extension' : 'class'
}
</call>
- <if expr="STAXResult != ''">
+ <if expr="len(STAXResult) == 0">
<sequence>
<!--- Compile ldap java files on controler host -->
<message>
@@ -334,7 +334,7 @@
'attribute' : 'TYPE'
}
</call>
- <!-- 'SNMP_OPENDS_JARFILE' exists so we can continue -->
+ <!-- 'SNMP_OPENDMK_LIBDIR' exists so we can continue with SNMP -->
<if expr="RC != 48">
<sequence>
<!--- Check if snmp java files are already compiled -->
@@ -345,7 +345,7 @@
'extension' : 'class'
}
</call>
- <if expr="STAXResult != ''">
+ <if expr="len(STAXResult) == 0">
<sequence>
<!--- Install DS Copy zip file -->
<message>
@@ -375,10 +375,10 @@
{
'location' : STAXServiceMachine,
'type' : 'STRING',
- 'name' : 'STAF/Env/LD_LIBRARY_PATH'
+ 'name' : 'STAF/Env/STAF_DIR'
}
</call>
- <script>jstaf_jarfile = '%s/JSTAF.jar' % STAFResult</script>
+ <script>jstaf_jarfile = '%s/lib/JSTAF.jar' % STAFResult</script>
<!--- Compile snmp java files on controler host -->
<message>
diff --git a/opendj-sdk/opends/tests/shared/functions/utils.xml b/opendj-sdk/opends/tests/shared/functions/utils.xml
index 75e3084..157e090 100755
--- a/opendj-sdk/opends/tests/shared/functions/utils.xml
+++ b/opendj-sdk/opends/tests/shared/functions/utils.xml
@@ -2014,7 +2014,16 @@
</function-map-args>
<sequence>
-
+ <call function="'ResolveVar'" >
+ {
+ 'location' : location ,
+ 'type' : 'STRING',
+ 'name' : 'STAF/Env/JAVA_HOME'
+ }
+ </call>
+ <script>local_java_home = '%s' % STAFResult</script>
+
+ <!-- Build the command -->
<script>
if classpath:
cp = 'CLASSPATH=%s:.' % classpath
@@ -2025,7 +2034,7 @@
cp = cp.replace(':', ';')
if location == STAXServiceMachine:
- cmd = 'javac'
+ cmd = '%s/bin/javac' % local_java_home
env = ['%s' % cp]
else:
cmd = '%s/bin/javac' % JAVA_HOME
--
Gitblit v1.10.0