From f3f0db71ca1b8185be5125cd597c1367095edf9e 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)
---
opends/tests/functional-tests/shared/functions/utils.xml | 29 ++++++++++-------------------
1 files changed, 10 insertions(+), 19 deletions(-)
diff --git a/opends/tests/functional-tests/shared/functions/utils.xml b/opends/tests/functional-tests/shared/functions/utils.xml
index 6708ac8..89ff9cd 100755
--- a/opends/tests/functional-tests/shared/functions/utils.xml
+++ b/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