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)
| | |
| | | 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'" /> |
| | |
| | | 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'"> |
| | |
| | | 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'"> |
| | |
| | | </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 |
| | |
| | | '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='' |
| | |
| | | return xml |
| | | |
| | | def appendLog(self, category, log): |
| | | _leftPadding='' |
| | | wrappedLog='' |
| | | while len(log)>100: |
| | | _logChunk=log[:100] |
| | | log=log[100:] |
| | | 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) |
| | |
| | | # 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 |