mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

gary_williams
10.02.2008 05fc9730274b38fa72103b026452fcd5ee22baac
Issue 851: log archiving, reporting and results collection fix test names
3 files modified
20 ■■■■ changed files
opends/tests/staf-tests/shared/functions/utils.xml 2 ●●● patch | view | raw | blame | history
opends/tests/staf-tests/shared/python/common.py 14 ●●●●● patch | view | raw | blame | history
opends/tests/staf-tests/shared/tests/runTestJob.xml 4 ●●● patch | view | raw | blame | history
opends/tests/staf-tests/shared/functions/utils.xml
@@ -1199,7 +1199,7 @@
            line.setAttribute("level", "%s" % level)
            line.setAttribute("message", "%s" % message)
            if level == 'Start':
              tag=message.split(":")[3].strip()
              tag=get_test_name(message.replace('testcase: ',''))
              line.setAttribute("tag", "%s" % tag.lower())
            log.appendChild(line)
          </script>
opends/tests/staf-tests/shared/python/common.py
@@ -40,7 +40,8 @@
            "exception_thrown",
            "directory_server",
            "test_env",
            "staf_service" ]
            "staf_service",
            "get_test_name" ]
class format_testcase:
  'Format the Test name objects'
@@ -537,3 +538,14 @@
    def get_reljavadir(self):
      return self.directory
def get_test_name(name):
  i=2
  __name=''
  __tn=name.split(':')
  while i < len(__tn):
    __name += '%s:' % __tn[i]
    i=i+1
  return __name[0:-1].strip()
opends/tests/staf-tests/shared/tests/runTestJob.xml
@@ -597,12 +597,9 @@
                  tcsuiteshort=tcsuite
              else:
                tcsuite=tcgroup
              if tcnamesplit[2]:
                tcshortname=tcnamesplit[2].strip()
            else:
              tcgroup=tcname
              tcsuite=tcname
              tcshortname=tcname
              tcsuiteshort=tcname
            if testDict[tcname].has_key('pass'):
@@ -640,6 +637,7 @@
          else:
            tcresult='fail'
          tcshortname=get_test_name(tcname)
          tcdurationsecs=test_time().timeToSeconds(tcduration)
          # Create the testgroup element