From 57c2483dab0e8516a0af763bd45dd5c6db63f4c3 Mon Sep 17 00:00:00 2001
From: mkeyes <mkeyes@localhost>
Date: Fri, 26 Oct 2007 18:19:00 +0000
Subject: [PATCH] Moved the functional-test shared/functions, shared/python, and shared/java directories to tests directory level. The new location plus the modifications make up the merged libraries for the functional tests and the yet-to-be committed stress tests.
---
opendj-sdk/opends/tests/shared/functions/staxcmd.xml | 0
opendj-sdk/opends/tests/shared/java/parsingtool/ArrayData.java | 0
opendj-sdk/opends/tests/shared/java/parsingtool/GenerateOpenDSTestSpecs.java | 0
opendj-sdk/opends/tests/shared/python/security$py.class | 0
opendj-sdk/opends/tests/shared/functions/dsadm.xml | 68 +++++-
opendj-sdk/opends/tests/shared/functions/environment.xml | 2
opendj-sdk/opends/tests/shared/functions/topology.xml | 0
opendj-sdk/opends/tests/shared/functions/security.xml | 0
opendj-sdk/opends/tests/shared/functions/signals.xml | 0
opendj-sdk/opends/tests/shared/functions/tools.xml | 102 +++++++++
opendj-sdk/opends/tests/shared/python/replication$py.class | 0
opendj-sdk/opends/tests/shared/java/addAnEntry.java | 0
opendj-sdk/opends/tests/shared/java/parsingtool/TestFileList.java | 0
opendj-sdk/opends/tests/shared/java/parsingtool/ParseData.java | 0
opendj-sdk/opends/tests/shared/functions/utils.xml | 0
opendj-sdk/opends/tests/shared/python/common.py | 0
opendj-sdk/opends/tests/shared/java/parsingtool/WriteXMLFile_int.java | 0
opendj-sdk/opends/tests/shared/java/xmlToHtml/xmlToHtml.java | 0
opendj-sdk/opends/tests/shared/python/replication.py | 0
opendj-sdk/opends/tests/shared/functions/baselib.xml | 0
opendj-sdk/opends/tests/shared/java/parsingtool/WriteXMLFile_xml.java | 0
/dev/null | 214 ---------------------
opendj-sdk/opends/tests/shared/functions/ldap.xml | 161 +++++++++++++++
opendj-sdk/opends/tests/shared/python/common$py.class | 0
opendj-sdk/opends/tests/shared/functions/dsconfig.xml | 0
opendj-sdk/opends/tests/shared/python/security.py | 0
opendj-sdk/opends/tests/shared/functions/stafcmd.xml | 0
opendj-sdk/opends/tests/functional-tests/staf-installer/config.py.stubs | 4
opendj-sdk/opends/tests/shared/java/parsingtool/README | 0
29 files changed, 310 insertions(+), 241 deletions(-)
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/java/addAnEntry.class b/opendj-sdk/opends/tests/functional-tests/shared/java/addAnEntry.class
deleted file mode 100644
index c57794c..0000000
--- a/opendj-sdk/opends/tests/functional-tests/shared/java/addAnEntry.class
+++ /dev/null
Binary files differ
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/java/modifyAnAttribute.class b/opendj-sdk/opends/tests/functional-tests/shared/java/modifyAnAttribute.class
deleted file mode 100644
index ae416ea..0000000
--- a/opendj-sdk/opends/tests/functional-tests/shared/java/modifyAnAttribute.class
+++ /dev/null
Binary files differ
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/java/modifyAnAttribute.java b/opendj-sdk/opends/tests/functional-tests/shared/java/modifyAnAttribute.java
deleted file mode 100644
index 9663290..0000000
--- a/opendj-sdk/opends/tests/functional-tests/shared/java/modifyAnAttribute.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE
- * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- * add the following below this CDDL HEADER, with the fields enclosed
- * by brackets "[]" replaced with your own identifying information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Portions Copyright 2007 Sun Microsystems, Inc.
- */
-
-
-import java.util.Properties;
-import java.lang.*;
-import java.util.Hashtable;
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
-import javax.naming.ldap.LdapContext;
-import javax.naming.ldap.InitialLdapContext;
-import javax.naming.CompositeName;
-import javax.naming.directory.BasicAttribute;
-import javax.naming.directory.BasicAttributes;
-import javax.naming.*;
-import javax.naming.directory.ModificationItem;
-import java.util.HashSet;
-import java.util.StringTokenizer;
-import java.util.Iterator;
-
-
-
-/**
- * modify an entry with an attribute
- * the operation can be a replace, delete or a add new attribute
- * the function returns the ldap error code
- */
-
-public class modifyAnAttribute {
-
- public static void main(String[] args) {
-
- String hostname=null;
- String ldapPort=null;
- String principal=null;
- String credential=null;
- String attributeToModify=null;
- String dnToModify=null;
- String newAttributeValue=null;
- String changetype=null;
- String errorCode=null;
- String errorMessage=null;
- String listAttributesToModify=null;
-
-
- int ind1;
- String attributeName;
- String attributeValue;
- Hashtable envLdap = new Hashtable();
- LdapContext ctx;
-
- Attributes attributes = new BasicAttributes();
- HashSet attributeSet = new HashSet();
-
-
- for (int k=0; k< args.length; k++) {
- String opt1 = args[k];
- String val1 = args[k+1];
-
- if (opt1.equals("-h")) {
- hostname = val1;
- }
- if (opt1.equals("-p")) {
- ldapPort = val1;
- }
- if (opt1.equals("-D")) {
- principal = val1;
- }
- if (opt1.equals("-w")) {
- credential = val1;
- }
- if (opt1.equals("-d")) {
- dnToModify = val1;
- }
- if (opt1.equals("-v")) {
- newAttributeValue = val1;
- }
- if (opt1.equals("-a")) {
- attributeToModify = val1;
- }
- if (opt1.equals("-t")) {
- changetype = val1;
- }
- if (opt1.equals("-l")) {
- listAttributesToModify = val1;
-
- ind1= val1.indexOf (":");
-
- attributeName=val1.substring (0,ind1);
- attributeValue=val1.substring (ind1+1);
-
- BasicAttribute attrToComplete = null;
-
- Iterator it = attributeSet.iterator();
- while (attrToComplete == null && it.hasNext()) {
- BasicAttribute attr = (BasicAttribute) it.next();
- if ((attr.getID()).equalsIgnoreCase(attributeName)) {
- attrToComplete = attr;
- }
- }
-
- if (attrToComplete == null) {
- attrToComplete = new BasicAttribute(attributeName);
- attributeSet.add(attrToComplete);
- }
- attributeValue=attributeValue.replaceAll("QUOT","\\\"");
- attrToComplete.add(attributeValue);
- }
- k++;
- }
-
- if ( attributeToModify != null && newAttributeValue != null ) {
-
- BasicAttribute attrToComplete = null;
-
- attrToComplete = new BasicAttribute(attributeToModify);
- attributeSet.add(attrToComplete);
- newAttributeValue=newAttributeValue.replaceAll("QUOT","\\\"");
- attrToComplete.add(newAttributeValue);
- }
-
-
- Iterator it2 = attributeSet.iterator();
- while (it2.hasNext()) {
- BasicAttribute attr = (BasicAttribute)it2.next();
- attributes.put(attr);
- }
-
- String provider = "ldap://" + hostname + ":" + ldapPort + "/";
-
-
- envLdap.put("java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory");
- envLdap.put(Context.SECURITY_AUTHENTICATION, "simple");
- envLdap.put(Context.SECURITY_PRINCIPAL, principal);
- envLdap.put(Context.SECURITY_CREDENTIALS, credential);
- envLdap.put(Context.PROVIDER_URL, provider);
-
-
- try {
-
-
- CompositeName entryDN = new CompositeName (dnToModify);
- System.out.println("Modify the entry " + dnToModify);
-
- // connect to server
- ctx = new InitialLdapContext(envLdap, null);
-
- // replace attribute
- if (changetype.equals("replace")) {
- ctx.modifyAttributes(entryDN, LdapContext.REPLACE_ATTRIBUTE , attributes);
- }
- else if (changetype.equals("add")) {
- // add attribute
- ctx.modifyAttributes(entryDN, LdapContext.ADD_ATTRIBUTE , attributes);
- }
- else if (changetype.equals("delete")) {
- // add attribute
- ctx.modifyAttributes(entryDN, LdapContext.REMOVE_ATTRIBUTE , attributes);
- }
-
- ctx.close();
-
- } catch (CommunicationException e1) {
- errorMessage = e1.getMessage();
-
- } catch (NamingException e2) {
- errorMessage = e2.getMessage();
-
- } catch (Exception e3) {
- errorMessage= e3.getMessage();
- }
- // No error, the modify is success
- if ( errorMessage == null ) {
- errorCode="0";
- }
- else {
- System.out.println (errorMessage);
- int ind=errorMessage.indexOf("-");
- if ( ind > 0 ) {
- errorCode=errorMessage.substring(18, ind-1);
- }
- else errorCode="0";
- }
-
- int RC = Integer.parseInt(errorCode);
- System.exit(RC);
- }
-}
\ No newline at end of file
diff --git a/opendj-sdk/opends/tests/functional-tests/staf-installer/config.py.stubs b/opendj-sdk/opends/tests/functional-tests/staf-installer/config.py.stubs
index 584c57b..588a34d 100644
--- a/opendj-sdk/opends/tests/functional-tests/staf-installer/config.py.stubs
+++ b/opendj-sdk/opends/tests/functional-tests/staf-installer/config.py.stubs
@@ -12,9 +12,9 @@
TESTS_ROOT = '%s/tests' % OPENDSDIR
TESTS_DIR = '%s/functional-tests' % TESTS_ROOT
TESTS_SHARED_DIR = '%s/shared' % TESTS_DIR
-TESTS_FUNCTIONS_DIR = '%s/functions' % TESTS_SHARED_DIR
+TESTS_FUNCTIONS_DIR = '%s/shared/functions' % TESTS_ROOT
TESTS_DATA_DIR = '%s/data' % TESTS_SHARED_DIR
-TESTS_JAVA_DIR = '%s/java' % TESTS_SHARED_DIR
+TESTS_JAVA_DIR = '%s/shared/java' % TESTS_ROOT
DIRECTORY_INSTANCE_DN = '${opends.admin.dn}'
DIRECTORY_INSTANCE_PSWD = '${opends.admin.pwd}'
DIRECTORY_INSTANCE_DIR = '%s' % TMPDIR
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/functions/baselib.xml b/opendj-sdk/opends/tests/shared/functions/baselib.xml
similarity index 100%
rename from opendj-sdk/opends/tests/functional-tests/shared/functions/baselib.xml
rename to opendj-sdk/opends/tests/shared/functions/baselib.xml
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/functions/dsadm.xml b/opendj-sdk/opends/tests/shared/functions/dsadm.xml
similarity index 97%
rename from opendj-sdk/opends/tests/functional-tests/shared/functions/dsadm.xml
rename to opendj-sdk/opends/tests/shared/functions/dsadm.xml
index b3b16d4..c28e75e 100755
--- a/opendj-sdk/opends/tests/functional-tests/shared/functions/dsadm.xml
+++ b/opendj-sdk/opends/tests/shared/functions/dsadm.xml
@@ -110,7 +110,7 @@
if dsPath:
STAFCmd='%s/setup%s' % (dsPath,fileExt)
- STAFCmdParamsList.append('--cli')
+ STAFCmdParamsList.append('--cli')
STAFCmdParamsList.append('-n')
if dsPort:
@@ -929,11 +929,15 @@
'arguments' : STAFCmdParams
}
</call>
+ <script>
+ STAXCode=RC
+ STAXReason=STAXResult
+ </script>
<call function="'checkRC'">
- { 'returncode' : RC ,
- 'result' : STAXResult }
+ { 'returncode' : STAXCode ,
+ 'result' : STAXReason }
</call>
-
+ <return>STAXReason</return>
</sequence>
</function>
@@ -1075,6 +1079,19 @@
</function-arg-description>
<function-arg-property name="type" value="option"/>
</function-arg-def>
+ <function-arg-def name="numLdapCheckTries" type="optional" default="10">
+ <function-arg-description>
+ Number of ldap check tries when checking if task is complete
+ </function-arg-description>
+ <function-arg-property name="type" value="option"/>
+ </function-arg-def>
+ <function-arg-def name="sleepBetweenLdapCheckTries" type="optional" default="2000">
+ <function-arg-description>
+ Sleep time in milliseconds between ldap check tries
+ </function-arg-description>
+ <function-arg-property name="type" value="option"/>
+ </function-arg-def>
+
</function-map-args>
<sequence>
@@ -1166,13 +1183,15 @@
<if expr="STAFCmdRC == 0">
<sequence>
<call function="'CheckLdapTask'">
- { 'location' : myLocation,
- 'dsPath' : myPath,
- 'dsTaskDn' : taskDN,
- 'dsHost' : dsInstanceHost,
- 'dsPort' : dsInstancePort,
- 'dsBindDn' : dsInstanceDn,
- 'dsBindPswd' : dsInstancePswd }
+ { 'location' : myLocation,
+ 'dsPath' : myPath,
+ 'dsTaskDn' : taskDN,
+ 'dsHost' : dsInstanceHost,
+ 'dsPort' : dsInstancePort,
+ 'dsBindDn' : dsInstanceDn,
+ 'dsBindPswd' : dsInstancePswd,
+ 'noOfLoops' : numLdapCheckTries,
+ 'sleepMilliSeconds' : sleepBetweenLdapCheckTries }
</call>
</sequence>
</if>
@@ -2952,7 +2971,20 @@
Bind password
</function-arg-description>
<function-arg-property name="type" value="string"/>
+ </function-arg-def>
+ <function-arg-def name="noOfLoops" type="optional" default="10">
+ <function-arg-description>
+ Number of ldap check tries when checking if task is complete
+ </function-arg-description>
+ <function-arg-property name="type" value="integer"/>
</function-arg-def>
+ <function-arg-def name="sleepMilliSeconds" type="optional" default="2000">
+ <function-arg-description>
+ Sleep time in milliseconds between ldap check tries
+ </function-arg-description>
+ <function-arg-property name="type" value="integer"/>
+ </function-arg-def>
+
</function-map-args>
<sequence>
@@ -3003,15 +3035,16 @@
<script>
successPattern = re.compile('ds-task-state: COMPLETED_SUCCESSFULLY')
stopErrPattern = re.compile('ds-task-state: STOPPED_BY_ERROR')
+ myCounter=1
</script>
<!-- Wait for the task to be COMPLETED_SUCCESSFULLY -->
<script>taskRC=1</script>
- <loop from="1" to="10" while="taskRC != 0">
+ <loop from="1" to="noOfLoops" while="taskRC != 0">
<sequence>
<message>
- '%s %s' % (STAFCmd, STAFCmdParams)
+ 'LOOP number %s - %s %s' % (myCounter, STAFCmd, STAFCmdParams)
</message>
<!-- Search for task status -->
@@ -3027,6 +3060,7 @@
<script>
STAFCmdRC=RC
STAFCmdResult=STAXResult
+ myCounter=myCounter+1
</script>
<if expr='re.search(successPattern, STAFCmdResult[0][1]) != None'>
@@ -3057,8 +3091,12 @@
'result' : STAFCmdResult }
</call>
+ <message>
+ 'Sleeping for %s ms' % sleepMilliSeconds
+ </message>
+
<call function="'Sleep'">
- { 'sleepForMilliSeconds' : '2000' }
+ { 'sleepForMilliSeconds' : sleepMilliSeconds }
</call>
</sequence>
@@ -3292,5 +3330,5 @@
</sequence>
</function>
-
+
</stax>
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/functions/dsconfig.xml b/opendj-sdk/opends/tests/shared/functions/dsconfig.xml
similarity index 100%
rename from opendj-sdk/opends/tests/functional-tests/shared/functions/dsconfig.xml
rename to opendj-sdk/opends/tests/shared/functions/dsconfig.xml
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/functions/environment.xml b/opendj-sdk/opends/tests/shared/functions/environment.xml
similarity index 99%
rename from opendj-sdk/opends/tests/functional-tests/shared/functions/environment.xml
rename to opendj-sdk/opends/tests/shared/functions/environment.xml
index b45fb63..e30d118 100755
--- a/opendj-sdk/opends/tests/functional-tests/shared/functions/environment.xml
+++ b/opendj-sdk/opends/tests/shared/functions/environment.xml
@@ -97,7 +97,7 @@
<!-- Load in the local shared python objects from libraries -->
<script>
- sys.path.append("%s/python" % TESTS_SHARED_DIR )
+ sys.path.append("%s/shared/python" % TESTS_ROOT )
from common import *
from security import *
from replication import *
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/functions/ldap.xml b/opendj-sdk/opends/tests/shared/functions/ldap.xml
similarity index 94%
rename from opendj-sdk/opends/tests/functional-tests/shared/functions/ldap.xml
rename to opendj-sdk/opends/tests/shared/functions/ldap.xml
index a26fef8..cc86c7f 100755
--- a/opendj-sdk/opends/tests/functional-tests/shared/functions/ldap.xml
+++ b/opendj-sdk/opends/tests/shared/functions/ldap.xml
@@ -2687,6 +2687,13 @@
<function-arg-property name="type" value="string"/>
</function-arg-def>
+ <function-arg-def name="suppressTestStatus" type="optional" default="0">
+ <function-arg-description>
+ Supress the call to checkTestRC
+ </function-arg-description>
+ <function-arg-property name="type" value="string"/>
+ </function-arg-def>
+
<function-arg-def name="expectedRC" type="optional" default="0">
<function-arg-description>
Expected return code value. Default value is 0
@@ -2756,18 +2763,160 @@
STAXCode=RC
STAXReason=STAXResult
</script>
- <call function="'checktestRC'">
- { 'returncode' : STAXCode ,
- 'result' : STAXReason,
- 'expected' : expectedRC }
- </call>
+
+ <if expr="suppressTestStatus != '1'">
+ <sequence>
+ <call function="'checktestRC'">
+ { 'returncode' : STAXCode ,
+ 'result' : STAXReason,
+ 'expected' : expectedRC }
+ </call>
+ </sequence>
+ </if>
<return>
- STAXReason
+ [STAXCode,STAXReason]
</return>
</sequence>
</function>
+ <!-- Create a load on Directory with modifies -->
+ <function name="loadOfModifies">
+ <function-prolog>
+ This function creates a load of modifies against Directory. It is only for entries with uid=user.xxx.
+ </function-prolog>
+ <function-map-args>
+ <function-arg-def name="location" type="optional" default="STAF_REMOTE_HOSTNAME">
+ <function-arg-description>
+ Location of target host
+ </function-arg-description>
+ <function-arg-property name="type" value="hostname"/>
+ </function-arg-def>
+
+ <function-arg-def name="dsPath" type="optional" default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
+ <function-arg-description>
+ Pathname to installation root
+ </function-arg-description>
+ <function-arg-property name="type" value="filepath"/>
+ </function-arg-def>
+
+ <function-arg-def name="dsInstanceHost" type="optional" default="STAF_REMOTE_HOSTNAME">
+ <function-arg-description>
+ Directory server hostname or IP address
+ </function-arg-description>
+ <function-arg-property name="type" value="hostname"/>
+ </function-arg-def>
+
+ <function-arg-def name="dsInstancePort" type="required">
+ <function-arg-description>
+ Directory server port number
+ </function-arg-description>
+ <function-arg-property name="type" value="Port number"/>
+ </function-arg-def>
+
+ <function-arg-def name="dsInstanceDn" type="required">
+ <function-arg-description>
+ Bind DN
+ </function-arg-description>
+ <function-arg-property name="type" value="DN"/>
+ </function-arg-def>
+
+ <function-arg-def name="dsInstancePswd" type="required">
+ <function-arg-description>
+ Bind password
+ </function-arg-description>
+ <function-arg-property name="type" value="string"/>
+ </function-arg-def>
+
+ <function-arg-def name="partialDNToModify" type="required">
+ <function-arg-description>
+ partial DN to modify, all but the uid=user.xxxx
+ </function-arg-description>
+ <function-arg-property name="type" value="DN"/>
+ </function-arg-def>
+
+ <function-arg-def name="attributeName" type="optional">
+ <function-arg-description>
+ Attribute to modify
+ </function-arg-description>
+ <function-arg-property name="type" value="string"/>
+ </function-arg-def>
+
+ <function-arg-def name="newAttributeValue" type="optional">
+ <function-arg-description>
+ New Attribute Value
+ </function-arg-description>
+ <function-arg-property name="type" value="string"/>
+ </function-arg-def>
+
+ <function-arg-def name="listAttributes" type="optional" default="' '">
+ <function-arg-description>
+ List of attributes name and value to modify. The format is name:value
+ </function-arg-description>
+ <function-arg-property name="type" value="string"/>
+ </function-arg-def>
+
+ <function-arg-def name="changetype" type="required">
+ <function-arg-description>
+ Type of modification, can be delete, add, replace
+ </function-arg-description>
+ <function-arg-property name="type" value="string"/>
+ </function-arg-def>
+
+ <function-arg-def name="numEntries" type="required">
+ <function-arg-description>
+ Number of entries to modify
+ </function-arg-description>
+ <function-arg-property name="type" value="string"/>
+ </function-arg-def>
+
+ <function-arg-def name="clientID" type="optional">
+ <function-arg-description>
+ ID for the client doing the modify
+ </function-arg-description>
+ <function-arg-property name="type" value="string"/>
+ </function-arg-def>
+
+ <function-arg-def name="expectedRC" type="optional" default="0">
+ <function-arg-description>
+ Expected return code value. Default value is 0
+ </function-arg-description>
+ <function-arg-property name="type" value="string"/>
+ </function-arg-def>
+
+ </function-map-args>
+ <sequence>
+
+ <script>
+ import random
+ curr_rdn_num=random.randint(0,99)
+ curr_dn="uid=user.%s,%s" % (curr_rdn_num, partialDNToModify)
+ </script>
+
+ <message>
+ '****From client, %s, Modifying %s' % (clientID,curr_dn)
+ </message>
+
+ <call function="'modifyAnAttribute'">
+ { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
+ 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
+ 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
+ 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
+ 'DNToModify' : curr_dn ,
+ 'attributeName' : 'description' ,
+ 'newAttributeValue' : 'New description for %s' % curr_dn ,
+ 'changetype' : 'replace' ,
+ 'suppressTestStatus' : '1' }
+ </call>
+
+ <return>
+ [STAXCode,STAXReason]
+ </return>
+
+ </sequence>
+
+ </function>
+
<!-- Add a New entry-->
<function name="addAnEntry">
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/functions/security.xml b/opendj-sdk/opends/tests/shared/functions/security.xml
similarity index 100%
rename from opendj-sdk/opends/tests/functional-tests/shared/functions/security.xml
rename to opendj-sdk/opends/tests/shared/functions/security.xml
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/functions/signals.xml b/opendj-sdk/opends/tests/shared/functions/signals.xml
old mode 100644
new mode 100755
similarity index 100%
rename from opendj-sdk/opends/tests/functional-tests/shared/functions/signals.xml
rename to opendj-sdk/opends/tests/shared/functions/signals.xml
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/functions/stafcmd.xml b/opendj-sdk/opends/tests/shared/functions/stafcmd.xml
similarity index 100%
rename from opendj-sdk/opends/tests/functional-tests/shared/functions/stafcmd.xml
rename to opendj-sdk/opends/tests/shared/functions/stafcmd.xml
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/functions/staxcmd.xml b/opendj-sdk/opends/tests/shared/functions/staxcmd.xml
similarity index 100%
rename from opendj-sdk/opends/tests/functional-tests/shared/functions/staxcmd.xml
rename to opendj-sdk/opends/tests/shared/functions/staxcmd.xml
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/functions/tools.xml b/opendj-sdk/opends/tests/shared/functions/tools.xml
old mode 100644
new mode 100755
similarity index 89%
rename from opendj-sdk/opends/tests/functional-tests/shared/functions/tools.xml
rename to opendj-sdk/opends/tests/shared/functions/tools.xml
index a399526..90e3c9a
--- a/opendj-sdk/opends/tests/functional-tests/shared/functions/tools.xml
+++ b/opendj-sdk/opends/tests/shared/functions/tools.xml
@@ -103,7 +103,7 @@
STAFCmdParamsList.append('-t %s' % templateFile)
if ldifFile:
- STAFCmdParamsList.append('-o "%s"' % ldifFile)
+ STAFCmdParamsList.append('-o %s' % ldifFile)
if randomSeed:
STAFCmdParamsList.append('-s "%s"' % randomSeed)
@@ -121,7 +121,8 @@
}
</call>
<script>
- STAXCode, STAXReason=STAXResult
+ STAXCode=RC
+ STAXReason=STAXResult
</script>
<if expr="STAXCode != 0">
<sequence>
@@ -130,11 +131,106 @@
</message>
</sequence>
</if>
- <return>[STAXCode, STAXReason]</return>
+ <call function="'checktestRC'">
+ { 'returncode' : STAXCode ,
+ 'result' : STAXReason }
+ </call>
+
+ <return>[STAXCode, STAXReason]</return>
</sequence>
</function>
+ <!-- This function uses make ldif to generate LDIF data files -->
+ <function name="MakeAMakeLdifTemplate">
+ <function-prolog>
+ This function makes a make-ldif template file
+ </function-prolog>
+
+ <function-map-args>
+ <function-arg-def name="numEntries" type="required">
+ <function-arg-description>
+ Number of entries
+ </function-arg-description>
+ <function-arg-property name="type" value="string"/>
+ </function-arg-def>
+ <function-arg-def name="templateFile" type="required">
+ <function-arg-description>
+ Template file name
+ </function-arg-description>
+ <function-arg-property name="type" value="filename"/>
+ </function-arg-def>
+ <function-arg-def name="extraLine" type="optional">
+ <function-arg-description>
+ Extra line to add to the mkae-ldif template
+ </function-arg-description>
+ <function-arg-property name="type" value="string"/>
+ </function-arg-def>
+ </function-map-args>
+ <sequence>
+ <!-- Build the import task configuration object -->
+ <script>
+ ldifLines=[]
+ ldifLines.append('define suffix=%s' % DIRECTORY_INSTANCE_SFX)
+ ldifLines.append('define maildomain=example.com')
+ ldifLines.append('define numusers=%s' % numEntries )
+ ldifLines.append('')
+
+ ldifLines.append('branch: [suffix]')
+ ldifLines.append('')
+
+ ldifLines.append('branch: ou=People,[suffix]')
+ ldifLines.append('subordinateTemplate: person:[numusers]')
+ ldifLines.append('')
+
+ ldifLines.append('template: person')
+ ldifLines.append('rdnAttr: uid')
+ ldifLines.append('objectClass: top')
+ ldifLines.append('objectClass: person')
+ ldifLines.append('objectClass: organizationalPerson')
+ ldifLines.append('objectClass: inetOrgPerson')
+ ldifLines.append('givenName: <first>')
+ ldifLines.append('sn: <last>')
+ ldifLines.append('employeeNumber: <sequential:0>')
+ ldifLines.append('cn: {givenName} {sn} {employeeNumber}')
+ ldifLines.append('uid: user.{employeeNumber}')
+ ldifLines.append('mail: {uid}@[maildomain]')
+ ldifLines.append('telephoneNumber: <random:telephone>')
+ ldifLines.append('description: This is the description for user.{employeeNumber}.')
+ if extraLine:
+ ldifLines.append('%s' % extraLine)
+ </script>
+
+ <!-- Write out the make-ldif template file -->
+ <script>
+ outfile = open(templateFile,"w")
+
+ for line in ldifLines:
+ outfile.write("%s\n" % line)
+
+ outfile.close()
+ </script>
+ <script>
+ STAXCode=RC
+ STAXReason=STAXResult
+ </script>
+ <if expr="STAXCode != 0">
+ <sequence>
+ <message level="'error'">
+ 'creation of a make-ldif template failed (Code=%s,Reason=%s).' % (STAXCode,STAXReason)
+ </message>
+ </sequence>
+ </if>
+ <call function="'checktestRC'">
+ { 'returncode' : STAXCode ,
+ 'result' : STAXReason }
+ </call>
+
+ <return>[STAXCode, STAXReason]</return>
+
+ </sequence>
+ </function>
+
<!-- This function compares two LDIF files using the ldif-diff script -->
<function name="LdifDiffWithScript">
<function-prolog>
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/functions/topology.xml b/opendj-sdk/opends/tests/shared/functions/topology.xml
similarity index 100%
rename from opendj-sdk/opends/tests/functional-tests/shared/functions/topology.xml
rename to opendj-sdk/opends/tests/shared/functions/topology.xml
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/functions/utils.xml b/opendj-sdk/opends/tests/shared/functions/utils.xml
similarity index 100%
rename from opendj-sdk/opends/tests/functional-tests/shared/functions/utils.xml
rename to opendj-sdk/opends/tests/shared/functions/utils.xml
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/java/addAnEntry.java b/opendj-sdk/opends/tests/shared/java/addAnEntry.java
similarity index 100%
rename from opendj-sdk/opends/tests/functional-tests/shared/java/addAnEntry.java
rename to opendj-sdk/opends/tests/shared/java/addAnEntry.java
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/java/parsingtool/ArrayData.java b/opendj-sdk/opends/tests/shared/java/parsingtool/ArrayData.java
similarity index 100%
rename from opendj-sdk/opends/tests/functional-tests/shared/java/parsingtool/ArrayData.java
rename to opendj-sdk/opends/tests/shared/java/parsingtool/ArrayData.java
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/java/parsingtool/GenerateOpenDSTestSpecs.java b/opendj-sdk/opends/tests/shared/java/parsingtool/GenerateOpenDSTestSpecs.java
similarity index 100%
rename from opendj-sdk/opends/tests/functional-tests/shared/java/parsingtool/GenerateOpenDSTestSpecs.java
rename to opendj-sdk/opends/tests/shared/java/parsingtool/GenerateOpenDSTestSpecs.java
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/java/parsingtool/ParseData.java b/opendj-sdk/opends/tests/shared/java/parsingtool/ParseData.java
similarity index 100%
rename from opendj-sdk/opends/tests/functional-tests/shared/java/parsingtool/ParseData.java
rename to opendj-sdk/opends/tests/shared/java/parsingtool/ParseData.java
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/java/parsingtool/README b/opendj-sdk/opends/tests/shared/java/parsingtool/README
similarity index 100%
rename from opendj-sdk/opends/tests/functional-tests/shared/java/parsingtool/README
rename to opendj-sdk/opends/tests/shared/java/parsingtool/README
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/java/parsingtool/TestFileList.java b/opendj-sdk/opends/tests/shared/java/parsingtool/TestFileList.java
similarity index 100%
rename from opendj-sdk/opends/tests/functional-tests/shared/java/parsingtool/TestFileList.java
rename to opendj-sdk/opends/tests/shared/java/parsingtool/TestFileList.java
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/java/parsingtool/WriteXMLFile_int.java b/opendj-sdk/opends/tests/shared/java/parsingtool/WriteXMLFile_int.java
similarity index 100%
rename from opendj-sdk/opends/tests/functional-tests/shared/java/parsingtool/WriteXMLFile_int.java
rename to opendj-sdk/opends/tests/shared/java/parsingtool/WriteXMLFile_int.java
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/java/parsingtool/WriteXMLFile_xml.java b/opendj-sdk/opends/tests/shared/java/parsingtool/WriteXMLFile_xml.java
similarity index 100%
rename from opendj-sdk/opends/tests/functional-tests/shared/java/parsingtool/WriteXMLFile_xml.java
rename to opendj-sdk/opends/tests/shared/java/parsingtool/WriteXMLFile_xml.java
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/java/xmlToHtml/xmlToHtml.java b/opendj-sdk/opends/tests/shared/java/xmlToHtml/xmlToHtml.java
similarity index 100%
rename from opendj-sdk/opends/tests/functional-tests/shared/java/xmlToHtml/xmlToHtml.java
rename to opendj-sdk/opends/tests/shared/java/xmlToHtml/xmlToHtml.java
diff --git a/opendj-sdk/opends/tests/shared/python/common$py.class b/opendj-sdk/opends/tests/shared/python/common$py.class
new file mode 100644
index 0000000..e9a2e9f
--- /dev/null
+++ b/opendj-sdk/opends/tests/shared/python/common$py.class
Binary files differ
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/python/common.py b/opendj-sdk/opends/tests/shared/python/common.py
similarity index 100%
rename from opendj-sdk/opends/tests/functional-tests/shared/python/common.py
rename to opendj-sdk/opends/tests/shared/python/common.py
diff --git a/opendj-sdk/opends/tests/shared/python/replication$py.class b/opendj-sdk/opends/tests/shared/python/replication$py.class
new file mode 100644
index 0000000..c04fec2
--- /dev/null
+++ b/opendj-sdk/opends/tests/shared/python/replication$py.class
Binary files differ
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/python/replication.py b/opendj-sdk/opends/tests/shared/python/replication.py
similarity index 100%
rename from opendj-sdk/opends/tests/functional-tests/shared/python/replication.py
rename to opendj-sdk/opends/tests/shared/python/replication.py
diff --git a/opendj-sdk/opends/tests/shared/python/security$py.class b/opendj-sdk/opends/tests/shared/python/security$py.class
new file mode 100644
index 0000000..f38061e
--- /dev/null
+++ b/opendj-sdk/opends/tests/shared/python/security$py.class
Binary files differ
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/python/security.py b/opendj-sdk/opends/tests/shared/python/security.py
similarity index 100%
rename from opendj-sdk/opends/tests/functional-tests/shared/python/security.py
rename to opendj-sdk/opends/tests/shared/python/security.py
--
Gitblit v1.10.0