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

gary_williams
24.21.2007 5803bce4c6dfa25411838f2498b6cbd998103be8
Fix Issue 1498 test report should show build number and date (2)
3 files modified
134 ■■■■ changed files
opends/tests/functional-tests/shared/functions/baselib.xml 2 ●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/functions/environment.xml 126 ●●●● patch | view | raw | blame | history
opends/tests/functional-tests/testcases/runTestJob.xml 6 ●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/functions/baselib.xml
@@ -55,7 +55,7 @@
        DSInfo=directory_server_information()
      </script>
      <message>'Get Information about server %s' % dsPath</message>
      <message>'Get Information about server %s %s' % (mylocation,dsPath)</message>
      <!-- Obtain the variables for the system from start-ds -->          
      <call function="'StartDsWithScript'">
opends/tests/functional-tests/shared/functions/environment.xml
@@ -155,40 +155,100 @@
    <function-prolog>
      This function gets information about the Directory Server  
    </function-prolog>
    <sequence>
      <!-- Install DS into temporary folder -->
      <message>
        'Extract temporary DS zip archive to %s.' % (TMPDIR)
      </message>
      <call function="'unZipFile'">
        { 'location' : STAF_LOCAL_HOSTNAME,
          'zipfile'  : '%s/%s' % (ZIPPATH,ZIPNAME),
          'unzipdir' : '%s' % TMPDIR }
      </call>
      <!-- Get Directory Server Variables -->
      <call function="'GetDirectoryServerVars'">
        { 'location'  : STAF_LOCAL_HOSTNAME,
          'dsPath'    : '%s/%s' % (TMPDIR,OPENDSNAME)  }
      </call>
      <!-- Set Directory Server Variables -->
      <call function="'SetVar'">
        { 'location'  : STAF_LOCAL_HOSTNAME,
          'type'      : 'shared',
          'variable'  : 'ServerInfo=%s' % DSInfoServersDict }
      </call>
      <!-- Uninstall DS from temporary folder -->
      <message>'Remove temporary DS zip archive'</message>
      <call function="'deleteFolder'">
        { 'location'   : STAF_LOCAL_HOSTNAME ,
          'foldername' : '%s/%s' % (TMPDIR,OPENDSNAME) }
      </call>
    </sequence>
     <try>
      <sequence>
        <script>
          InstanceInstallDir= '%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)
        </script>
        <!-- Copy DS zip archive to remote host-->
        <message>
          'Copy DS zip archive to %s %s.zip.' % (STAF_REMOTE_HOSTNAME,InstanceInstallDir)
        </message>
        <call function="'copyFile'">
          { 'srcfile'    : '%s/%s' % (ZIPPATH,ZIPNAME),
            'destfile'   : '%s.zip' % InstanceInstallDir,
            'remotehost' : STAF_REMOTE_HOSTNAME }
        </call>
        <if expr="RC != 0">
          <return>RC</return>
        </if>
        <!-- Install DS into temporary folder -->
        <message>
          'Extract temporary DS zip archive to %s %s.' % (STAF_REMOTE_HOSTNAME,DIRECTORY_INSTANCE_DIR)
        </message>
        <call function="'unZipFile'">
          { 'location' : STAF_REMOTE_HOSTNAME,
            'zipfile'  : '%s.zip' % InstanceInstallDir,
            'unzipdir' : '%s' % DIRECTORY_INSTANCE_DIR }
        </call>
        <if expr="RC != 0">
          <return>RC</return>
        </if>
        <!-- Get Directory Server Variables -->
        <call function="'GetDirectoryServerVars'">
          { 'location'  : STAF_REMOTE_HOSTNAME,
            'dsPath'    : '%s' % InstanceInstallDir  }
        </call>
        <if expr="RC != 0">
          <throw exception="'TestExceptionResultFailed'">
            'Invalid Result %s' % RC
          </throw>
        </if>
        <!-- Set Directory Server Variables -->
        <call function="'SetVar'">
          { 'location'  : STAF_REMOTE_HOSTNAME,
            'type'      : 'shared',
            'variable'  : 'ServerInfo=%s' % DSInfoServersDict }
        </call>
        <if expr="RC != 0">
          <throw exception="'TestExceptionResultFailed'">
            'Invalid Result %s' % RC
          </throw>
        </if>
        <!-- Uninstall DS from temporary folder -->
        <message>
          'Remove temporary DS zip archive from %s %s' % (STAF_REMOTE_HOSTNAME,InstanceInstallDir)
        </message>
        <call function="'deleteFolder'">
          { 'location'   : STAF_REMOTE_HOSTNAME ,
            'foldername' : '%s' % InstanceInstallDir }
        </call>
        <call function="'deleteFile'">
          { 'location'   : STAF_REMOTE_HOSTNAME ,
            'foldername' : '%s.zip' % InstanceInstallDir }
        </call>
      </sequence>
    <catch exception="'TestExceptionResultFailed'" typevar="eType" var="eInfo">
      <sequence>
        <message>'caught %s with %s' % (eType,eInfo)</message>
        <message>
          'Remove temporary DS zip archive from %s %s' % (STAF_REMOTE_HOSTNAME,InstanceInstallDir)
        </message>
        <call function="'deleteFolder'">
          { 'location'   : STAF_REMOTE_HOSTNAME ,
            'foldername' : '%s' % InstanceInstallDir }
        </call>
      </sequence>
    </catch>
    </try>
  </function>
    
    
opends/tests/functional-tests/testcases/runTestJob.xml
@@ -91,8 +91,8 @@
        ServerSystemName='unknown'
        ServerSvnRevision='unknown'
                  
        if ServersInfoDict.has_key('%s/%s' % (TMPDIR,OPENDSNAME)):
          ServerInfoDict=ServersInfoDict['%s/%s' % (TMPDIR,OPENDSNAME)]
        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):
@@ -131,7 +131,7 @@
            ServerSvnRevision=ServerInfoDict[ServerInfoKey]  
                                                                                                
        else:
          ServerInfoDict='No key found (%s/%s)' % (TMPDIR,OPENDSNAME)
          ServerInfoDict='No key found (%s/%s)' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)
                    
      </script>