From a659c05b345a2c83ddb87db2c8a2d7af2669b544 Mon Sep 17 00:00:00 2001
From: Christophe Sovant <christophe.sovant@forgerock.com>
Date: Tue, 04 Dec 2007 10:14:01 +0000
Subject: [PATCH] Fix ldapsearch testcases and clu test suite cleanup.
---
opends/tests/functional-tests/testcases/runFuncTests.xml | 56 ++++++++++++++++++++++++++++----------------------------
1 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/opends/tests/functional-tests/testcases/runFuncTests.xml b/opends/tests/functional-tests/testcases/runFuncTests.xml
index 8387fb0..02bf36e 100755
--- a/opends/tests/functional-tests/testcases/runFuncTests.xml
+++ b/opends/tests/functional-tests/testcases/runFuncTests.xml
@@ -58,17 +58,17 @@
<!--
add keyword 'main_dsconfig' in run-custom-suites.dat file to run this specific testsuite or run CLI : build run-my-tests
-->
-
+
<import machine="STAF_LOCAL_HOSTNAME"
file="'%s/testcases/backends/backends.xml' % TESTS_DIR" />
<!--
add keyword 'main_backends' in run-custom-suites.dat file to run this specific testsuite or run CLI : build run-my-tests
-->
-
+
<import machine="STAF_LOCAL_HOSTNAME"
- file="'%s/testcases/clu/commands.xml' % TESTS_DIR" />
+ file="'%s/testcases/clu/clu.xml' % TESTS_DIR" />
<!--
- add keyword 'main_commands' in run-custom-suites.dat file to run this specific testsuite or run CLI : build run-my-tests
+ add keyword 'main_clu' in run-custom-suites.dat file to run this specific testsuite or run CLI : build run-my-tests
-->
<import machine="STAF_LOCAL_HOSTNAME"
@@ -133,30 +133,30 @@
# this function return a well-formatted testcase name
def getTestCaseName(name):
return '%s: %s: %s' % (CurrentTestPath['group'],CurrentTestPath['suite'],name)
-
+
# this functions adds a known issue to a testcase's known issues list
issuesList=[]
def knownIssue(issue):
issuesList.append(issue)
-
+
class functionToRun:
def __init__(self, name):
self.name = name
-
+
def getName(self):
return self.name
-
+
testlog=open('%s/tests-log.xml' % logsTestsDir,'w')
testlog.write('<qa>\n')
testlog.write(' <functional-tests>\n')
testlog.write(' <results>\n')
testlog.close()
-
+
suitesFileName='%s/testcases/run-custom-suites.dat' % TESTS_DIR
-
+
if not os.path.exists(suitesFileName):
suitesFileName='%s/testcases/run-default-suites.dat' % TESTS_DIR
-
+
f = open(suitesFileName, 'r')
functionsToRun = []
for line in f.readlines():
@@ -169,7 +169,7 @@
<call function="function.getName()" />
</sequence>
</iterate>
-
+
<!-- in this section we'll compute the coverage for all the tests
if coverage is turned on
so far I could only get through this on either machines with a lot
@@ -195,10 +195,10 @@
from javax.xml.transform.stream import StreamResult
from javax.xml.parsers import DocumentBuilderFactory
from org.w3c.dom import *
-
- factory = DocumentBuilderFactory.newInstance()
+
+ factory = DocumentBuilderFactory.newInstance()
builder = factory.newDocumentBuilder()
-
+
input = FileInputStream("%s/coverage/coverage.xml" % TMPDIR)
document = builder.parse(input)
dom = document.getDocumentElement()
@@ -247,9 +247,9 @@
STAFResult='{}'
</script>
</if>
-
+
<!-- Build the Servers Information Dictionary -->
- <script>
+ <script>
ServersInfoDict=eval(STAFResult)
ServerVersion='unknown'
@@ -262,22 +262,22 @@
ServerSystemOS='unknown'
ServerSystemName='unknown'
ServerSvnRevision='unknown'
-
+
if ServersInfoDict.has_key('%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)):
ServerInfoDict=ServersInfoDict['%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)]
-
+
ServerInfoKey='server version'
if ServerInfoDict.has_key(ServerInfoKey):
ServerVersion=ServerInfoDict[ServerInfoKey]
-
+
ServerInfoKey='server buildid'
if ServerInfoDict.has_key(ServerInfoKey):
ServerBuildId=ServerInfoDict[ServerInfoKey]
-
+
ServerInfoKey='java version'
if ServerInfoDict.has_key(ServerInfoKey):
ServerJavaVersion=ServerInfoDict[ServerInfoKey]
-
+
ServerInfoKey='java vendor'
if ServerInfoDict.has_key(ServerInfoKey):
ServerJavaVendor=ServerInfoDict[ServerInfoKey]
@@ -305,10 +305,10 @@
ServerInfoKey='svn revision'
if ServerInfoDict.has_key(ServerInfoKey):
ServerSvnRevision=ServerInfoDict[ServerInfoKey]
-
+
else:
ServerInfoDict='No key found (%s/%s)' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)
-
+
# Platform and JVM can be overridden from config file
try:
if TEST_OS_STRING:
@@ -332,13 +332,13 @@
testlog.write(' <identification>\n')
testlog.write(' <version>\n')
testlog.write(' %s\n' % ServerVersion)
- testlog.write(' </version>\n')
+ testlog.write(' </version>\n')
testlog.write(' <buildid>\n')
testlog.write(' %s\n' % ServerBuildId)
testlog.write(' </buildid>\n')
testlog.write(' <revision>\n')
testlog.write(' %s\n' % ServerSvnRevision)
- testlog.write(' </revision>\n')
+ testlog.write(' </revision>\n')
testlog.write(' <platform>\n')
testlog.write(' %s\n' % ServerSystemOS)
testlog.write(' </platform>\n')
@@ -353,10 +353,10 @@
testlog.write(' </jvm-label>\n')
testlog.write(' <jvm-vendor>\n')
testlog.write(' %s\n' % ServerJVMVendor)
- testlog.write(' </jvm-vendor>\n')
+ testlog.write(' </jvm-vendor>\n')
testlog.write(' <tests-dir>\n')
testlog.write(' %s\n' % logsDir)
- testlog.write(' </tests-dir>\n')
+ testlog.write(' </tests-dir>\n')
testlog.write(' </identification>\n')
testlog.write(' </functional-tests>\n')
testlog.write('</qa>\n')
--
Gitblit v1.10.0