From 5a6a88bd1e4831128c55f72923b18f5f771d45f2 Mon Sep 17 00:00:00 2001
From: Christophe Sovant <christophe.sovant@forgerock.com>
Date: Mon, 04 May 2009 16:12:57 +0000
Subject: [PATCH] New functionality to run tests (functional and stress) on a remote machine
---
opends/tests/staf-tests/shared/ant/usage.xml | 12
opends/tests/staf-tests/shared/xsl/gen-suites-report.xsl | 7
opends/tests/staf-tests/shared/functions/webcontainer.xml | 15
opends/tests/staf-tests/functional-tests/testcases/replication/conflict/conflict.xml | 2
opends/tests/staf-tests/shared/ant/dependencies.xml | 3
opends/tests/staf-tests/functional-tests/testcases/replication/replication_setup.xml | 10
opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_defaultproperties.xml | 2
opends/tests/staf-tests/shared/ant/user.xml | 184 +++---
opends/tests/staf-tests/shared/ant/opends.xml | 12
opends/tests/staf-tests/shared/ant/tests.xml | 382 +++++++++-----
opends/tests/staf-tests/shared/xsl/gen-logs.xsl | 7
opends/tests/staf-tests/shared/functions/topology.xml | 23
opends/tests/staf-tests/shared/ant/staf.xml | 30
opends/tests/staf-tests/shared/xsl/gen-groups-report.xsl | 7
opends/tests/staf-tests/shared/xsl/gen-tests-report.xsl | 25
opends/tests/staf-tests/shared/functions/environment.xml | 34
opends/tests/staf-tests/shared/ant/build.properties | 125 ++--
opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_mibvalues.xml | 8
opends/tests/staf-tests/shared/xsl/gen-alltests-report.xsl | 9
opends/tests/staf-tests/shared/topology/basic_topology.txt | 18
opends/tests/staf-tests/shared/resource/opends_logo_sm.png | 0
opends/tests/staf-tests/shared/tests/config.py.stubs | 103 ++-
opends/tests/staf-tests/shared/functions/utils.xml | 8
opends/tests/staf-tests/shared/resource/opends.css | 98 +++
opends/tests/staf-tests/functional-tests/testcases/replication/encryption/encryption.xml | 2
opends/tests/staf-tests/shared/functions/snmp.xml | 33
opends/tests/staf-tests/shared/tests/runTests.xml | 15
opends/tests/staf-tests/shared/ant/build.xml | 144 +++--
opends/tests/staf-tests/shared/topology/3server_topology.txt | 32
opends/tests/staf-tests/build.bat | 4
opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_trap_customconf.xml | 21
opends/tests/staf-tests/shared/staf/staf-controller.cfg | 43 -
opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_status.xml | 48
opends/tests/staf-tests/functional-tests/testcases/replication/failover/failover.xml | 2
opends/tests/staf-tests/shared/tests/runTestJob.xml | 65 ++
opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_trap_defaultconf.xml | 12
opends/tests/staf-tests/shared/xsl/id.xsl | 7
37 files changed, 903 insertions(+), 649 deletions(-)
diff --git a/opends/tests/staf-tests/build.bat b/opends/tests/staf-tests/build.bat
index 0316abd..70c4a15 100644
--- a/opends/tests/staf-tests/build.bat
+++ b/opends/tests/staf-tests/build.bat
@@ -23,7 +23,7 @@
rem CDDL HEADER END
rem
rem
-rem Copyright 2008 Sun Microsystems, Inc.
+rem Copyright 2008-2009 Sun Microsystems, Inc.
setlocal
@@ -48,6 +48,6 @@
echo Now running ant ...
set OPENDS_LIB=%FT_HOME%\..\..\lib
set ANT_LIB="%OPENDS_LIB%\mail.jar;%OPENDS_LIB%\activation.jar"
-"%ANT_HOME%\bin\ant" -lib "%ANT_LIB%" -f shared\ant\staf-installer.xml %*
+"%ANT_HOME%\bin\ant" -lib "%ANT_LIB%" -f shared\ant\build.xml %*
:end
diff --git a/opends/tests/staf-tests/functional-tests/testcases/replication/conflict/conflict.xml b/opends/tests/staf-tests/functional-tests/testcases/replication/conflict/conflict.xml
index 3120a73..9109281 100644
--- a/opends/tests/staf-tests/functional-tests/testcases/replication/conflict/conflict.xml
+++ b/opends/tests/staf-tests/functional-tests/testcases/replication/conflict/conflict.xml
@@ -62,7 +62,7 @@
% (TESTS_DIR)"/>
<call function="'replication_setup'">
{ 'topologyFile' : '%s/basic_topology.txt' \
- % TESTS_TOPOLOGY_DIR,
+ % REPLICATION_CONFIG_DIR,
'dataFile' : 'Short_Example.ldif',
'isolateLdapServers' : True,
'enableDebugLogs' : False
diff --git a/opends/tests/staf-tests/functional-tests/testcases/replication/encryption/encryption.xml b/opends/tests/staf-tests/functional-tests/testcases/replication/encryption/encryption.xml
index 4e9ef44..36fda48 100644
--- a/opends/tests/staf-tests/functional-tests/testcases/replication/encryption/encryption.xml
+++ b/opends/tests/staf-tests/functional-tests/testcases/replication/encryption/encryption.xml
@@ -62,7 +62,7 @@
% (TESTS_DIR)"/>
<call function="'replication_setup'">
{ 'topologyFile' : '%s/3server_topology.txt' \
- % TESTS_TOPOLOGY_DIR,
+ % REPLICATION_CONFIG_DIR,
'secureReplication': True,
'dataFile' : 'Example.ldif'
}
diff --git a/opends/tests/staf-tests/functional-tests/testcases/replication/failover/failover.xml b/opends/tests/staf-tests/functional-tests/testcases/replication/failover/failover.xml
index f9dceb1..ad45beb 100644
--- a/opends/tests/staf-tests/functional-tests/testcases/replication/failover/failover.xml
+++ b/opends/tests/staf-tests/functional-tests/testcases/replication/failover/failover.xml
@@ -59,7 +59,7 @@
<import machine="STAF_LOCAL_HOSTNAME"
file="'%s/testcases/replication/replication_setup.xml' % (TESTS_DIR)"/>
<call function="'replication_setup'">
- { 'topologyFile' : '%s/3server_topology.txt' % TESTS_TOPOLOGY_DIR }
+ { 'topologyFile' : '%s/3server_topology.txt' % REPLICATION_CONFIG_DIR }
</call>
<script>
diff --git a/opends/tests/staf-tests/functional-tests/testcases/replication/replication_setup.xml b/opends/tests/staf-tests/functional-tests/testcases/replication/replication_setup.xml
index e574243..e10118b 100644
--- a/opends/tests/staf-tests/functional-tests/testcases/replication/replication_setup.xml
+++ b/opends/tests/staf-tests/functional-tests/testcases/replication/replication_setup.xml
@@ -33,7 +33,7 @@
<function-map-args>
<function-arg-def name="topologyFile"
type="optional"
- default="'%s/basic_topology.txt' % TESTS_TOPOLOGY_DIR">
+ default="'%s/basic_topology.txt' % REPLICATION_CONFIG_DIR">
<function-arg-description>
Pathname to file describing the topology.
</function-arg-description>
@@ -87,14 +87,6 @@
<message>
'Create DS topology as described in %s' % topologyFile
</message>
-
- <script>
- try:
- if REPLICATION_CONFIG_FILE:
- topologyFile=REPLICATION_CONFIG_FILE
- except NameError:
- topologyFile=topologyFile
- </script>
<call function="'createTopology'">
{ 'topologyDescFile' : topologyFile,
diff --git a/opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_defaultproperties.xml b/opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_defaultproperties.xml
index 54a8a4c..6bdb797 100644
--- a/opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_defaultproperties.xml
+++ b/opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_defaultproperties.xml
@@ -99,7 +99,7 @@
</script>
<message>
- 'result: %s' % result
+ '%s' % result
</message>
<call function="'checktestStringNotPresent'">
diff --git a/opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_mibvalues.xml b/opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_mibvalues.xml
index 9f6fed3..f005d26 100644
--- a/opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_mibvalues.xml
+++ b/opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_mibvalues.xml
@@ -259,11 +259,9 @@
<script>
dsServerDescription = DEFAULT_VALUES['dsServerDescription.1']
+ dsPath = '%s/%s' % (DIRECTORY_INSTANCE_DIR, OPENDSNAME)
if is_windows_platform(DIRECTORY_INSTANCE_HOST):
- dsPath = '%s/%s/bat' % (DIRECTORY_INSTANCE_DIR, OPENDSNAME)
dsPath = dsPath.replace('/', '\\')
- else:
- dsPath = '%s/%s/bin' % (DIRECTORY_INSTANCE_DIR, OPENDSNAME)
</script>
<if expr="dsServerDescription == dsPath">
@@ -290,10 +288,6 @@
'%s' % msg
</message>
<tcstatus result="'fail'"></tcstatus>
-
- <call function="'setKnownIssue'">
- { 'issueId' : '3690' }
- </call>
</sequence>
</else>
</if>
diff --git a/opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_status.xml b/opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_status.xml
index 16ba15c..e0cf5a5 100644
--- a/opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_status.xml
+++ b/opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_status.xml
@@ -64,7 +64,7 @@
#@TestMarker SNMP Connection Handler status
#@TestName status: check status when the server is
stopped/started
- #@TestIssue 3865
+ #@TestIssue none
#@TestPurpose Check status when the server is
stopped/started.
#@TestPreamble none
@@ -119,8 +119,7 @@
'expectedString' : '0.0.0.0:%s : SNMP : Enabled' \
% SNMP_PORT ,
'returnString' : returnString ,
- 'knownIssue' : '3865' ,
- 'expectedRC' : expectedRC
+ 'expectedRC' : 0
}
</call>
@@ -160,8 +159,7 @@
'expectedString' : '0.0.0.0:%s : SNMP : Enabled' \
% SNMP_PORT ,
'returnString' : returnString ,
- 'knownIssue' : '3865' ,
- 'expectedRC' : expectedRC
+ 'expectedRC' : 0
}
</call>
@@ -190,7 +188,7 @@
#@TestMarker SNMP Connection Handler status
#@TestName status: check status when the connection
handler is disabled/enabled
- #@TestIssue 3865
+ #@TestIssue none
#@TestPurpose Check status when the SNMP connection handler
is disabled/enabled.
#@TestPreamble none
@@ -244,8 +242,7 @@
'expectedString' : '0.0.0.0:%s : SNMP : Disabled' \
% SNMP_PORT ,
'returnString' : returnString ,
- 'knownIssue' : '3865' ,
- 'expectedRC' : expectedRC
+ 'expectedRC' : 0
}
</call>
@@ -300,8 +297,7 @@
'expectedString' : '0.0.0.0:%s : SNMP : Enabled' \
% SNMP_PORT ,
'returnString' : returnString ,
- 'knownIssue' : '3865' ,
- 'expectedRC' : expectedRC
+ 'expectedRC' : 0
}
</call>
@@ -331,7 +327,7 @@
#@TestName status: check error message and status when
the opendmk-jarfile property is set to a
wrong value
- #@TestIssue 3865
+ #@TestIssue none
#@TestPurpose Check error message and status when
the opendmk-jarfile property is set to a
wrong value.
@@ -396,12 +392,17 @@
</call>
<script>
- msg1 = 'You do not have the appropriated OpenDMK jar files to'
- msg2 = 'enable the SNMP Connection Handler. Please go under'
- msg3 = 'http:\/\/opendmk.dev.java.net and set the'
- msg4 = 'ds-cfg-opendmk-jarfile configuration parameter to set'
- msg5 = 'the full path of the required jdmkrt.jar file.'
- msg6 = 'The SNMP connection Handler didn\'t started'
+ opendmkJarFile = '%s/%s/wrong_file' \
+ % (DIRECTORY_INSTANCE_DIR, OPENDSNAME)
+ if is_windows_platform(DIRECTORY_INSTANCE_HOST):
+ opendmkJarFile = opendmkJarFile.replace('/', '\\')
+
+ msg1 = 'The specified OpenDMK jar file'
+ msg2 = '\'%s\' could not be found.' % opendmkJarFile
+ msg3 = 'Verify that the value set in the opendmk-jarfile'
+ msg4 = 'configuration parameter of the SNMP connection handler'
+ msg5 = 'is the valid path to the jdmkrt.jar file and that the'
+ msg6 = 'file is accessible'
msg = '%s %s %s %s %s %s' % (msg1, msg2, msg3, msg4, msg5, msg6)
</script>
@@ -433,8 +434,7 @@
'expectedString' : '0.0.0.0:%s : SNMP : Enabled' \
% SNMP_PORT ,
'returnString' : returnString ,
- 'knownIssue' : '3865' ,
- 'expectedRC' : expectedRC
+ 'expectedRC' : 0
}
</call>
@@ -493,7 +493,7 @@
#@TestName status: check error message and status when
the security-agent-file property is set to a
wrong value
- #@TestIssue 3865
+ #@TestIssue none
#@TestPurpose Check error message and status when
the security-agent-file property is set to a
wrong value.
@@ -611,8 +611,7 @@
'expectedString' : '0.0.0.0:%s : SNMP : Enabled' \
% SNMP_PORT ,
'returnString' : returnString ,
- 'knownIssue' : '3865' ,
- 'expectedRC' : expectedRC
+ 'expectedRC' : 0
}
</call>
@@ -671,7 +670,7 @@
#@TestName status: check error message and status when
the listen-port property is set to a wrong
value
- #@TestIssue 3865
+ #@TestIssue none
#@TestPurpose Check error message and status when
the listen-port property is set to a wrong
value.
@@ -780,8 +779,7 @@
'expectedString' : '0.0.0.0:%s : SNMP : Enabled' \
% DEFAULT_PROPERTIES['listen-port'] ,
'returnString' : returnString ,
- 'knownIssue' : '3865' ,
- 'expectedRC' : expectedRC
+ 'expectedRC' : 0
}
</call>
diff --git a/opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_trap_customconf.xml b/opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_trap_customconf.xml
index 85bdf1e..56e3ff8 100644
--- a/opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_trap_customconf.xml
+++ b/opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_trap_customconf.xml
@@ -122,7 +122,8 @@
'snmpTrapPort' : SNMP_TRAP_PORT ,
'snmpTrapCommunity' : defTrapsCommunityProp ,
'snmpTrapNumber' : '0,2,0,0,0,0' ,
- 'outputFile' : outputFile2
+ 'outputFile' : outputFile2 ,
+ 'knownIssue' : '3435'
}
</call>
</sequence>
@@ -206,7 +207,8 @@
'snmpTrapPort' : SNMP_TRAP_PORT ,
'snmpTrapCommunity' : newTrapsCommunityProp ,
'snmpTrapNumber' : '2,0,0,0,0,0' ,
- 'outputFile' : outputFile2
+ 'outputFile' : outputFile2 ,
+ 'knownIssue' : '3435'
}
</call>
</sequence>
@@ -300,8 +302,7 @@
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
- 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
- 'knownIssue' : '3435'
+ 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD
}
</call>
@@ -372,7 +373,8 @@
'snmpTrapPort' : SNMP_TRAP_PORT ,
'snmpTrapCommunity' : defTrapsCommunityProp ,
'snmpTrapNumber' : '2,0,0,0,0,0' ,
- 'outputFile' : outputFile2
+ 'outputFile' : outputFile2 ,
+ 'knownIssue' : '3435'
}
</call>
</sequence>
@@ -465,8 +467,7 @@
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
- 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
- 'knownIssue' : '3435'
+ 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD
}
</call>
@@ -748,7 +749,8 @@
'snmpTrapPort' : SNMP_TRAP_PORT ,
'snmpTrapCommunity' : defTrapsCommunityProp ,
'snmpTrapNumber' : '2,0,0,0,0,0' ,
- 'outputFile' : outputFile2
+ 'outputFile' : outputFile2 ,
+ 'knownIssue' : '3435'
}
</call>
</sequence>
@@ -862,8 +864,7 @@
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
- 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
- 'knownIssue' : '3435'
+ 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD
}
</call>
diff --git a/opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_trap_defaultconf.xml b/opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_trap_defaultconf.xml
index c3a2ce1..a31a1d3 100644
--- a/opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_trap_defaultconf.xml
+++ b/opends/tests/staf-tests/functional-tests/testcases/snmp/snmp_trap_defaultconf.xml
@@ -94,7 +94,8 @@
'snmpTrapPort' : SNMP_TRAP_PORT ,
'snmpTrapCommunity' : trapsCommunity ,
'snmpTrapNumber' : '1,0,0,0,0,0' ,
- 'outputFile' : outputFile
+ 'outputFile' : outputFile ,
+ 'knownIssue' : '3435'
}
</call>
</sequence>
@@ -149,8 +150,7 @@
'location' : STAF_REMOTE_HOSTNAME ,
'outputFile' : outputFile ,
'timerDuration' : timerDuration ,
- 'timerRC' : timerRC ,
- 'issue' : '3435'
+ 'timerRC' : timerRC
}
</call>
@@ -304,7 +304,8 @@
'snmpTrapPort' : SNMP_TRAP_PORT ,
'snmpTrapCommunity' : trapsCommunity ,
'snmpTrapNumber' : '2,0,0,0,0,0' ,
- 'outputFile' : outputFile
+ 'outputFile' : outputFile ,
+ 'knownIssue' : '3435'
}
</call>
</sequence>
@@ -369,8 +370,7 @@
'location' : STAF_REMOTE_HOSTNAME ,
'outputFile' : outputFile ,
'timerDuration' : timerDuration ,
- 'timerRC' : timerRC ,
- 'issue' : '3435'
+ 'timerRC' : timerRC
}
</call>
diff --git a/opends/tests/staf-tests/shared/ant/build.properties b/opends/tests/staf-tests/shared/ant/build.properties
index 655ab61..9f47b90 100644
--- a/opends/tests/staf-tests/shared/ant/build.properties
+++ b/opends/tests/staf-tests/shared/ant/build.properties
@@ -23,37 +23,34 @@
#
# Copyright 2007-2009 Sun Microsystems, Inc.
-## These values can be overrided using the user.properties file
-
-# Log directory section
-logs.dir=${basedir}${file.separator}temp${file.separator}logs
-
-# Repository section
-repository.dir=${basedir}${file.separator}temp${file.separator}repository
-
-# OpenDS section
-default.opends.dir=${project.home}${file.separator}build${file.separator}package
-default.opends.zip=${product.name}.zip
-opends.dir=${default.opends.dir}
-opends.zip=${default.opends.zip}
-
-# Java section
-java.path=${java.home}
# Shared folder
-shared.dir=${basedir}${file.separator}shared
+shared.dir=${basedir}/shared
-# Proxy section
-proxy.enabled=n
-proxy.host=webcache.central.sun.com
-proxy.port=8080
-proxy.user=
-proxy.pass=
+
+######
+## These values can be overrided using the user.properties file
+######
+
+# Repository section
+repository.dir=${basedir}/temp/repository
+
+# STAF section
+staf.install.dir=${repository.dir}/install/staf-${os.myname}
+staf.config.dir=${repository.dir}/configs
+staf.shared.dir=${shared.dir}/staf
+staf.config.stubs=${staf.shared.dir}/staf-${staf.type}.cfg
+staf.config.file=${staf.config.dir}/staf-${staf.type}-${host.name}.cfg
+staf.bin.dir=${staf.install.dir}/bin
+staf.daemon=${staf.bin.dir}/STAFProc${extension.binary}
+staf.executable=${staf.bin.dir}/STAF${extension.binary}
# Archives section
-archives.dir=${repository.dir}${file.separator}archives
+archives.dir=${repository.dir}/archives
+staf.default=true
staf.url=http://superb-east.dl.sourceforge.net/sourceforge/staf
staf.version=332
+staf.port=6500
## staf.archive value depends on os
stax.version=335
stax.archive=STAXV${stax.version}.zip
@@ -69,42 +66,60 @@
tomcat.url=http://archive.apache.org/dist/tomcat/tomcat-6/v${tomcat.version}/bin
tomcat.archive=apache-tomcat-${tomcat.version}.zip
-# STAF section
-staf.install.dir=${repository.dir}${file.separator}install${file.separator}staf-${os.myname}
-staf.port=6500
-staf.config.dir=${repository.dir}${file.separator}configs
-staf.shared.dir=${shared.dir}${file.separator}staf
-staf.config.stubs=${staf.shared.dir}${file.separator}staf-${staf.type}.cfg
-staf.config.file=${staf.config.dir}${file.separator}staf-${staf.type}-${host.name}.cfg
-staf.bin.dir=${staf.install.dir}${file.separator}bin
-staf.daemon=${staf.bin.dir}${file.separator}STAFProc${extension.binary}
-staf.executable=${staf.bin.dir}${file.separator}STAF${extension.binary}
-staf.email.send=false
-staf.email.to=
+# Proxy section
+proxy.enabled=false
+proxy.host=
+proxy.port=
+proxy.user=
+proxy.pass=
+
+
+######
+## These values can be overrided using the tests-XXX-XXX.properties file
+######
+
+# Hostname section
+local.hostname=${host.name}
+remote.hostname=${host.name}
+
+# Log directory section
+logs.dir=${basedir}/temp/logs
+
+# OpenDS section
+default.opends.dir=${project.home}/build/package
+default.opends.name=${product.name}
+opends.dir=${default.opends.dir}
+opends.name=${default.opends.name}
+
+# Java section
+java.path=${java.home}/..
+local.javahome=${java.home}/..
+remote.javahome=${java.home}/..
# Tests section
-tests.dir=${basedir}${file.separator}${tests.type}
-tests.shared.dir=${shared.dir}${file.separator}tests
-tests.config.stubs=${tests.shared.dir}${file.separator}config.py.stubs
-tests.config.file=config-${host.name}.py
-tests.run.dir=${logs.dir}${file.separator}${tests.type}${file.separator}run
-tests.tmp.dir=${logs.dir}${file.separator}${tests.type}${file.separator}tmp
-tests.xml=${tests.shared.dir}${file.separator}runTestJob.xml
+tests.default=true
+tests.dir=${basedir}/${tests.type}
+tests.shared.dir=${shared.dir}/tests
+tests.config.stubs=${tests.shared.dir}/config.py.stubs
+tests.topology.dir=${shared.dir}/topology
+tests.run.dir=${logs.dir}/${tests.type}/run
+tests.tmp.dir=${logs.dir}/${tests.type}/tmp
+tests.xml=${tests.shared.dir}/runTestJob.xml
opends.port.ldap=1389
+opends.port.admin=4444
opends.port.ldaps=1636
-opends.port.jmx=1689
opends.admin.dn=cn=myself
opends.admin.pwd=password
snmp.opendmk.lib.dir=
-test.plan.custom=${basedir}${file.separator}${tests.type}${file.separator}testcases${file.separator}run-custom-suites.dat
-test.plan.default=${basedir}${file.separator}${tests.type}${file.separator}testcases${file.separator}run-default-suites.dat
-test.plan.list=aci,backends,clu,core,dsconfig,dsml,groups,i18n,indexes,logging,monitoring,plugins,privileges,quickstart,replication,schema,security,setup,snmp,tasks,virtualAttributes
+test.plan.custom=
+test.plan.default=aci,backends,clu,core,dsconfig,dsml,groups,i18n,indexes,logging,monitoring,plugins,privileges,replication,schema,security,setup,snmp,tasks,virtualAttributes
+verbose.mode=false
+email.enabled=false
+email.to=
+email.server.host=emailhost
+email.server.port=emailport
-# Email section
-email.enabled=n
-email.to=${user.name}@${host.name}
-email.from=${user.name}@${host.name}
-email.server.host=${host.name}
-email.server.port=25
-email.server.user=
-email.server.pwd=
+#tests.os.string=${os.name}
+#tests.jvm.string=${java.version}(${sun.arch.data.model} bits)
+logs.uri=file://
+email.subject=Results for ${opends.name} on ${remote.hostname}
diff --git a/opends/tests/staf-tests/shared/ant/build.xml b/opends/tests/staf-tests/shared/ant/build.xml
index 437aa15..1cdba9a 100644
--- a/opends/tests/staf-tests/shared/ant/build.xml
+++ b/opends/tests/staf-tests/shared/ant/build.xml
@@ -22,7 +22,7 @@
! CDDL HEADER END
!
!
- ! Copyright 2008 Sun Microsystems, Inc.
+ ! Copyright 2008-2009 Sun Microsystems, Inc.
! -->
<project name="opends-staf-tests" basedir="../.." default="usage">
@@ -72,26 +72,21 @@
</classpath>
</taskdef>
+ <!-- User environment -->
+ <property environment="env"/>
+
<!-- Check if the current platform is supported -->
<switch value="${os.name}">
<case value="SunOS">
<!-- Solaris system -->
<switch value="${os.arch}">
<case value="sparc">
- <!-- Solaris sparc -->
- <exec executable="isainfo" outputproperty="os.bits">
- <arg value="-b"/>
- </exec>
- <switch value="${os.bits}">
- <case value="32">
- <!-- Solaris sparc 32 bit -->
- <property name="os.myname" value="solaris-sparc"/>
- </case>
- <case value="64">
- <!-- Solaris sparc 64 bit -->
- <property name="os.myname" value="solaris-sparc64"/>
- </case>
- </switch>
+ <!-- Solaris sparc 32 bit -->
+ <property name="os.myname" value="solaris-sparc"/>
+ </case>
+ <case value="sparcv9">
+ <!-- Solaris sparc 64 bit -->
+ <property name="os.myname" value="solaris-sparc64"/>
</case>
<case value="x86">
<!-- Solaris x86 -->
@@ -131,6 +126,7 @@
<property name="var.path" value="PATH"/>
</case>
<default>
+ <osfamily property="os.family"/>
<if>
<equals arg1="${os.family}" arg2="windows"/>
<then>
@@ -155,7 +151,7 @@
<isset property="staf.type"/>
</not>
<then>
- <property name="staf.type" value="controler"/>
+ <property name="staf.type" value="controller"/>
</then>
</if>
@@ -169,12 +165,44 @@
</then>
</if>
- <!-- User-defined values -->
- <property file="${basedir}/user.properties"/>
-
<!-- Default values for build environment -->
<property file="${antfile.dir}/build.properties"/>
+ <!-- User-defined values -->
+ <if>
+ <available file="${basedir}/user.properties"/>
+ <then>
+ <var file="${basedir}/user.properties"/>
+ </then>
+ </if>
+
+ <!-- Tests-defined values -->
+ <if>
+ <available file="${env.CONFIG_FILE}"/>
+ <then>
+ <var file="${env.CONFIG_FILE}"/>
+ </then>
+ <else>
+ <if>
+ <available file="${basedir}/tests-${local.hostname}.properties"/>
+ <then>
+ <var file="${basedir}/tests-${local.hostname}.properties"/>
+ </then>
+ </if>
+ </else>
+ </if>
+
+ <!-- Set value for tests.config.file variable -->
+ <if>
+ <equals arg1="${tests.mode}" arg2="remote"/>
+ <then>
+ <property name="tests.config.file" value="config-${local.hostname}-${remote.hostname}.py"/>
+ </then>
+ <else>
+ <property name="tests.config.file" value="config-${local.hostname}.py"/>
+ </else>
+ </if>
+
<!-- Set value for staf.archive and staf.lib.dir variables -->
<if>
<equals arg1="${os.family}" arg2="windows"/>
@@ -214,13 +242,6 @@
<ant antfile="${antfile.dir}/user.xml" target="configure"/>
</target>
- <!-- Unconfigure user variables -->
- <target name="user-unconfigure"
- depends="global-init">
- <ant antfile="${antfile.dir}/user.xml" target="unconfigure"/>
- </target>
-
-
<!-- ######### -->
<!-- # PROXY # -->
<!-- ######### -->
@@ -271,6 +292,14 @@
<!-- # STAF # -->
<!-- ######## -->
+ <target name="set-controller-type">
+ <property name="staf.type" value="controller"/>
+ </target>
+
+ <target name="set-slave-type">
+ <property name="staf.type" value="slave"/>
+ </target>
+
<!-- Install STAF and STAF services -->
<target name="staf-install"
depends="global-init,dependencies-download">
@@ -284,19 +313,20 @@
</target>
<!-- Start STAF -->
- <target name="staf-start"
- depends="global-init,staf-install">
+ <target name="staf-start">
+ <antcall target="staf-controller-start"/>
+ </target>
+
+ <target name="staf-controller-start"
+ depends="set-controller-type,global-init,staf-install">
+ <var name="staf.type" value="controller"/>
<ant antfile="${antfile.dir}/staf.xml" target="start"/>
</target>
- <target name="staf-start-slave">
- <property name="staf.type" value="slave"/>
- <antcall target="staf-start"/>
- </target>
-
- <target name="staf-start-controler">
- <property name="tests.type" value="controler"/>
- <antcall target="staf-start"/>
+ <target name="staf-slave-start"
+ depends="set-slave-type,global-init,staf-install">
+ <var name="staf.type" value="slave"/>
+ <ant antfile="${antfile.dir}/staf.xml" target="start"/>
</target>
<!-- Stop STAF -->
@@ -328,40 +358,46 @@
<!-- # TESTS # -->
<!-- ######### -->
+ <target name="set-func-type">
+ <property name="tests.type" value="functional-tests"/>
+ </target>
+
+ <target name="set-stress-type">
+ <property name="tests.type" value="stress-tests"/>
+ </target>
+
<!-- Configure tests to run -->
- <target name="tests-configure"
- depends="global-init">
- <ant antfile="${antfile.dir}/tests.xml" target="configure"/>
+ <target name="tests-configure">
+ <antcall target="tests-func-configure"/>
</target>
<!-- Configure functional tests to run -->
- <target name="tests-func-configure">
- <property name="tests.type" value="functional-tests"/>
- <antcall target="tests-configure"/>
+ <target name="tests-func-configure"
+ depends="set-func-type,global-init">
+ <ant antfile="${antfile.dir}/tests.xml" target="configure"/>
</target>
<!-- Configure stress tests to run -->
- <target name="tests-stress-configure">
- <property name="tests.type" value="stress-tests"/>
- <antcall target="tests-configure"/>
+ <target name="tests-stress-configure"
+ depends="set-stress-type,global-init">
+ <ant antfile="${antfile.dir}/tests.xml" target="configure"/>
</target>
<!-- Run tests -->
- <target name="tests-run"
- depends="global-init,opends-build,staf-start">
- <ant antfile="${antfile.dir}/tests.xml" target="run"/>
+ <target name="tests-run">
+ <antcall target="tests-func-run"/>
</target>
<!-- Run functional tests -->
- <target name="tests-func-run">
- <property name="tests.type" value="functional-tests"/>
- <antcall target="tests-run"/>
+ <target name="tests-func-run"
+ depends="set-func-type,global-init,opends-build,staf-start">
+ <ant antfile="${antfile.dir}/tests.xml" target="run"/>
</target>
<!-- Run stress tests -->
- <target name="tests-stress-run">
- <property name="tests.type" value="stress-tests"/>
- <antcall target="tests-run"/>
+ <target name="tests-stress-run"
+ depends="set-stress-type,global-init,opends-build,staf-start">
+ <ant antfile="${antfile.dir}/tests.xml" target="run"/>
</target>
diff --git a/opends/tests/staf-tests/shared/ant/dependencies.xml b/opends/tests/staf-tests/shared/ant/dependencies.xml
index 591f2ca..7589a97 100644
--- a/opends/tests/staf-tests/shared/ant/dependencies.xml
+++ b/opends/tests/staf-tests/shared/ant/dependencies.xml
@@ -22,7 +22,7 @@
! CDDL HEADER END
!
!
- ! Copyright 2008 Sun Microsystems, Inc.
+ ! Copyright 2008-2009 Sun Microsystems, Inc.
! -->
<project name="dependencies">
<description>
@@ -57,6 +57,7 @@
select="\1"
casesensitive="false"/>
+ <echo>Checking @{archive} archive...</echo>
<switch value="${ext}">
<case value="gz">
<!-- gz files -->
diff --git a/opends/tests/staf-tests/shared/ant/opends.xml b/opends/tests/staf-tests/shared/ant/opends.xml
index 6e88f3b..ca3434e 100644
--- a/opends/tests/staf-tests/shared/ant/opends.xml
+++ b/opends/tests/staf-tests/shared/ant/opends.xml
@@ -22,7 +22,7 @@
! CDDL HEADER END
!
!
- ! Copyright 2008 Sun Microsystems, Inc.
+ ! Copyright 2008-2009 Sun Microsystems, Inc.
! -->
<project name="opends">
@@ -35,7 +35,7 @@
<if>
<and>
<equals arg1="${opends.dir}" arg2="${default.opends.dir}"/>
- <equals arg1="${opends.zip}" arg2="${default.opends.zip}"/>
+ <equals arg1="${opends.name}" arg2="${default.opends.name}"/>
</and>
<then>
<loadproperties srcFile="${project.home}/build.properties">
@@ -48,7 +48,7 @@
<if>
<not>
- <available file="${opends.dir}/${opends.zip}"/>
+ <available file="${opends.dir}/${opends.name}.zip"/>
</not>
<then>
<if>
@@ -59,7 +59,7 @@
<available file="${snmp.opendmk.lib.dir}"/>
</and>
<then>
- <echo>Build ${opends.zip} with SNMP</echo>
+ <echo>Build ${opends.name} with SNMP</echo>
<replace file="${project.home}/build.properties"
value="opendmk.lib.dir=${snmp.opendmk.lib.dir}">
<replacefilter token="opendmk.lib.dir="/>
@@ -67,7 +67,7 @@
<property name="package.rebuild" value="true"/>
</then>
<else>
- <echo>Build ${opends.zip} without SNMP</echo>
+ <echo>Build ${opends.name} without SNMP</echo>
<property name="package.rebuild" value="true"/>
</else>
</if>
@@ -82,7 +82,7 @@
<equals arg1="${opendmk.lib.dir}" arg2=""/>
</and>
<then>
- <echo>Rebuild ${opends.zip} with SNMP</echo>
+ <echo>Rebuild ${opends.name} with SNMP</echo>
<replace file="${project.home}/build.properties"
value="opendmk.lib.dir=${snmp.opendmk.lib.dir}">
<replacefilter token="opendmk.lib.dir="/>
diff --git a/opends/tests/staf-tests/shared/ant/staf.xml b/opends/tests/staf-tests/shared/ant/staf.xml
index 58c6f15..6b6804f 100644
--- a/opends/tests/staf-tests/shared/ant/staf.xml
+++ b/opends/tests/staf-tests/shared/ant/staf.xml
@@ -22,7 +22,7 @@
! CDDL HEADER END
!
!
- ! Copyright 2008 Sun Microsystems, Inc.
+ ! Copyright 2008-2009 Sun Microsystems, Inc.
! -->
<project name="staf">
@@ -32,6 +32,7 @@
<!-- Install STAF and services -->
<target name="install">
+ <echo>Installing staf, please wait...</echo>
<if>
<not>
<available file="${staf.install.dir}/bin/STAF.cfg"/>
@@ -73,8 +74,8 @@
dest="${staf.install.dir}/services"/>
<!-- Add DSML service extension -->
- <mkdir dir="${staf.install.dir}/services/dsml"/>
- <copy todir="${staf.install.dir}/services/dsml">
+ <mkdir dir="${staf.install.dir}/services/DSML"/>
+ <copy todir="${staf.install.dir}/services/DSML">
<fileset dir="${basedir}/../staf-tests/shared/dsml"
includes="dsmlService.jar"/>
</copy>
@@ -87,14 +88,6 @@
<echo>Staf is already installed in [${staf.install.dir}]</echo>
</else>
</if>
-
- <!-- Copy functional-tests.cfg -->
- <mkdir dir="${staf.config.dir}"/>
- <copy file="${staf.config.stubs}" tofile="${staf.config.file}">
- <filterchain>
- <expandproperties/>
- </filterchain>
- </copy>
</target>
<!-- Uninstall STAF and services -->
@@ -114,11 +107,21 @@
<!-- Start STAF -->
<target name="start">
+ <!-- Copy staf.cfg -->
+ <mkdir dir="${staf.config.dir}"/>
+ <copy file="${staf.config.stubs}" tofile="${staf.config.file}">
+ <filterchain>
+ <expandproperties/>
+ </filterchain>
+ </copy>
+
<if>
<not>
<socket port="${staf.port}" server="${host.name}"/>
</not>
<then>
+ <delete dir="${staf.install.dir}/logs"/>
+
<echo>Starting staf, please wait...</echo>
<exec dir="${staf.bin.dir}"
executable="${staf.daemon}"
@@ -128,6 +131,8 @@
<env key="LD_LIBRARY_PATH" path="${staf.install.dir}/lib"/>
<env key="CLASSPATH" path="${staf.lib.dir}/JSTAF.jar${path.separator}:${project.home}/ext/svnkit/svnkit.jar:."/>
<env key="STAFCONVDIR" value="${staf.install.dir}/codepage"/>
+ <env key="LANG" value="en_US.ISO8859-1"/>
+ <env key="LC_ALL" value="en_US.ISO8859-1"/>
<env key="STAFCODEPAGE" value="LATIN_1"/>
<env key="STAF_INSTANCE_NAME" value="STAF"/>
</exec>
@@ -161,7 +166,6 @@
<env key="LD_LIBRARY_PATH" path="${staf.lib.dir}"/>
<env key="CLASSPATH" path="${staf.lib.dir}/JSTAF.jar${path.separator}:."/>
<env key="STAFCONVDIR" value="${staf.install.dir}/codepage"/>
- <env key="STAFCODEPAGE" value="LATIN_1"/>
</exec>
<echo>Waiting for service to shutdown gracefully...</echo>
@@ -225,7 +229,6 @@
<env key="LD_LIBRARY_PATH" path="${staf.lib.dir}"/>
<env key="CLASSPATH" path="${staf.lib.dir}/JSTAF.jar${path.separator}:."/>
<env key="STAFCONVDIR" value="${staf.install.dir}/codepage"/>
- <env key="STAFCODEPAGE" value="LATIN_1"/>
<arg value="-classpath"/>
<arg value="${staf.install.dir}/services/stax/STAXMon.jar${path.separator}${staf.lib.dir}/JSTAF.jar"/>
<arg value="com.ibm.staf.service.stax.STAXMonitor"/>
@@ -241,7 +244,6 @@
<env key="LD_LIBRARY_PATH" path="${staf.lib.dir}"/>
<env key="CLASSPATH" path="${staf.lib.dir}/JSTAF.jar${path.separator}:."/>
<env key="STAFCONVDIR" value="${staf.install.dir}/codepage"/>
- <env key="STAFCODEPAGE" value="LATIN_1"/>
<arg value="-classpath"/>
<arg value="${staf.lib.dir}${path.separator}${staf.lib.dir}/JSTAF.jar"/>
<arg value="com.ibm.staf.STAFJVMLogViewer"/>
diff --git a/opends/tests/staf-tests/shared/ant/tests.xml b/opends/tests/staf-tests/shared/ant/tests.xml
index aecfe03..c366601 100644
--- a/opends/tests/staf-tests/shared/ant/tests.xml
+++ b/opends/tests/staf-tests/shared/ant/tests.xml
@@ -22,9 +22,10 @@
! CDDL HEADER END
!
!
- ! Copyright 2008 Sun Microsystems, Inc.
+ ! Copyright 2008-2009 Sun Microsystems, Inc.
! -->
<project name="tests">
+
<description>
Execute the tests.
</description>
@@ -34,28 +35,30 @@
<format property="tests.run.time" pattern="yyyy.MM.dd-HH.mm.ss"/>
</tstamp>
- <!-- clean up some -->
- <delete dir="${tests.tmp.dir}"/>
+ <!-- clean up tmp dir -->
+ <if>
+ <equals arg1="${tests.mode}" arg2="local"/>
+ <then>
+ <delete dir="${tests.tmp.dir}"/>
+ <mkdir dir="${tests.tmp.dir}"/>
+ </then>
+ </if>
- <!-- make all the necessary directories for this test run -->
- <mkdir dir="${tests.tmp.dir}"/>
+ <!-- make all the necessary directories for this test run -->
<mkdir dir="${tests.run.dir}/${tests.run.time}"/>
<mkdir dir="${tests.run.dir}/${tests.run.time}/config"/>
- <mkdir dir="${tests.run.dir}/${tests.run.time}/report"/>
- <!-- these will serve for after-the-fact archiving the logs -->
+ <!-- these will serve for after-the-fact archiving the logs -->
<mkdir dir="${tests.run.dir}/${tests.run.time}/staf-logs"/>
- <mkdir dir="${tests.run.dir}/${tests.run.time}/server-logs"/>
<mkdir dir="${tests.run.dir}/${tests.run.time}/coverage"/>
- <!--<delete file="${test.plan.default}"/>
- <for list="${test.plan.list}" param="item">
- <sequential>
- <echo file="${test.plan.default}" append="true">@{item}
-</echo>
- </sequential>
- </for>-->
+ <if>
+ <equals arg1="${test.plan.custom}" arg2=""/>
+ <then>
+ <var name="test.plan.custom" value="${test.plan.default}"/>
+ </then>
+ </if>
- <!-- generate the timestamped config file that will be used for this run -->
+ <!-- generate the config file that will be used for this run -->
<copy file="${tests.config.stubs}"
tofile="${tests.run.dir}/${tests.run.time}/config/${tests.config.file}">
<filterchain>
@@ -63,6 +66,16 @@
</filterchain>
</copy>
+ <!-- generate the topology files that will be used for this run -->
+ <copy todir="${tests.run.dir}/${tests.run.time}/config">
+ <fileset dir="${tests.topology.dir}">
+ <include name="**/*.txt"/>
+ </fileset>
+ <filterchain>
+ <expandproperties/>
+ </filterchain>
+ </copy>
+
<!-- this is a windows-specific measure to replace the windows file
separator by a forward slash. Staf otherwise fails to find the files. -->
<replace file="${tests.run.dir}/${tests.run.time}/config/${tests.config.file}" token="\" value="/"/>
@@ -85,142 +98,234 @@
</exec>
<symlink link="${tests.run.dir}/latest" resource="${tests.run.time}" overwrite="true"/>
- <if>
- <available file="${tests.tmp.dir}/${product.name}/logs"/>
- <then>
- <echo>Saving server logs</echo>
- <copy todir="${tests.run.dir}/${tests.run.time}/server-logs">
- <fileset dir="${tests.tmp.dir}/${product.name}/logs"/>
- </copy>
- </then>
- </if>
- <echo>Saving Staf/Stax logs</echo>
- <copy todir="${tests.run.dir}/${tests.run.time}/staf-logs">
- <fileset dir="${staf.install.dir}/logs"/>
- </copy>
- <delete dir="${staf.install.dir}/logs"/>
- <echo>Saving report</echo>
- <copy todir="${tests.run.dir}/${tests.run.time}/report">
- <fileset dir="${tests.tmp.dir}/${tests.run.time}">
- <include name="**"/>
- </fileset>
- </copy>
- <delete file="${tests.tmp.dir}/percentage.properties"/>
+ <echo>Report is available at</echo>
+ <echo>${tests.run.dir}/latest</echo>
</target>
<target name="configure">
- <condition property="already.customized" value="true" else="false">
- <available file="${test.plan.custom}" />
- </condition>
+ <echo>* Tests configuration</echo>
+
+ <input message=" Run the tests on the local machine or on a remote machine?"
+ defaultvalue="local"
+ validargs="local,remote"
+ addproperty="tests.mode.input"/>
+
+ <input message=" Enter local hostname:"
+ defaultvalue="${local.hostname}"
+ addproperty="local.hostname.input"/>
+
<if>
- <equals arg1="${already.customized}" arg2="true" />
+ <equals arg1="${tests.mode.input}" arg2="remote"/>
<then>
- <input message="A previously customized test plan was detected. Do you want to change the list of suites to run?" validargs="y,n" defaultvalue="n" addproperty="prompt.do" />
+ <input message=" Enter remote hostname:"
+ defaultvalue=""
+ addproperty="remote.hostname.input"/>
+
+ <!-- Tests-defined values -->
+ <if>
+ <available file="${basedir}/tests-${local.hostname.input}-${remote.hostname.input}.properties"/>
+ <then>
+ <var file="${basedir}/tests-${local.hostname.input}-${remote.hostname.input}.properties"/>
+ </then>
+ </if>
</then>
<else>
- <echo>No previous customized test plan found.</echo>
- <property name="prompt.do" value="y" />
+ <property name="remote.hostname.input" value="${local.hostname.input}"/>
+
+ <!-- Tests-defined values -->
+ <if>
+ <available file="${basedir}/tests-${local.hostname.input}.properties"/>
+ <then>
+ <var file="${basedir}/tests-${local.hostname.input}.properties"/>
+ </then>
+ </if>
+ </else>
+ </if>
+
+ <input message=" Enter path to logs directory:"
+ defaultvalue="${logs.dir}"
+ addproperty="logs.dir.input"/>
+
+ <input message=" Enter path to OpenDS archive:"
+ defaultvalue="${opends.dir}"
+ addproperty="opends.dir.input"/>
+
+ <input message=" Enter OpenDS name:"
+ defaultvalue="${opends.name}"
+ addproperty="opends.name.input"/>
+
+ <input message=" Enter java home (on local machine):"
+ defaultvalue="${local.javahome}"
+ addproperty="local.javahome.input"/>
+
+ <if>
+ <equals arg1="${tests.mode.input}" arg2="remote" />
+ <then>
+ <input message=" Enter java home (on remote machine):"
+ defaultvalue="${remote.javahome}"
+ addproperty="remote.javahome.input"/>
+ </then>
+ <else>
+ <property name="remote.javahome.input" value="${local.javahome.input}"/>
+ </else>
+ </if>
+
+ <if>
+ <equals arg1="${tests.mode.input}" arg2="remote" />
+ <then>
+ <input message=" Enter directory instance directory (on remote machine):"
+ defaultvalue="${tests.tmp.dir}"
+ addproperty="tests.tmp.dir.input"/>
+ </then>
+ <else>
+ <input message=" Enter directory instance directory (on local machine):"
+ defaultvalue="${tests.tmp.dir}"
+ addproperty="tests.tmp.dir.input"/>
+ </else>
+ </if>
+
+ <input message=" Use default directory instance?"
+ defaultvalue="${tests.default}"
+ validargs="true,false"
+ addproperty="tests.default.input"/>
+ <if>
+ <equals arg1="${tests.default.input}" arg2="false"/>
+ <then>
+ <input message=" Enter OpenDS ldap port:"
+ defaultvalue="${opends.port.ldap}"
+ addproperty="opends.port.ldap.input"/>
+ <input message=" Enter OpenDS admin port:"
+ defaultvalue="${opends.port.admin}"
+ addproperty="opends.port.admin.input"/>
+ <input message=" Enter OpenDS secure ldap port:"
+ defaultvalue="${opends.port.ldaps}"
+ addproperty="opends.port.ldaps.input"/>
+ <input message=" Enter OpenDS admin DN (also called root DN):"
+ defaultvalue="${opends.admin.dn}"
+ addproperty="opends.admin.dn.input"/>
+ <input message=" Enter OpenDS admin password:"
+ defaultvalue="${opends.admin.pwd}"
+ addproperty="opends.admin.pwd.input"/>
+ <input message=" Enter OpenDMK lib directory:"
+ defaultvalue="${snmp.opendmk.lib.dir}"
+ addproperty="snmp.opendmk.lib.dir.input"/>
+ </then>
+ <else>
+ <property name="opends.port.ldap.input" value="${opends.port.ldap}"/>
+ <property name="opends.port.admin.input" value="${opends.port.admin}"/>
+ <property name="opends.port.ldaps.input" value="${opends.port.ldaps}"/>
+ <property name="opends.admin.dn.input" value="${opends.admin.dn}"/>
+ <property name="opends.admin.pwd.input" value="${opends.admin.pwd}"/>
+ <property name="snmp.opendmk.lib.dir.input" value="${snmp.opendmk.lib.dir}"/>
+ </else>
+ </if>
+
+ <input message=" Run tests using verbose mode?"
+ defaultvalue="${verbose.mode}"
+ validargs="true,false"
+ addproperty="verbose.mode.input"/>
+
+ <echo>* Test plan configuration</echo>
+ <if>
+ <equals arg1="${test.plan.custom}" arg2=""/>
+ <then>
+ <echo> No previous customized test plan found.</echo>
+ <property name="prompt" value="y"/>
+ </then>
+ <else>
+ <echo> A previously customized test plan was detected:</echo>
+ <echo> ${test.plan.custom}</echo>
+ <echo></echo>
+ <input message=" Do you want to change the list of suites to run?"
+ validargs="y,n"
+ defaultvalue="n"
+ addproperty="prompt"/>
</else>
</if>
<if>
- <equals arg1="${prompt.do}" arg2="y" />
+ <equals arg1="${prompt}" arg2="y" />
<then>
- <delete file="${test.plan.custom}" />
+ <var name="test.plan.custom" value=""/>
+ <input message=" Do you want to execute all the tests?"
+ validargs="y,n"
+ defaultvalue="y"
+ addproperty="answer"/>
+ <if>
+ <equals arg1="${answer}" arg2="y" />
+ <then>
+ <var name="test.plan.custom" value="${test.plan.default}"/>
+ </then>
+ <else>
+ <for param="item">
+ <dirset dir="${tests.dir}/testcases"
+ includes="*"
+ excludes="quickstart,sample">
+ <type type="dir"/>
+ </dirset>
- <for param="item">
- <dirset dir="${tests.dir}/testcases"
- includes="*">
- <type type="dir"/>
- </dirset>
- <sequential>
- <var name="test" unset="true"/>
- <var name="answer" unset="true"/>
+ <sequential>
+ <var name="test" unset="true"/>
+ <var name="answer" unset="true"/>
- <basename property="test" file="@{item}"/>
- <input message="Do you want to execute ${test}?" validargs="y,n" defaultvalue="y" addproperty="answer"/>
- <if>
- <equals arg1="${answer}" arg2="y" />
- <then>
- <echo file="${test.plan.custom}" append="true">${test}
-</echo>
- </then>
- </if>
- </sequential>
- </for>
+ <basename property="test" file="@{item}"/>
+ <input message=" Do you want to execute ${test}?"
+ validargs="y,n"
+ defaultvalue="y"
+ addproperty="answer"/>
+ <if>
+ <equals arg1="${answer}" arg2="y" />
+ <then>
+ <if>
+ <equals arg1="${test.plan.custom}" arg2=""/>
+ <then>
+ <var name="test.plan.custom" value="${test}"/>
+ </then>
+ <else>
+ <var name="test.plan.custom" value="${test.plan.custom},${test}"/>
+ </else>
+ </if>
+ </then>
+ </if>
+ </sequential>
+ </for>
+ </else>
+ </if>
</then>
</if>
+
+ <echo>Saving ...</echo>
+ <if>
+ <equals arg1="${tests.mode.input}" arg2="remote"/>
+ <then>
+ <property name="property.file" value="tests-${local.hostname.input}-${remote.hostname.input}.properties"/>
+ </then>
+ <else>
+ <property name="property.file" value="tests-${local.hostname.input}.properties"/>
+ </else>
+ </if>
+ <echo file="${basedir}/${property.file}"># Tests-defined values
+# This file is generated by "build tests-configure" command
+tests.mode=${tests.mode.input}
+local.hostname=${local.hostname.input}
+local.javahome=${local.javahome.input}
+remote.hostname=${remote.hostname.input}
+remote.javahome=${remote.javahome.input}
+logs.dir=${logs.dir.input}
+opends.dir=${opends.dir.input}
+opends.name=${opends.name.input}
+tests.tmp.dir=${tests.tmp.dir.input}
+tests.default=${tests.default.input}
+opends.port.ldap=${opends.port.ldap.input}
+opends.port.admin=${opends.port.admin.input}
+opends.port.ldaps=${opends.port.ldaps.input}
+opends.admin.dn=${opends.admin.dn.input}
+opends.admin.pwd=${opends.admin.pwd.input}
+snmp.opendmk.lib.dir=${snmp.opendmk.lib.dir.input}
+verbose.mode=${verbose.mode.input}
+test.plan.custom=${test.plan.custom}</echo>
</target>
- <target name="send-mail-prepare">
- <condition property="test.successful">
- <available file="${tests.tmp.dir}/my-report.html"/>
- </condition>
- <condition property="email.send">
- <equals arg1="${email.enabled}" arg2="y"
- casesensitive="false" trim="true"/>
- </condition>
- </target>
- <target name="send-mail-get-percentage" depends="send-mail-prepare" if="test.successful">
- <echo>test report found.Proceeding...</echo>
- <delete file="${tests.tmp.dir}/percentage.properties"/>
- <copy file="${tests.tmp.dir}/my-report.html" tofile="${tests.tmp.dir}/percentage.properties">
- <filterchain>
- <linecontains>
- <contains value='font size="+2'/>
- </linecontains>
- <tokenfilter>
- <replaceregex pattern=".*font size=.+2..(.*\d+)%./font.*" replace="test.percentage=\1"/>
- </tokenfilter>
- </filterchain>
- </copy>
- <property file="${tests.tmp.dir}/percentage.properties"/>
- <echo>Test Success Rate: ${test.percentage}%</echo>
- </target>
- <target name="send-mail" if="email.send" depends="send-mail-get-percentage">
- <condition property="email.send.noauth">
- <or>
- <not>
- <isset property="email.server.user"/>
- </not>
- <not>
- <length string="${email.server.user}" when="greater"
- trim="true" length="0"/>
- </not>
- </or>
- </condition>
- <condition property="email.file"
- value="${tests.tmp.dir}/my-report.html"
- else="staf-installer/failure.html">
- <available file="${tests.tmp.dir}/my-report.html"/>
- </condition>
- <condition property="email.subject"
- value="FT - Run - ${daily.date} - ${os.name} - ${os.arch} - ${test.percentage}%"
- else="FT - Failed -${daily.date} - ${os.name} - ${os.arch}">
- <available file="${tests.tmp.dir}/my-report.html"/>
- </condition>
- <antcall target="send-mail-noauth"/>
- <antcall target="send-mail-withauth"/>
- </target>
- <target name="send-mail-noauth" if="email.send.noauth">
- <mail from="${email.from}"
- tolist="${email.to}"
- subject="${email.subject}"
- mailhost="${email.server.host}"
- mailport="${email.server.port}"
- messagefile="${email.file}"
- messagemimetype="text/html" />
- </target>
- <target name="send-mail-withauth" unless="email.send.noauth">
- <mail from="${email.from}"
- tolist="${email.to}"
- subject="${email.subject}"
- mailhost="${email.server.host}"
- mailport="${email.server.port}"
- user="${email.server.user}"
- password="${email.server.pwd}"
- messagefile="${email.file}"
- messagemimetype="text/html" />
- </target>
+
<target name="coverage-init">
<path id="emma.lib">
<pathelement location="${project.home}/ext/emma/lib/emma.jar" />
@@ -252,14 +357,14 @@
<move file="${product.package}" tofile="${product.package}.nocov"/>
<!-- intrument the OpenDS java archive to gather coverage -->
- <java classpath="${tests.tmp.dir}${file.separator}coverage-instr${file.separator}${product.name}${file.separator}lib${file.separator}emma.jar"
+ <java classpath="${tests.tmp.dir}/coverage-instr/${product.name}/lib$/emma.jar"
classname="emma" fork="true">
- <jvmarg value="-Demma.metadata.out.file=${tests.tmp.dir}${file.separator}coverage-instr${file.separator}${product.name}${file.separator}coverage.em" />
+ <jvmarg value="-Demma.metadata.out.file=${tests.tmp.dir}/coverage-instr/${product.name}/coverage.em" />
<arg value="instr" />
<arg value="-m" />
<arg value="overwrite" />
<arg value="-ip" />
- <arg value="${tests.tmp.dir}${file.separator}coverage-instr${file.separator}${product.name}${file.separator}lib${file.separator}OpenDS.jar:${tests.tmp.dir}${file.separator}coverage-instr${file.separator}${product.name}${file.separator}lib${file.separator}extensions${file.separator}snmp-mib2605.jar" />
+ <arg value="${tests.tmp.dir}/coverage-instr/${product.name}/lib/OpenDS.jar:${tests.tmp.dir}/coverage-instr/${product.name}/lib/extensions/snmp-mib2605.jar" />
</java>
<echo>Writing properties file</echo>
<echo file="${tests.tmp.dir}/coverage-instr/${product.name}/classes/emma.properties">coverage.out.file=${tests.tmp.dir}/emma.coverage
@@ -296,6 +401,5 @@
<move file="${product.package}.nocov" tofile="${product.package}"/>
</target>
<target name="testwithcoverage" depends="coverage-on,coverage-instrument,restore-pkg,coverage-report"/>
-<!-- Run tests section - bottom -->
</project>
diff --git a/opends/tests/staf-tests/shared/ant/usage.xml b/opends/tests/staf-tests/shared/ant/usage.xml
index 32b70bc..46d52d3 100644
--- a/opends/tests/staf-tests/shared/ant/usage.xml
+++ b/opends/tests/staf-tests/shared/ant/usage.xml
@@ -22,7 +22,7 @@
! CDDL HEADER END
!
!
- ! Copyright 2008 Sun Microsystems, Inc.
+ ! Copyright 2008-2009 Sun Microsystems, Inc.
! -->
<project name="usage">
@@ -39,15 +39,19 @@
usage : print this message
properties : print ant properties
+ --user--
+ user-configure : configure user settings
+ user-unconfigure : unconfigure user settings
+
--dependencies--
dependencies-download : download the archives necessary to install staf
dependencies-remove : remove the archives previously downloaded
--staf--
staf-install : install the staf
- staf-start : start staf without services
- staf-controler-start : start staf without services
- staf-remote-start : start staf with all the services
+ staf-start : start staf with all the services
+ staf-controller-start : start staf with all the services
+ staf-slave-start : start staf without services
staf-stop : stop staf
staf-uninstall : uninstall
staf-status : report if staf is installed and running
diff --git a/opends/tests/staf-tests/shared/ant/user.xml b/opends/tests/staf-tests/shared/ant/user.xml
index 4581cf3..fa59228 100644
--- a/opends/tests/staf-tests/shared/ant/user.xml
+++ b/opends/tests/staf-tests/shared/ant/user.xml
@@ -22,8 +22,9 @@
! CDDL HEADER END
!
!
- ! Copyright 2008 Sun Microsystems, Inc.
+ ! Copyright 2008-2009 Sun Microsystems, Inc.
! -->
+
<project name="user">
<description>
@@ -31,35 +32,82 @@
</description>
<target name="configure">
- <echo>* Framework configuration</echo>
- <input message=" Enter path to OpenDS archive:"
- defaultvalue="${opends.dir}"
- addproperty="opends.dir.input"/>
- <input message=" Enter OpenDS archive name:"
- defaultvalue="${opends.zip}"
- addproperty="opends.zip.input"/>
- <input message=" Enter path to logs directory:"
- defaultvalue="${logs.dir}"
- addproperty="logs.dir.input"/>
+ <echo>* STAF configuration</echo>
<input message=" Enter path to repository directory:"
defaultvalue="${repository.dir}"
addproperty="repository.dir.input"/>
+
+ <input message=" Use default STAF/services version and configuration?"
+ defaultvalue="${staf.default}"
+ validargs="true,false"
+ addproperty="staf.default.input"/>
+ <if>
+ <equals arg1="${staf.default.input}" arg2="false"/>
+ <then>
+ <input message=" Enter STAF version:"
+ defaultvalue="${staf.version}"
+ addproperty="staf.version.input"/>
+
+ <input message=" Enter STAF port:"
+ defaultvalue="${staf.port}"
+ addproperty="staf.port.input"/>
+
+ <input message=" Enter STAX version:"
+ defaultvalue="${stax.version}"
+ addproperty="stax.version.input"/>
+
+ <input message=" Enter Email service version:"
+ defaultvalue="${email.version}"
+ addproperty="email.version.input"/>
+
+ <input message=" Enter Event service version:"
+ defaultvalue="${event.version}"
+ addproperty="event.version.input"/>
+
+ <input message=" Enter EventManager service version:"
+ defaultvalue="${eventmanager.version}"
+ addproperty="eventmanager.version.input"/>
+
+ <input message=" Enter HTTP service version:"
+ defaultvalue="${http.version}"
+ addproperty="http.version.input"/>
+
+ <input message=" Enter Tomcat service version:"
+ defaultvalue="${tomcat.version}"
+ addproperty="tomcat.version.input"/>
+ </then>
+ <else>
+ <property name="staf.version.input" value="${staf.version}"/>
+ <property name="staf.port.input" value="${staf.port}"/>
+ <property name="stax.version.input" value="${stax.version}"/>
+ <property name="email.version.input" value="${email.version}"/>
+ <property name="event.version.input" value="${event.version}"/>
+ <property name="eventmanager.version.input" value="${eventmanager.version}"/>
+ <property name="http.version.input" value="${http.version}"/>
+ <property name="tomcat.version.input" value="${tomcat.version}"/>
+ </else>
+ </if>
+
+ <echo>* Proxy configuration</echo>
<input message=" Use proxy?"
defaultvalue="${proxy.enabled}"
- validargs="y,n"
+ validargs="true,false"
addproperty="proxy.enabled.input"/>
<if>
- <equals arg1="${proxy.enabled.input}" arg2="y"/>
+ <equals arg1="${proxy.enabled.input}" arg2="true"/>
<then>
<input message=" Enter proxy host:"
defaultvalue="${proxy.host}"
addproperty="proxy.host.input"/>
+
<input message=" Enter proxy port:"
defaultvalue="${proxy.port}"
addproperty="proxy.port.input"/>
+
<input message=" Enter proxy user:"
defaultvalue="${proxy.user}"
addproperty="proxy.user.input"/>
+
<input message=" Enter proxy password:"
defaultvalue="${proxy.pass}"
addproperty="proxy.pass.input"/>
@@ -72,113 +120,53 @@
</else>
</if>
- <echo>* STAF configuration</echo>
- <input message=" Enter STAF version:"
- defaultvalue="${staf.version}"
- addproperty="staf.version.input"/>
- <input message=" Enter STAX version:"
- defaultvalue="${stax.version}"
- addproperty="stax.version.input"/>
- <input message=" Enter Email service version:"
- defaultvalue="${email.version}"
- addproperty="email.version.input"/>
- <input message=" Enter Event service version:"
- defaultvalue="${event.version}"
- addproperty="event.version.input"/>
- <input message=" Enter EventManager service version:"
- defaultvalue="${eventmanager.version}"
- addproperty="eventmanager.version.input"/>
- <input message=" Enter HTTP service version:"
- defaultvalue="${http.version}"
- addproperty="http.version.input"/>
- <input message=" Enter Tomcat service version:"
- defaultvalue="${tomcat.version}"
- addproperty="tomcat.version.input"/>
- <input message=" Enter hostname:"
- defaultvalue="${host.name}"
- addproperty="host.name.input"/>
- <input message=" Enter STAF port:"
- defaultvalue="${staf.port}"
- addproperty="staf.port.input"/>
-
- <echo>* Tests configuration</echo>
- <input message=" Enter Java home path:"
- defaultvalue="${java.path}"
- addproperty="java.path.input"/>
- <input message=" Enter OpenDS ldap port:"
- defaultvalue="${opends.port.ldap}"
- addproperty="opends.port.ldap.input"/>
- <input message=" Enter OpenDS secure ldap port:"
- defaultvalue="${opends.port.ldaps}"
- addproperty="opends.port.ldaps.input"/>
- <input message=" Enter OpenDS jmx port:"
- defaultvalue="${opends.port.jmx}"
- addproperty="opends.port.jmx.input"/>
- <input message=" Enter OpenDS admin DN (also called root DN):"
- defaultvalue="${opends.admin.dn}"
- addproperty="opends.admin.dn.input"/>
- <input message=" Enter OpenDS admin password:"
- defaultvalue="${opends.admin.pwd}"
- addproperty="opends.admin.pwd.input"/>
- <input message=" Enter OpenDMK lib directory:"
- defaultvalue="${snmp.opendmk.lib.dir}"
- addproperty="snmp.opendmk.lib.dir.input"/>
+ <echo>* Email configuration</echo>
<input message=" Send report email?"
defaultvalue="${email.enabled}"
- validargs="y,n"
+ validargs="true,false"
addproperty="email.enabled.input"/>
<if>
- <equals arg1="${email.enabled.input}" arg2="y"/>
+ <equals arg1="${email.enabled.input}" arg2="true"/>
<then>
- <input message=" Email will appear to be from:"
- defaultvalue="${email.from}"
- addproperty="email.from.input"/>
<input message=" Send email to:"
defaultvalue="${email.to}"
addproperty="email.to.input"/>
- <input message=" Enter SMTP server host:"
+ <input message=" Enter email server host:"
defaultvalue="${email.server.host}"
addproperty="email.server.host.input"/>
- <input message=" Enter SMTP server port:"
+ <input message=" Enter email server port:"
defaultvalue="${email.server.port}"
- addproperty="email.server.port.input"/>
- <input message=" Enter SMTP server user:"
- defaultvalue="${email.server.user}"
- addproperty="email.server.user.input"/>
- <input message=" Enter SMTP server password:"
- defaultvalue="${email.server.pwd}"
- addproperty="email.server.pwd.input"/>
+ addproperty="eemail.server.port.input"/>
</then>
<else>
- <property name="email.from.input" value="${email.from}"/>
<property name="email.to.input" value="${email.to}"/>
<property name="email.server.host.input" value="${email.server.host}"/>
<property name="email.server.port.input" value="${email.server.port}"/>
- <property name="email.server.user.input" value="${email.server.user}"/>
- <property name="email.server.pwd.input" value="${email.server.pwd}"/>
</else>
</if>
- <propertyselector property="input.list"
- delimiter=","
- match="(.*)\.input"
- select="\1"
- casesensitive="false"/>
-
<echo>Saving ...</echo>
<echo file="${basedir}/user.properties"># User-defined values
# This file is generated by "build user-configure" command
- </echo>
- <for list="${input.list}" param="item">
- <sequential>
- <var name="val" value="${@{item}.input}"/>
- <echo file="${basedir}/user.properties" append="true">
-@{item}=${val}</echo>
- </sequential>
- </for>
+repository.dir=${repository.dir.input}
+staf.default=${staf.default.input}
+staf.port=${staf.port.input}
+staf.version=${staf.version.input}
+stax.version=${stax.version.input}
+email.version=${email.version.input}
+event.version=${event.version.input}
+eventmanager.version=${eventmanager.version.input}
+http.version=${http.version.input}
+tomcat.version=${tomcat.version.input}
+proxy.enabled=${proxy.enabled.input}
+proxy.host=${proxy.host.input}
+proxy.port=${proxy.port.input}
+proxy.user=${proxy.user.input}
+proxy.pass=${proxy.pass.input}
+email.enabled=${email.enabled.input}
+email.to=${email.to.input}
+email.server.host=${email.server.host.input}
+email.server.port=${email.server.port.input}</echo>
</target>
- <target name="unconfigure">
- <delete file="${basedir}/user.properties"/>
- </target>
</project>
diff --git a/opends/tests/staf-tests/shared/functions/environment.xml b/opends/tests/staf-tests/shared/functions/environment.xml
index 4a6ed67..5d944f8 100755
--- a/opends/tests/staf-tests/shared/functions/environment.xml
+++ b/opends/tests/staf-tests/shared/functions/environment.xml
@@ -125,8 +125,8 @@
<function name="initialiseGlobalVariables">
<function-prolog>
- This function initialises a set of global variables.
- </function-prolog>
+ This function initialises a set of global variables.
+ </function-prolog>
<sequence>
@@ -170,10 +170,13 @@
# Replication configuration default names
MultimasterSync = 'Multimaster Synchronization'
- MultimasterType = 'multimaster'
+ MultimasterType = 'multimaster'
+
+ # Create staf objects
+ LOCAL_STAF_ROOT = test_env.staf(STAF_LOCAL_HOSTNAME).root
+ REMOTE_STAF_ROOT = test_env.staf(STAF_REMOTE_HOSTNAME).root
</script>
-
-
+
</sequence>
</function>
@@ -382,7 +385,7 @@
<function-prolog>
This function loads the environment (libraries, functions, variables)
needed by the global test job farmer.
- </function-prolog>
+ </function-prolog>
<sequence>
@@ -413,7 +416,6 @@
<!-- Set variables to build unique path to store data -->
<script>
# Private
- logsDate= '%s' % TESTS_RUN_TIME
logsArch=\
DSInfo.getServerArch(DSInfo.ServerDict['system os'])
logsOSName=\
@@ -425,7 +427,7 @@
<call function="'SetFolders'">
{ 'sourceDir' : '%s' % TESTS_ROOT,
- 'localDir' : '%s/%s/%s-jvm%s' % (LOGS_ROOT,logsDate,logsOS,logsJvm),
+ 'localDir' : '%s/%s-jvm%s' % (LOGS_ROOT,logsOS,logsJvm),
'remoteDir' : DIRECTORY_INSTANCE_DIR }
</call>
@@ -437,7 +439,21 @@
<!-- Create the local folders to store data -->
<call function="'CreateFolders'"/>
-
+
+ <!-- Create folders -->
+ <message>'Copy OpenDS css and png files under %s' % logs.reports</message>
+ <call function="'copyFile'">
+ {
+ 'srcfile' : '%s/opends.css' % TESTS_RESOURCE_DIR,
+ 'destfile' : '%s/opends.css' % logs.reports
+ }
+ </call>
+ <call function="'copyFile'">
+ {
+ 'srcfile' : '%s/opends_logo_sm.png' % TESTS_RESOURCE_DIR,
+ 'destfile' : '%s/opends_logo_sm.png' % logs.reports
+ }
+ </call>
</sequence>
</function>
diff --git a/opends/tests/staf-tests/shared/functions/snmp.xml b/opends/tests/staf-tests/shared/functions/snmp.xml
index 38322e7..1f6da42 100755
--- a/opends/tests/staf-tests/shared/functions/snmp.xml
+++ b/opends/tests/staf-tests/shared/functions/snmp.xml
@@ -23,7 +23,7 @@
!
! CDDL HEADER END
!
- ! Copyright 2008 Sun Microsystems, Inc.
+ ! Copyright 2008-2009 Sun Microsystems, Inc.
! -->
<stax>
<!-- SNMP Get -->
@@ -177,7 +177,7 @@
cp = 'CLASSPATH=%s%s%s%s.' \
% (opends_jarfile,separator,jdmk_jarfile,separator)
- env = ['JAVA_HOME=%s' % JAVA_HOME, '%s' % cp]
+ env = ['%s' % cp]
</script>
<message>
@@ -345,7 +345,7 @@
cp = 'CLASSPATH=%s%s%s%s.' \
% (opends_jarfile,separator,jdmk_jarfile,separator)
- env = ['JAVA_HOME=%s' % JAVA_HOME, '%s' % cp]
+ env = ['%s' % cp]
</script>
<message>
@@ -422,21 +422,20 @@
</function-arg-description>
<function-arg-property name="type" value="integer"/>
</function-arg-def>
+ <function-arg-def name="knownIssue" type="optional" default="None">
+ <function-arg-description>
+ Known issue. Corresponds to an issue number.
+ </function-arg-description>
+ <function-arg-property name="type" value="string" />
+ </function-arg-def>
</function-map-args>
<sequence>
- <call function="'ResolveVar'" >
- {
- 'location' : location ,
- 'type' : 'STRING',
- 'name' : 'STAF/Config/STAFRoot'
- }
- </call>
<script>
if is_windows_platform(location):
- jstaf_jarfile='%s\\bin\\JSTAF.jar' % STAFResult
+ jstaf_jarfile='%s\\bin\\JSTAF.jar' % REMOTE_STAF_ROOT
else:
- jstaf_jarfile='%s/lib/JSTAF.jar' % STAFResult
+ jstaf_jarfile='%s/lib/JSTAF.jar' % REMOTE_STAF_ROOT
</script>
<!-- Build the command -->
@@ -465,13 +464,12 @@
else:
separator=':'
- opends_jarfile='%s/%s' % (DIRECTORY_INSTANCE_BIN,SNMP_OPENDS_JARFILE)
snmpPath='%s/snmp' % remote.java
jdmk_jarfile='%s/jdmkrt.jar' % snmpPath
- cp = 'CLASSPATH=%s%s%s%s%s%s.' \
- % (opends_jarfile,separator,jdmk_jarfile,separator,jstaf_jarfile,separator)
+ cp = 'CLASSPATH=%s%s%s%s.' \
+ % (jdmk_jarfile,separator,jstaf_jarfile,separator)
- env = ['JAVA_HOME=%s' % JAVA_HOME, '%s' % cp]
+ env = ['%s' % cp]
</script>
<message>
@@ -487,7 +485,8 @@
'path' : snmpPath ,
'envCmd' : env ,
'outputFile' : outputFile ,
- 'expectedRC' : expectedRC
+ 'expectedRC' : expectedRC ,
+ 'knownIssue' : knownIssue
}
</call>
diff --git a/opends/tests/staf-tests/shared/functions/topology.xml b/opends/tests/staf-tests/shared/functions/topology.xml
index 4836da6..aa0b3c2 100755
--- a/opends/tests/staf-tests/shared/functions/topology.xml
+++ b/opends/tests/staf-tests/shared/functions/topology.xml
@@ -23,7 +23,7 @@
!
! CDDL HEADER END
!
- ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Copyright 2007-2009 Sun Microsystems, Inc.
! -->
<stax>
<function name="createTopology">
@@ -335,16 +335,16 @@
'extension' : 'java'
}
</call>
-
- <!-- Check if 'SNMP_OPENDMK_LIBDIR' exists -->
+
+ <!-- Check if 'SNMP_OPENDMK_JARFILE' exists -->
<call function="'GetEntry'">
{
'location' : STAXServiceMachine,
- 'entry' : SNMP_OPENDMK_LIBDIR,
+ 'entry' : SNMP_OPENDMK_JARFILE,
'attribute' : 'TYPE'
}
</call>
- <!-- 'SNMP_OPENDMK_LIBDIR' exists so we can continue with SNMP -->
+ <!-- 'SNMP_OPENDMK_JARFILE' exists so we can continue with SNMP -->
<if expr="RC != 48">
<sequence>
<!--- Check if snmp java files are already compiled -->
@@ -381,19 +381,12 @@
'unzipdir' : TMPDIR
}
</call>
-
- <call function="'ResolveVar'" >
- {
- 'location' : STAXServiceMachine,
- 'type' : 'STRING',
- 'name' : 'STAF/Config/STAFRoot'
- }
- </call>
+
<script>
if is_windows_platform(STAXServiceMachine):
- jstaf_jarfile='%s\\bin\\JSTAF.jar' % STAFResult
+ jstaf_jarfile='%s\\bin\\JSTAF.jar' % LOCAL_STAF_ROOT
else:
- jstaf_jarfile='%s/lib/JSTAF.jar' % STAFResult
+ jstaf_jarfile='%s/lib/JSTAF.jar' % LOCAL_STAF_ROOT
</script>
<!--- In IPS mode, get snmp-mib2605.jar from remote machine-->
diff --git a/opends/tests/staf-tests/shared/functions/utils.xml b/opends/tests/staf-tests/shared/functions/utils.xml
index b7253ff..f86014b 100755
--- a/opends/tests/staf-tests/shared/functions/utils.xml
+++ b/opends/tests/staf-tests/shared/functions/utils.xml
@@ -23,7 +23,7 @@
!
! CDDL HEADER END
!
- ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Copyright 2007-2009 Sun Microsystems, Inc.
! -->
<stax>
<function name="checkRC">
@@ -1750,7 +1750,7 @@
Which machine should the command be executed on
</function-arg-description>
</function-arg-def>
- <function-arg-def name="name"
+ <function-arg-def name="name"
default="'Running %s' % command"
type="optional">
<function-arg-description>
@@ -1826,7 +1826,7 @@
for item in envCmd:
env.append('%s' % item)
if is_windows_platform(location):
- env.append('PATH=C:\Windows;C:\Windows\system32;%s' % path)
+ env.append('PATH=%s\\bin;C:\\Windows;C:\\Windows\\system32;%s' % (REMOTE_STAF_ROOT,path))
env.append('JAVA_HOME=%s' % JAVA_HOME)
else:
env.append('PATH=/bin:/usr/bin:%s' % path)
@@ -1971,7 +1971,7 @@
_cmd = 'tskill'
_args = STAXResult
else:
- _cmd = 'kill'
+ _cmd = '/bin/kill'
pid = STAXResult[:-1]
_args = '-9 %s' % pid
</script>
diff --git a/opends/tests/staf-tests/shared/functions/webcontainer.xml b/opends/tests/staf-tests/shared/functions/webcontainer.xml
index eed4bd4..104c05e 100755
--- a/opends/tests/staf-tests/shared/functions/webcontainer.xml
+++ b/opends/tests/staf-tests/shared/functions/webcontainer.xml
@@ -23,7 +23,7 @@
!
! CDDL HEADER END
!
- ! Portions Copyright 2008 Sun Microsystems, Inc.
+ ! Portions Copyright 2008-2009 Sun Microsystems, Inc.
! -->
<stax>
@@ -101,19 +101,12 @@
</process>
<!-- generate SSL certificate -->
- <stafcmd>
- <location>STAXServiceMachine</location>
- <service>'var'</service>
- <request>'resolve string {STAF/Config/STAFRoot}'</request>
- </stafcmd>
-
- <script>stafRoot=STAFResult</script>
<!-- Check if 'tomcatCertificate' file exists -->
<call function="'GetEntry'">
{
'location' : STAXServiceMachine,
- 'entry' : '%s/services/DSML/tomcatCertificate' % stafRoot,
+ 'entry' : '%s/services/DSML/tomcatCertificate' % LOCAL_STAF_ROOT,
'attribute' : 'TYPE'
}
</call>
@@ -127,7 +120,7 @@
-dname "cn=tomcat,O=Sun Microsystems,C=US" \
-keystore "%s/services/DSML/tomcatCertificate" \
-storepass "changeit" -keypass "changeit" \
- -storetype JKS ' % (stafRoot),
+ -storetype JKS ' % (LOCAL_STAF_ROOT),
'path' : '%s/bin' % (LOCAL_JAVA_HOME),
'expectedRC': 0
}
@@ -136,7 +129,7 @@
<call function="'copyFile'">
{ 'location' : STAXServiceMachine,
- 'srcfile' : '%s/services/DSML/tomcatCertificate' % (stafRoot),
+ 'srcfile' : '%s/services/DSML/tomcatCertificate' % (LOCAL_STAF_ROOT),
'destfile' : '%s/%s-%s/conf/tomcatCertificate' % (wcPath, WC_TYPE, WC_VERSION),
'remotehost' : mylocation
}
diff --git a/opends/tests/staf-tests/shared/resource/opends.css b/opends/tests/staf-tests/shared/resource/opends.css
new file mode 100644
index 0000000..2e39508
--- /dev/null
+++ b/opends/tests/staf-tests/shared/resource/opends.css
@@ -0,0 +1,98 @@
+
+/* Our content renders in a div with id bodycol, so selectors are written on this to override the default styles in the inherited style sheets */
+#bodycol { font-size: 12px;}
+#bodycol table, #bodycol td, #bodycol th, #bodycol p, #bodycol div, #bodycol span, #bodycol li { font-size: 12px}
+#bodycol H1 {font-size:18px;color:#000}
+#bodycol H2 {font-size:16px;color:#000}
+#bodycol H3 {font-size:14px;color:#000;margin:15px 0px 3px;}
+#bodycol a:link {text-decoration:none !important }
+#bodycol a:visited {color: #069;text-decoration:none !important }
+#bodycol a:hover {text-decoration:underline; !important }
+#bodycol a:hover img {text-decoration:none !important}
+
+/* Table Style */
+#bodycol .info-table {border:solid 1px #000; border-collapse:collapse; font-size:12px; margin-top:10px;}
+#bodycol .info-table th {border: solid 1px #B5B5B5;padding:5px 10px;background-color:#EEEEEE;font-weight:bold;text-align:left;vertical-align:bottom; font-size:12px}
+#bodycol .info-table th.th-center { border: solid 1px #B5B5B5;padding:5px 10px;background-color:#EEEEEE;font-weight:bold;text-align:center;vertical-align:bottom; font-size:12px}
+#bodycol .info-table th.th-right {border: solid 1px #B5B5B5;padding:5px 10px;background-color:#EEEEEE;font-weight:bold;text-align:right;vertical-align:bottom; font-size:12px}
+#bodycol .info-table td {border: solid 1px #B5B5B5;padding:10px;vertical-align:top; font-size:12px}
+#bodycol .info-table td.td-center {border: solid 1px #B5B5B5;padding:10px;vertical-align:top; text-align:center; font-size:12px}
+
+/* Styles for Header Used in About, Community, Downloads and Contrib pages*/
+#bodycol .secmasttable {margin-top:10px;}
+#bodycol .secmasttable td { vertical-align:bottom }
+#bodycol .headlink { font-size:11px; margin:0px 5px; text-align:center }
+#bodycol .curheadlink { font-size:12px; font-weight:bold; margin:0px 5px; }
+#bodycol .highlightsdiv {border: 1px solid rgb(170, 170, 170); padding: 5px; background: rgb(238, 238, 238); margin:10px}
+#bodycol .highlightsheader {font-size:14px; font-weight:bold; }
+#bodycol .secpageheader {font-size:18px; font-weight:bold;margin:15px 0px; }
+
+/* Styles for Header Used in Individual Documents pages*/
+#bodycol .tertmasttable {margin-top:10px;}
+#bodycol .tertmasttable td { vertical-align:bottom }
+#bodycol .collectionheader {margin-bottom:5px;font-size:24px;color:#333; }
+
+/* Welcome Page */
+table.welcometable { }
+table.welcometable td.welcomelogo {text-align:left; vertical-align:middle; width:180px;padding:10px 0px 6px}
+table.welcometable td.welcometag {text-align: center; vertical-align:middle; padding:5px 10px; width:370px; background-color:#f5f5f5}
+table.welcometable td.welcomejavanet {text-align:left; vertical-align:middle; padding:10px; width:180px; background-color:#f5994f}
+table.welcometable td.welcomenarrowside {text-align:left; vertical-align:top; padding:5px 10px; width:180px; background-color:#BFEAFF}
+table.welcometable td.welcomeimage {text-align:left;vertical-align:middle; padding:0px; width:370px}
+table.welcometable td.welcomenarrowbot {text-align:left; vertical-align:top; padding:5px 10px; width:180px; background-color:#f5f5f5}
+.welcometagline {font-size:14px; font-weight:bold; color:#f5994f}
+.narrowbothead {font-weight:bold; margin:5px 0px 3px}
+.narrowbotitem {margin: 1px 0px 1px 10px}
+.dkgrey {color:#333}
+a.white {color:#fff !important}
+
+#bodycol a.buttonlink:link {padding:3px 12px 2px; background-image:url(../images/buttonlink_bk.png); background-position:bottom; background-repeat: repeat-x;background-color:#FFFFFF; border:solid 2px #008fcd; color:#000 !important; white-space:nowrap;text-decoration:none }
+#bodycol a.buttonlink:hover {padding:3px 12px 2px; background-image:url(../images/buttonlink_bk_over.png); background-position:bottom; background-repeat: repeat-x;background-color:#FFFFFF; border:solid 2px #008fcd; color:#000 !important; text-decoration:none !important}
+#bodycol a.buttonlink:active {padding:3px 12px 2px; background-image:url(../images/buttonlink_bk.png); background-position:bottom; background-repeat: repeat-x;background-color:#FFFFFF; border:solid 2px #008fcd; color:#000 !important; }
+#bodycol a.buttonlink:visited {padding:3px 12px 2px; background-image:url(../images/buttonlink_bk.png); background-position:bottom; background-repeat: repeat-x;background-color:#FFFFFF; border:solid 2px #008fcd; color:#000 !important; }
+#bodycol div.buttonlinkdiv {margin:10px 5px 15px 50px}
+
+.app H3 { clear: none;}
+.axial {display: none;}
+#apphead {display: none;}
+#subprojects {display: none;}
+
+
+
+/* STYLES REPEATED WITHOUT SELECTOR FOR NONAV BROWSING */
+ body, table, td, th, p, div, span, li { font-size: 12px}
+ H1 {font-size:18px;color:#000}
+ H2 {font-size:16px;color:#000}
+ H3 {font-size:14px;color:#000;margin:15px 0px 3px;}
+ a:link {text-decoration:none }
+ a:visited {color: #069;text-decoration:none }
+ a:hover {text-decoration:underline }
+ a:hover img {text-decoration:none }
+/* Table Style */
+ .info-table {border:solid 1px #000; border-collapse:collapse; font-size:12px; margin-top:10px;}
+ .info-table th {border: solid 1px #B5B5B5;padding:5px 10px;background-color:#EEEEEE;font-weight:bold;text-align:left;vertical-align:bottom; font-size:12px}
+ .info-table th.th-center { border: solid 1px #B5B5B5;padding:5px 10px;background-color:#EEEEEE;font-weight:bold;text-align:center;vertical-align:bottom; font-size:12px}
+ .info-table th.th-right {border: solid 1px #B5B5B5;padding:5px 10px;background-color:#EEEEEE;font-weight:bold;text-align:right;vertical-align:bottom; font-size:12px}
+ .info-table td {border: solid 1px #B5B5B5;padding:10px;vertical-align:top; font-size:12px}
+ .info-table td.td-center {border: solid 1px #B5B5B5;padding:10px;vertical-align:top; text-align:center; font-size:12px}
+/* Styles for Header Used in About, Community, Downloads and Contrib pages*/
+ .secmasttable {margin-top:10px;}
+ .secmasttable td { vertical-align:bottom }
+ .headlink { font-size:11px; margin:0px 5px; text-align:center }
+ .curheadlink { font-size:12px; font-weight:bold; margin:0px 5px; }
+ .highlightsdiv {border: 1px solid rgb(170, 170, 170); padding: 5px; background: rgb(238, 238, 238); margin:10px}
+ .highlightsheader {font-size:14px; font-weight:bold; }
+ .secpageheader {font-size:18px; font-weight:bold;margin:15px 0px; }
+/* Styles for Header Used in Individual Documents pages*/
+ .tertmasttable {margin-top:10px;}
+ .tertmasttable td { vertical-align:bottom }
+ .collectionheader {margin-bottom:5px;font-size:24px;color:#333; }
+
+/* Replace tigris css spec overridden by the above */
+ #navcol li, #navcol a, #navcol dd, #navcol dt, #navcol, #footer table, #footer td, #footer a, #footer p {
+ font-family: Verdana, Helvetica, Arial, sans-serif;
+ font-size: xx-small;
+ voice-family: "\"}\"";
+ voice-family: inherit;
+ font-size: x-small;
+}
\ No newline at end of file
diff --git a/opends/tests/staf-tests/shared/resource/opends_logo_sm.png b/opends/tests/staf-tests/shared/resource/opends_logo_sm.png
new file mode 100644
index 0000000..1b7aab5
--- /dev/null
+++ b/opends/tests/staf-tests/shared/resource/opends_logo_sm.png
Binary files differ
diff --git a/opends/tests/staf-tests/shared/staf/staf-controler.cfg b/opends/tests/staf-tests/shared/staf/staf-controller.cfg
similarity index 68%
rename from opends/tests/staf-tests/shared/staf/staf-controler.cfg
rename to opends/tests/staf-tests/shared/staf/staf-controller.cfg
index a04b6fd..6543759 100644
--- a/opends/tests/staf-tests/shared/staf/staf-controler.cfg
+++ b/opends/tests/staf-tests/shared/staf/staf-controller.cfg
@@ -21,7 +21,7 @@
# CDDL HEADER END
#
#
-# Copyright 2007-2008 Sun Microsystems, Inc.
+# Copyright 2007-2009 Sun Microsystems, Inc.
# Turn on tracing of internal errors and deprecated options
trace enable tracepoints "error deprecated"
@@ -45,49 +45,40 @@
# ZIP SERVICE CONFIGURATION
SERVICE Zip LIBRARY STAFZip
+# STAX SERVICE CONFIGURATION
+SERVICE Stax LIBRARY JSTAF \
+ EXECUTE {STAF/Config/STAFRoot}/services/stax/STAX.jar \
+ OPTION J2="-Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -XX:NewSize=500m -XX:MaxNewSize=500m -XX:SurvivorRatio=6 -XX:PermSize=256m -XX:MaxPermSize=256m -Xoss1m -Xss1m" \
+ OPTION JVM=${local.javahome}/bin/java
+
# EVENT SERVICE CONFIGURATION
-# PARMS "MAXATTEMPTS 5 ACKNOWLEDGETIMEOUT 30000" \
-# OPTION JVMName=EventJVM \
-# OPTION JVM=${java.home}${file.separator}bin${file.separator}java${binary.extension}
SERVICE Event LIBRARY JSTAF \
EXECUTE {STAF/Config/STAFRoot}/services/event/STAFEvent.jar
# EVENTMANAGER SERVICE CONFIGURATION
-# OPTION JVMName=EventManagerJVM \
-# OPTION JVM=${java.home}${file.separator}bin${file.separator}java${binary.extension}
-# PARMS "EVENTSERVICENAME=Event" \
SERVICE EventManager LIBRARY JSTAF \
EXECUTE {STAF/Config/STAFRoot}/services/eventmanager/STAFEventManager.jar
-# STAX SERVICE CONFIGURATION
-# OPTION JVMName=StaxJVM \
-SERVICE Stax LIBRARY JSTAF \
- EXECUTE {STAF/Config/STAFRoot}/services/stax/STAX.jar
-# EXECUTE {STAF/Config/STAFRoot}/services/stax/STAX.jar \
-# OPTION JVMName=STAXJVM \
-# OPTION J2=-Xoss1m -Xss1m -Xmx384m
-
-#EMAIL SERVICE CONFIGURATION
-# OPTION JVMName=EmailJVM \
-# OPTION JVM=${java.home}${file.separator}bin${file.separator}java${binary.extension}
+# EMAIL SERVICE CONFIGURATION
SERVICE Email LIBRARY JSTAF \
EXECUTE {STAF/Config/STAFRoot}/services/email/STAFEmail.jar \
PARMS "MAILSERVER ${email.server.host} PORT ${email.server.port}"
SET MAXQUEUESIZE 10000
-#HTTP SERVICE CONFIGURATION
+# HTTP SERVICE CONFIGURATION
SERVICE Http LIBRARY JSTAF \
EXECUTE {STAF/Config/STAFRoot}/services/http/STAFHTTP.jar \
OPTION JVMNAME=httpJVM \
OPTION J2=-Xmx128m -Xms32m \
-Djavax.net.ssl.trustStorePassword=changeit \
- -Djavax.net.ssl.trustStore={STAF/Config/STAFRoot}/services/DSML/tomcatCertificate
+ -Djavax.net.ssl.trustStore={STAF/Config/STAFRoot}/services/DSML/tomcatCertificate \
+ OPTION JVM=${local.javahome}/bin/java
-#DSML SERVICE CONFIGURATION
-#uncomment following if you want it to be in separate JVMs
-SERVICE DSML LIBRARY JSTAF \
- EXECUTE {STAF/Config/STAFRoot}/services/dsml/dsmlService.jar \
- OPTION JVMNAME=dsmlJVM \
+# DSML SERVICE CONFIGURATION
+SERVICE Dsml LIBRARY JSTAF \
+ EXECUTE {STAF/Config/STAFRoot}/services/dsml/dsmlService.jar \
+ OPTION JVMNAME=dsmlJVM \
OPTION J2=-Xmx512m -Xms128m \
- OPTION JVM=/usr/bin/java
+ OPTION JVM=${local.javahome}/bin/java
+
diff --git a/opends/tests/staf-tests/shared/tests/config.py.stubs b/opends/tests/staf-tests/shared/tests/config.py.stubs
index bd072b9..7467c2c 100644
--- a/opends/tests/staf-tests/shared/tests/config.py.stubs
+++ b/opends/tests/staf-tests/shared/tests/config.py.stubs
@@ -23,54 +23,55 @@
#
# Copyright 2007-2009 Sun Microsystems, Inc.
-TEST_OS_STRING = '${os.name}'
-TEST_JVM_STRING = '${java.version}(${sun.arch.data.model} bits)'
-STAF_LOCAL_HOSTNAME = 'localhost'
-STAF_REMOTE_HOSTNAME = 'localhost'
-TMPDIR = '${tests.tmp.dir}'
-PSWDFILE = '%s/password' % TMPDIR
-OPENDSDIR = '${project.home}'
-OPENDSNAME = '${product.name}'
-ZIPNAME = '${product.name}.zip'
-ZIPPATH = '${opends.dir}'
-TESTS_RUN_TIME = '${tests.run.time}'
-TESTS_TYPE = '${tests.type}'
-TESTS_ROOT = '%s/tests/staf-tests' % OPENDSDIR
-TESTS_DIR = '%s/%s' % (TESTS_ROOT, TESTS_TYPE)
-TESTS_SHARED_DIR = '%s/shared' % TESTS_DIR
-TESTS_FUNCTIONS_DIR = '%s/shared/functions' % TESTS_ROOT
-TESTS_JAVA_DIR = '%s/shared/java' % TESTS_ROOT
-TESTS_TOPOLOGY_DIR = '%s/shared/topology' % TESTS_ROOT
-TESTS_XSL_DIR = '%s/shared/xsl' % TESTS_ROOT
-DIRECTORY_INSTANCE_DN = '${opends.admin.dn}'
-DIRECTORY_INSTANCE_PSWD = '${opends.admin.pwd}'
-DIRECTORY_INSTANCE_BIN = '%s' % TMPDIR
-DIRECTORY_INSTANCE_DIR = '%s' % TMPDIR
-DIRECTORY_INSTANCE_HOST = 'localhost'
-DIRECTORY_INSTANCE_PORT = '${opends.port.ldap}'
-DIRECTORY_INSTANCE_ADMIN_PORT = '4444'
-DIRECTORY_INSTANCE_SSL_PORT = '${opends.port.ldaps}'
-DIRECTORY_INSTANCE_SFX = 'dc=com'
-DIRECTORY_INSTANCE_BE = 'userRoot'
-JAVA_HOME = '${java.path}'
-LOCAL_JAVA_HOME = '${java.path}'
-LOGS_ROOT = '%s' % TMPDIR
-LOGS_URI = ''
-SEND_MAIL_AFTER_TEST_RUN = '${staf.email.send}'
-SEND_MAIL_TO = '${staf.email.to}'
-WC_TYPE = 'apache-tomcat'
-WC_VERSION = '6.0.14'
-WC_ZIPPATH = '${archives.dir}'
-WC_ZIPNAME = '%s-%s.zip' % (WC_TYPE, WC_VERSION)
-WC_DIRECTORY = '%s' % TMPDIR
-WC_PORT = '9000'
-WC_SSL_PORT = '9001'
-WC_HOST = 'localhost'
-DSML_WARNAME = '%s-DSML.war' % OPENDSNAME
-DSML_WARPATH = '%s/build/package/%s' % (OPENDSDIR, DSML_WARNAME)
-SNMP_OPENDS_JARFILE = '%s/lib/extensions/snmp-mib2605.jar' % OPENDSNAME
-SNMP_OPENDMK_LIBDIR = '/path/to/opendmk/lib'
-SNMP_OPENDMK_JARFILE = '%s/jdmkrt.jar' % SNMP_OPENDMK_LIBDIR
-SNMP_PORT = '8085'
-SNMP_TRAP_PORT = '8086'
-VERBOSE_MODE = 'False'
+TEST_OS_STRING = '${tests.os.string}'
+TEST_JVM_STRING = '${tests.jvm.string}'
+STAF_LOCAL_HOSTNAME = '${local.hostname}'
+STAF_REMOTE_HOSTNAME = '${remote.hostname}'
+TMPDIR = '/tmp'
+OPENDSNAME = '${opends.name}'
+ZIPNAME = '${opends.name}.zip'
+ZIPPATH = '${opends.dir}'
+TESTS_TYPE = '${tests.type}'
+TESTS_ROOT = '${basedir}'
+TESTS_DIR = '${tests.dir}'
+TESTS_SHARED_DIR = '${tests.dir}/shared'
+TESTS_FUNCTIONS_DIR = '${shared.dir}/functions'
+TESTS_JAVA_DIR = '${shared.dir}/java'
+TESTS_TOPOLOGY_DIR = '${shared.dir}/topology'
+TESTS_XSL_DIR = '${shared.dir}/xsl'
+TESTS_RESOURCE_DIR = '${shared.dir}/resource'
+DIRECTORY_INSTANCE_DN = '${opends.admin.dn}'
+DIRECTORY_INSTANCE_PSWD = '${opends.admin.pwd}'
+DIRECTORY_INSTANCE_BIN = '${tests.tmp.dir}'
+DIRECTORY_INSTANCE_DIR = '${tests.tmp.dir}'
+DIRECTORY_INSTANCE_HOST = '${remote.hostname}'
+DIRECTORY_INSTANCE_PORT = '${opends.port.ldap}'
+DIRECTORY_INSTANCE_ADMIN_PORT = '${opends.port.admin}'
+DIRECTORY_INSTANCE_SSL_PORT = '${opends.port.ldaps}'
+DIRECTORY_INSTANCE_SFX = 'dc=com'
+DIRECTORY_INSTANCE_BE = 'userRoot'
+REPLICATION_CONFIG_DIR = '${tests.run.dir}/${tests.run.time}/config'
+JAVA_HOME = '${remote.javahome}'
+LOCAL_JAVA_HOME = '${local.javahome}'
+LOGS_ROOT = '${tests.run.dir}/${tests.run.time}'
+LOGS_URI = '${logs.uri}'
+SEND_MAIL_AFTER_TEST_RUN = '${email.enabled}'
+SEND_MAIL_TO = '${email.to}'
+SEND_MAIL_SUBJECT = '${email.subject}'
+WC_TYPE = 'apache-tomcat'
+WC_VERSION = '${tomcat.version}'
+WC_ZIPPATH = '${archives.dir}'
+WC_ZIPNAME = '${tomcat.archive}'
+WC_DIRECTORY = '${tests.tmp.dir}'
+WC_PORT = '9000'
+WC_SSL_PORT = '9001'
+WC_HOST = '${remote.hostname}'
+DSML_WARNAME = '${opends.name}-DSML.war'
+DSML_WARPATH = '${opends.dir}/build/package/${opends.name}-DSML.war'
+SNMP_OPENDS_JARFILE = '${opends.name}/lib/extensions/snmp-mib2605.jar'
+SNMP_OPENDMK_LIBDIR = '${snmp.opendmk.lib.dir}'
+SNMP_OPENDMK_JARFILE = '${snmp.opendmk.lib.dir}/jdmkrt.jar'
+SNMP_PORT = '8085'
+SNMP_TRAP_PORT = '8086'
+VERBOSE_MODE = '${verbose.mode}'
+TEST_PLAN_CUSTOM = '${test.plan.custom}'
diff --git a/opends/tests/staf-tests/shared/tests/runTestJob.xml b/opends/tests/staf-tests/shared/tests/runTestJob.xml
index 3aa9856..00ca828 100644
--- a/opends/tests/staf-tests/shared/tests/runTestJob.xml
+++ b/opends/tests/staf-tests/shared/tests/runTestJob.xml
@@ -563,7 +563,7 @@
testwareElementList=[]
testwareElementList.append(['hostname',STAF_REMOTE_HOSTNAME])
testwareElementList.append(['version',remotestaf.version])
- testwareElementList.append(['version',remotestaf.root])
+ testwareElementList.append(['rootdir',remotestaf.root])
write_text_elements(remote,testwareElementList)
@@ -866,7 +866,7 @@
</script>
<message>_message</message>
- <if expr="SEND_MAIL_AFTER_TEST_RUN == 'TRUE'">
+ <if expr="SEND_MAIL_AFTER_TEST_RUN == 'true'">
<sequence>
<message>
'Sending Email Test Report to %s.' % SEND_MAIL_TO
@@ -926,6 +926,67 @@
</if>
</sequence>
</if>
+
+ <!-- Saving Staf/Stax logs -->
+ <message>'Saving staf logs'</message>
+
+ <call function="'ResolveVar'" >
+ {
+ 'location' : STAF_LOCAL_HOSTNAME ,
+ 'type' : 'STRING',
+ 'name' : 'STAF/Config/STAFRoot'
+ }
+ </call>
+ <if expr="RC != 0">
+ <script>
+ STAFResult = '{}'
+ </script>
+ <else>
+ <script>
+ STAFRoot = STAFResult
+ </script>
+ </else>
+ </if>
+
+ <script>
+ listOfChildren2 = listOfChildren
+ listOfChildren2.append(STAXJobID)
+ listOfChildren2.append(STAXSubJobID)
+ </script>
+ <iterate var="thisChild" in="listOfChildren2">
+ <sequence>
+ <script>
+ srcFile = '%s/logs/MACHINE/%s/GLOBAL/STAX_Job_%s.log' \
+ % (STAFRoot,STAF_LOCAL_HOSTNAME,thisChild)
+ destFile = '%s/staf-logs/STAX_Job_%s.log' \
+ % (LOGS_ROOT,thisChild)
+ </script>
+ <process name="'Saving job logs.....'">
+ <location>STAF_LOCAL_HOSTNAME</location>
+ <command mode="'shell'">'%s/bin/fmtlog' % STAFRoot</command>
+ <parms>'FORMAT LOGFILE %s NEWFILE %s' % (srcFile,destFile)</parms>
+ <envs>'%s/lib' % STAFRoot</envs>
+ <stderr mode="'stdout'"/>
+ <returnstdout/>
+ </process>
+
+ <script>
+ srcFile = '%s/logs/MACHINE/%s/GLOBAL/STAX_Job_%s_User.log' \
+ % (STAFRoot,STAF_LOCAL_HOSTNAME,thisChild)
+ destFile = '%s/staf-logs/STAX_Job_%s_User.log' \
+ % (LOGS_ROOT,thisChild)
+ </script>
+ <process name="'Saving job user logs.....'">
+ <location>STAF_LOCAL_HOSTNAME</location>
+ <command mode="'shell'">'%s/bin/fmtlog' % STAFRoot</command>
+ <parms>'FORMAT LOGFILE %s NEWFILE %s' % (srcFile,destFile)</parms>
+ <envs>'%s/lib' % STAFRoot</envs>
+ <stderr mode="'stdout'"/>
+ <returnstdout/>
+ </process>
+ </sequence>
+ </iterate>
+
</sequence>
</function>
diff --git a/opends/tests/staf-tests/shared/tests/runTests.xml b/opends/tests/staf-tests/shared/tests/runTests.xml
index 22ae990..b85c85a 100755
--- a/opends/tests/staf-tests/shared/tests/runTests.xml
+++ b/opends/tests/staf-tests/shared/tests/runTests.xml
@@ -52,20 +52,9 @@
testlog.write(' <results>\n')
testlog.close()
- groupsFileName='%s/testcases/run-custom-suites.dat' % TESTS_DIR
-
- if not os.path.exists(groupsFileName):
- groupsFileName='%s/testcases/run-default-suites.dat' % TESTS_DIR
-
- f = open(groupsFileName, 'r')
groupsToRun = []
- for line in f.readlines():
-
- if line.startswith('#'):
- continue
- else:
- groupsToRun.append(groupToRun(line.rstrip()))
- f.close()
+ for line in TEST_PLAN_CUSTOM.split(","):
+ groupsToRun.append(groupToRun(line.rstrip()))
</script>
<!-- TODO: If no groupsToRun then iterate will throw exception -->
diff --git a/opends/tests/staf-tests/shared/topology/3server_topology.txt b/opends/tests/staf-tests/shared/topology/3server_topology.txt
index c801d50..bf31334 100644
--- a/opends/tests/staf-tests/shared/topology/3server_topology.txt
+++ b/opends/tests/staf-tests/shared/topology/3server_topology.txt
@@ -21,10 +21,10 @@
# CDDL HEADER END
#
#
-# Copyright 2007-2008 Sun Microsystems, Inc.
+# Copyright 2007-2009 Sun Microsystems, Inc.
#
-Hostname: localhost
-Directory: /var/tmp/opends-synchro-tests/server1
+Hostname: ${remote.hostname}
+Directory: ${tests.tmp.dir}/opends-synchro-tests/server1
Port: 11389
Adminport: 11444
Sslport: 11636
@@ -34,12 +34,12 @@
BaseDn: o=example
Changelogport: 11111
SynchronizedSuffix: o=example
-ChangelogServer: localhost:11111
-ChangelogServer: localhost:22222
-ChangelogServer: localhost:33333
+ChangelogServer: ${remote.hostname}:11111
+ChangelogServer: ${remote.hostname}:22222
+ChangelogServer: ${remote.hostname}:33333
-Hostname: localhost
-Directory: /var/tmp/opends-synchro-tests/server2
+Hostname: ${remote.hostname}
+Directory: ${tests.tmp.dir}/opends-synchro-tests/server2
Port: 22389
Adminport: 22444
Sslport: 22636
@@ -49,12 +49,12 @@
BaseDn: o=example
Changelogport: 22222
SynchronizedSuffix: o=example
-ChangelogServer: localhost:11111
-ChangelogServer: localhost:22222
-ChangelogServer: localhost:33333
+ChangelogServer: ${remote.hostname}:11111
+ChangelogServer: ${remote.hostname}:22222
+ChangelogServer: ${remote.hostname}:33333
-Hostname: localhost
-Directory: /var/tmp/opends-synchro-tests/server3
+Hostname: ${remote.hostname}
+Directory: ${tests.tmp.dir}/opends-synchro-tests/server3
Port: 33389
Adminport: 33444
Sslport: 33636
@@ -64,6 +64,6 @@
BaseDn: o=example
Changelogport: 33333
SynchronizedSuffix: o=example
-ChangelogServer: localhost:11111
-ChangelogServer: localhost:22222
-ChangelogServer: localhost:33333
+ChangelogServer: ${remote.hostname}:11111
+ChangelogServer: ${remote.hostname}:22222
+ChangelogServer: ${remote.hostname}:33333
diff --git a/opends/tests/staf-tests/shared/topology/basic_topology.txt b/opends/tests/staf-tests/shared/topology/basic_topology.txt
index 11301dd..5618650 100644
--- a/opends/tests/staf-tests/shared/topology/basic_topology.txt
+++ b/opends/tests/staf-tests/shared/topology/basic_topology.txt
@@ -21,10 +21,10 @@
# CDDL HEADER END
#
#
-# Copyright 2007-2008 Sun Microsystems, Inc.
+# Copyright 2007-2009 Sun Microsystems, Inc.
#
-Hostname: localhost
-Directory: /var/tmp/opends-synchro-tests/server1
+Hostname: ${remote.hostname}
+Directory: ${tests.tmp.dir}/opends-synchro-tests/server1
Port: 11389
Adminport: 11444
Sslport: 11636
@@ -34,11 +34,11 @@
BaseDn: o=example
Changelogport: 11111
SynchronizedSuffix: o=example
-ChangelogServer: localhost:11111
-ChangelogServer: localhost:22222
+ChangelogServer: ${remote.hostname}:11111
+ChangelogServer: ${remote.hostname}:22222
-Hostname: localhost
-Directory: /var/tmp/opends-synchro-tests/server2
+Hostname: ${remote.hostname}
+Directory: ${tests.tmp.dir}/opends-synchro-tests/server2
Port: 22389
Adminport: 22444
Sslport: 22636
@@ -48,5 +48,5 @@
BaseDn: o=example
Changelogport: 22222
SynchronizedSuffix: o=example
-ChangelogServer: localhost:11111
-ChangelogServer: localhost:22222
+ChangelogServer: ${remote.hostname}:11111
+ChangelogServer: ${remote.hostname}:22222
diff --git a/opends/tests/staf-tests/shared/xsl/gen-alltests-report.xsl b/opends/tests/staf-tests/shared/xsl/gen-alltests-report.xsl
index 531d6b0..62ef242 100644
--- a/opends/tests/staf-tests/shared/xsl/gen-alltests-report.xsl
+++ b/opends/tests/staf-tests/shared/xsl/gen-alltests-report.xsl
@@ -24,7 +24,7 @@
!
! CDDL HEADER END
!
- ! Copyright 2006-2008 Sun Microsystems, Inc.
+ ! Copyright 2006-2009 Sun Microsystems, Inc.
! -->
<xsl:template match="/">
@@ -54,6 +54,8 @@
<!--- Test Report Header Variables -->
<xsl:variable name="id" select="identification"/>
<xsl:variable name="sut" select="$id/sut"/>
+ <xsl:variable name="url" select="normalize-space($id/tests-url)"/>
+ <xsl:variable name="tests-dir" select="normalize-space($id/tests-dir)"/>
<xsl:variable name="version" select="$sut/version"/>
<xsl:variable name="buildid" select="$sut/buildid"/>
<xsl:variable name="revision" select="$sut/revision"/>
@@ -67,7 +69,6 @@
<xsl:element name="head">
- <link rel="SHORTCUT ICON" href="https://opends.dev.java.net/public/images/opends_favicon.gif" />
<style type="text/css">
/* <![CDATA[ */
@import "/branding/css/tigris.css";
@@ -75,7 +76,7 @@
/* ]]> */
</style>
<link rel="stylesheet" type="text/css" href="/branding/css/print.css" media="print" />
- <link rel="stylesheet" href="https://opends.dev.java.net/public/css/opends.css" type="text/css" />
+ <link rel="stylesheet" href="./opends.css" type="text/css" />
<xsl:element name="title">
<xsl:value-of select="concat('Test Report for OpenDS ',$version)"/>
@@ -95,7 +96,7 @@
<tbody>
<tr>
<td><div class="collectionheader"><xsl:value-of select="concat('Test Report for OpenDS ',$version)"/></div></td>
- <td width="10%"><a href="https://opends.dev.java.net/"><img src="https://opends.dev.java.net/public/images/opends_logo_sm.png" alt="OpenDS Logo" width="104" height="33" border="0" align="middle" /></a> </td>
+ <td width="10%"><a href="https://opends.dev.java.net/"><img src="./opends_logo_sm.png" alt="OpenDS Logo" width="104" height="33" border="0" align="middle" /></a> </td>
</tr>
</tbody>
</table>
diff --git a/opends/tests/staf-tests/shared/xsl/gen-groups-report.xsl b/opends/tests/staf-tests/shared/xsl/gen-groups-report.xsl
index 93017fd..bb1f5cc 100644
--- a/opends/tests/staf-tests/shared/xsl/gen-groups-report.xsl
+++ b/opends/tests/staf-tests/shared/xsl/gen-groups-report.xsl
@@ -24,7 +24,7 @@
!
! CDDL HEADER END
!
- ! Copyright 2008 Sun Microsystems, Inc.
+ ! Copyright 2008-2009 Sun Microsystems, Inc.
! -->
<xsl:output method="html" version="4.0" encoding="iso-8859-1" indent="yes"/>
@@ -79,7 +79,6 @@
<xsl:element name="head">
- <link rel="SHORTCUT ICON" href="https://opends.dev.java.net/public/images/opends_favicon.gif" />
<style type="text/css">
/* <![CDATA[ */
@import "/branding/css/tigris.css";
@@ -87,7 +86,7 @@
/* ]]> */
</style>
<link rel="stylesheet" type="text/css" href="/branding/css/print.css" media="print" />
- <link rel="stylesheet" href="https://opends.dev.java.net/public/css/opends.css" type="text/css" />
+ <link rel="stylesheet" href="./opends.css" type="text/css" />
<xsl:element name="title">
<xsl:value-of select="concat('Test Groups Report for OpenDS ',$version)"/>
@@ -107,7 +106,7 @@
<tbody>
<tr>
<td><div class="collectionheader"><xsl:value-of select="concat('Test Groups Report for OpenDS ',$version)"/></div></td>
- <td width="10%"><a href="https://opends.dev.java.net/"><img src="https://opends.dev.java.net/public/images/opends_logo_sm.png" alt="OpenDS Logo" width="104" height="33" border="0" align="middle" /></a> </td>
+ <td width="10%"><a href="https://opends.dev.java.net/"><img src="./opends_logo_sm.png" alt="OpenDS Logo" width="104" height="33" border="0" align="middle" /></a> </td>
</tr>
</tbody>
</table>
diff --git a/opends/tests/staf-tests/shared/xsl/gen-logs.xsl b/opends/tests/staf-tests/shared/xsl/gen-logs.xsl
index 1aedbfc..60c189e 100644
--- a/opends/tests/staf-tests/shared/xsl/gen-logs.xsl
+++ b/opends/tests/staf-tests/shared/xsl/gen-logs.xsl
@@ -24,7 +24,7 @@
!
! CDDL HEADER END
!
- ! Copyright 2008 Sun Microsystems, Inc.
+ ! Copyright 2008-2009 Sun Microsystems, Inc.
! -->
<xsl:output method="html" version="4.0" encoding="iso-8859-1" indent="yes"/>
@@ -40,7 +40,6 @@
<xsl:element name="head">
- <link rel="SHORTCUT ICON" href="https://opends.dev.java.net/public/images/opends_favicon.gif" />
<style type="text/css">
/* <![CDATA[ */
@import "/branding/css/tigris.css";
@@ -48,7 +47,7 @@
/* ]]> */
</style>
<link rel="stylesheet" type="text/css" href="/branding/css/print.css" media="print" />
- <link rel="stylesheet" href="https://opends.dev.java.net/public/css/opends.css" type="text/css" />
+ <link rel="stylesheet" href="../../reports/opends.css" type="text/css" />
<xsl:element name="title">
<xsl:value-of select="concat('Logs for ', $suite, ' test suite')"/>
@@ -60,7 +59,7 @@
<tbody>
<tr>
<td><div class="collectionheader"><xsl:value-of select="concat('Logs for ', $suite, ' test suite')"/></div></td>
- <td width="10%"><a href="https://opends.dev.java.net/"><img src="https://opends.dev.java.net/public/images/opends_logo_sm.png" alt="OpenDS Logo" width="104" height="33" border="0" align="middle" /></a> </td>
+ <td width="10%"><a href="https://opends.dev.java.net/"><img src="../../reports/opends_logo_sm.png" alt="OpenDS Logo" width="104" height="33" border="0" align="middle" /></a> </td>
</tr>
</tbody>
</table>
diff --git a/opends/tests/staf-tests/shared/xsl/gen-suites-report.xsl b/opends/tests/staf-tests/shared/xsl/gen-suites-report.xsl
index a4453bc..c88601c 100644
--- a/opends/tests/staf-tests/shared/xsl/gen-suites-report.xsl
+++ b/opends/tests/staf-tests/shared/xsl/gen-suites-report.xsl
@@ -24,7 +24,7 @@
!
! CDDL HEADER END
!
- ! Copyright 2008 Sun Microsystems, Inc.
+ ! Copyright 2008-2009 Sun Microsystems, Inc.
! -->
<xsl:output method="html" version="4.0" encoding="iso-8859-1" indent="yes"/>
@@ -83,7 +83,6 @@
<xsl:element name="head">
- <link rel="SHORTCUT ICON" href="https://opends.dev.java.net/public/images/opends_favicon.gif" />
<style type="text/css">
/* <![CDATA[ */
@import "/branding/css/tigris.css";
@@ -91,7 +90,7 @@
/* ]]> */
</style>
<link rel="stylesheet" type="text/css" href="/branding/css/print.css" media="print" />
- <link rel="stylesheet" href="https://opends.dev.java.net/public/css/opends.css" type="text/css" />
+ <link rel="stylesheet" href="../../reports/opends.css" type="text/css" />
<xsl:element name="title">
<xsl:value-of select="concat('Test Suites Report for OpenDS ',$version)"/>
@@ -111,7 +110,7 @@
<tbody>
<tr>
<td><div class="collectionheader"><xsl:value-of select="concat('Test Suites Report for OpenDS ',$version)"/></div></td>
- <td width="10%"><a href="https://opends.dev.java.net/"><img src="https://opends.dev.java.net/public/images/opends_logo_sm.png" alt="OpenDS Logo" width="104" height="33" border="0" align="middle" /></a> </td>
+ <td width="10%"><a href="https://opends.dev.java.net/"><img src="../../reports/opends_logo_sm.png" alt="OpenDS Logo" width="104" height="33" border="0" align="middle" /></a> </td>
</tr>
</tbody>
</table>
diff --git a/opends/tests/staf-tests/shared/xsl/gen-tests-report.xsl b/opends/tests/staf-tests/shared/xsl/gen-tests-report.xsl
index 4c06769..b642116 100644
--- a/opends/tests/staf-tests/shared/xsl/gen-tests-report.xsl
+++ b/opends/tests/staf-tests/shared/xsl/gen-tests-report.xsl
@@ -24,7 +24,7 @@
!
! CDDL HEADER END
!
- ! Copyright 2008 Sun Microsystems, Inc.
+ ! Copyright 2008-2009 Sun Microsystems, Inc.
! -->
<xsl:output method="html" version="4.0" encoding="iso-8859-1" indent="yes"/>
@@ -84,15 +84,6 @@
<xsl:element name="head">
- <xsl:element name="link">
- <xsl:attribute name="rel">
- <xsl:value-of select="'SHORTCUT ICON'"/>
- </xsl:attribute>
- <xsl:attribute name="href">
- <xsl:value-of select="'https://opends.dev.java.net/public/images/opends_favicon.gif'"/>
- </xsl:attribute>
- </xsl:element>
-
<style type="text/css">
/* <![CDATA[ */
@import "/branding/css/tigris.css";
@@ -113,17 +104,7 @@
<xsl:value-of select="'print'"/>
</xsl:attribute>
</xsl:element>
- <xsl:element name="link">
- <xsl:attribute name="rel">
- <xsl:value-of select="'stylesheet'"/>
- </xsl:attribute>
- <xsl:attribute name="type">
- <xsl:value-of select="'text/css'"/>
- </xsl:attribute>
- <xsl:attribute name="href">
- <xsl:value-of select="'https://opends.dev.java.net/public/css/opends.css'"/>
- </xsl:attribute>
- </xsl:element>
+ <link rel="stylesheet" href="../../reports/opends.css" type="text/css" />
<xsl:element name="title">
<xsl:value-of select="concat('Test Case Report for OpenDS ',$version)"/>
@@ -143,7 +124,7 @@
<tbody>
<tr>
<td><div class="collectionheader"><xsl:value-of select="concat('Test Case Report for OpenDS ',$version)"/></div></td>
- <td width="10%"><a href="https://opends.dev.java.net/"><img src="https://opends.dev.java.net/public/images/opends_logo_sm.png" alt="OpenDS Logo" width="104" height="33" border="0" align="middle" /></a> </td>
+ <td width="10%"><a href="https://opends.dev.java.net/"><img src="../../reports/opends_logo_sm.png" alt="OpenDS Logo" width="104" height="33" border="0" align="middle" /></a> </td>
</tr>
</tbody>
</table>
diff --git a/opends/tests/staf-tests/shared/xsl/id.xsl b/opends/tests/staf-tests/shared/xsl/id.xsl
index 16f610f..3e7cba4 100644
--- a/opends/tests/staf-tests/shared/xsl/id.xsl
+++ b/opends/tests/staf-tests/shared/xsl/id.xsl
@@ -24,7 +24,7 @@
!
! CDDL HEADER END
!
- ! Copyright 2008 Sun Microsystems, Inc.
+ ! Copyright 2008-2009 Sun Microsystems, Inc.
! -->
<xsl:output method="html" version="4.0" encoding="iso-8859-1" indent="yes"/>
@@ -66,7 +66,6 @@
<xsl:element name="head">
- <link rel="SHORTCUT ICON" href="https://opends.dev.java.net/public/images/opends_favicon.gif" />
<style type="text/css">
/* <![CDATA[ */
@import "/branding/css/tigris.css";
@@ -74,7 +73,7 @@
/* ]]> */
</style>
<link rel="stylesheet" type="text/css" href="/branding/css/print.css" media="print" />
- <link rel="stylesheet" href="https://opends.dev.java.net/public/css/opends.css" type="text/css" />
+ <link rel="stylesheet" href="./opends.css" type="text/css" />
<xsl:element name="title">
<xsl:value-of select="concat('Identification for OpenDS ',$version)"/>
@@ -94,7 +93,7 @@
<tbody>
<tr>
<td><div class="collectionheader"><xsl:value-of select="concat('Identification for OpenDS ',$version)"/></div></td>
- <td width="10%"><a href="https://opends.dev.java.net/"><img src="https://opends.dev.java.net/public/images/opends_logo_sm.png" alt="OpenDS Logo" width="104" height="33" border="0" align="middle" /></a> </td>
+ <td width="10%"><a href="https://opends.dev.java.net/"><img src="./opends_logo_sm.png" alt="OpenDS Logo" width="104" height="33" border="0" align="middle" /></a> </td>
</tr>
</tbody>
</table>
--
Gitblit v1.10.0