From a6cee28549755334a1dde4808594d0c8860d85d9 Mon Sep 17 00:00:00 2001
From: al_xipe <al_xipe@localhost>
Date: Wed, 29 Aug 2007 09:20:29 +0000
Subject: [PATCH] 1. fix for wrapping log lines around. Now take pre-existing \n into account 2. removed python unused Matcher class 3. fix for testcase identification to start dumping the STAX log into test-log.xml 4. fix for indexes test cases (added -n to dsconfig)
---
opendj-sdk/opends/tests/functional-tests/shared/functions/utils.xml | 29 ++++++++++-------------------
opendj-sdk/opends/tests/functional-tests/shared/functions/dsconfig.xml | 6 +++---
2 files changed, 13 insertions(+), 22 deletions(-)
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/functions/dsconfig.xml b/opendj-sdk/opends/tests/functional-tests/shared/functions/dsconfig.xml
index bbe82b6..f6c8bc5 100755
--- a/opendj-sdk/opends/tests/functional-tests/shared/functions/dsconfig.xml
+++ b/opendj-sdk/opends/tests/functional-tests/shared/functions/dsconfig.xml
@@ -1308,7 +1308,7 @@
dsconfigCmd=''
dsBinPath='%s/%s' % (dsPath,fileFolder)
dsconfigCmd='%s/%s%s' % (dsBinPath,DSCONFIG,fileExt)
- dsconfigParams = 'create-je-index -h %s -p %s -D "%s" -w %s --backend-name %s --index-name %s --set index-type:%s' % (host,port,rootDN,rootPwd,backendID, indexAttribute, ' --set index-type:'.join(indexTypes))
+ dsconfigParams = 'create-je-index -n -h %s -p %s -D "%s" -w %s --backend-name %s --index-name %s --set index-type:%s' % (host,port,rootDN,rootPwd,backendID, indexAttribute, ' --set index-type:'.join(indexTypes))
</script>
<call function="'_dsconfigCommonArgs'" />
@@ -1439,7 +1439,7 @@
operationArguments = indexProperty
if indexPropertyValue:
operationArguments = '%s:%s' % (indexProperty, indexPropertyValue)
- dsconfigParams = 'set-je-index-prop -h %s -p %s -D "%s" -w %s --backend-name %s --index-name %s --%s %s' % ( host, port, rootDN, rootPwd, backendID, indexAttribute, operation, operationArguments )
+ dsconfigParams = 'set-je-index-prop -n -h %s -p %s -D "%s" -w %s --backend-name %s --index-name %s --%s %s' % ( host, port, rootDN, rootPwd, backendID, indexAttribute, operation, operationArguments )
</script>
<call function="'_dsconfigCommonArgs'" />
<call function="'runCommand'">
@@ -1537,7 +1537,7 @@
dsconfigCmd=''
dsBinPath='%s/%s' % (dsPath,fileFolder)
dsconfigCmd='%s/%s%s' % (dsBinPath,DSCONFIG,fileExt)
- dsconfigParams = 'delete-je-index -h %s -p %s -D "%s" -w %s --backend-name %s --index-name %s' % (host,port,rootDN,rootPwd,backendID, indexAttribute)
+ dsconfigParams = 'delete-je-index -n -h %s -p %s -D "%s" -w %s --backend-name %s --index-name %s' % (host,port,rootDN,rootPwd,backendID, indexAttribute)
</script>
<call function="'_dsconfigCommonArgs'" />
<call function="'runCommand'">
diff --git a/opendj-sdk/opends/tests/functional-tests/shared/functions/utils.xml b/opendj-sdk/opends/tests/functional-tests/shared/functions/utils.xml
index 6708ac8..89ff9cd 100755
--- a/opendj-sdk/opends/tests/functional-tests/shared/functions/utils.xml
+++ b/opendj-sdk/opends/tests/functional-tests/shared/functions/utils.xml
@@ -117,7 +117,7 @@
</sequence>
</if>
<message log="1">
- 'SUCCESS: RC=%s, Expected %s, Result=%s' % (returncode,expected,result)
+ 'SUCCESS: RC=%s, Expected %s' % (returncode,expected)
</message>
<script>
RC=0
@@ -626,16 +626,6 @@
'endat' : testcaseEndTime }
</call>
<script>
- import re
-
- class Matcher:
- def search(self, r,s):
- _tmp = re.compile(r)
- self.value = _tmp.match(s)
- return self.value
- def __getitem__(self, i):
- return self.value.group(i)
-
class Test:
def __init__(self, group, suite, fullname, start, stop, failures, successes, issues, duration):
self.log=''
@@ -692,14 +682,15 @@
return xml
def appendLog(self, category, log):
- _leftPadding=''
wrappedLog=''
- while len(log)>100:
- _logChunk=log[:100]
- log=log[100:]
- wrappedLog+='%s%s%s' % (_leftPadding,_logChunk,newLine)
- _leftPadding='... '
- wrappedLog += '%s%s%s' % (_leftPadding,log,newLine)
+ for _line in log.splitlines():
+ _leftPadding=''
+ while len(_line)>100:
+ _logChunk=line[:100]
+ _line=_line[100:]
+ wrappedLog+='%s%s%s' % (_leftPadding,_logChunk,newLine)
+ _leftPadding='... '
+ wrappedLog += '%s%s%s' % (_leftPadding,log,newLine)
if category == 'access':
self.access+=wrappedLog
elif category == 'error':
@@ -737,7 +728,7 @@
# test case. this is especially useful for tests that execute
# within the same second (that is the resolution of the STAF
# log facility)
- if tmp[3] == thisTest.getName():
+ if thisTest.getName().startswith(tmp[3]):
doLog=True
# parse the server's error log
--
Gitblit v1.10.0