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

andrug
04.53.2008 a3f86f69131204838ca54ab89f7add92044cf1fc
update following previous commit,Build Client in unique directory, avoid conflict if same client is run several time at the same time
4 files modified
81 ■■■■■ changed files
opends/tests/system-tests/clients/modifyLoad/build.ksh 4 ●●● patch | view | raw | blame | history
opends/tests/system-tests/clients/modifyLoad/modifyLoad.xml 36 ●●●● patch | view | raw | blame | history
opends/tests/system-tests/clients/searchLoad/build.ksh 4 ●●● patch | view | raw | blame | history
opends/tests/system-tests/clients/searchLoad/searchLoad.xml 37 ●●●● patch | view | raw | blame | history
opends/tests/system-tests/clients/modifyLoad/build.ksh
@@ -27,10 +27,12 @@
export CLASSPATH=$CLASSPATH:../LDAPjdk/ldapjdk.jar
mkdir -p $COMPILDIR
echo "Compiling classes..."
javac src/*.java -d .
javac src/*.java -d $COMPILDIR
[ $? -ne 0 ] && return 1
echo "Creating jarfile"
cd $COMPILDIR
jar cvf modify.jar *.class
[ $? -ne 0 ] && return 1
echo "Cleanup"
opends/tests/system-tests/clients/modifyLoad/modifyLoad.xml
@@ -62,7 +62,10 @@
      <!-- get the ldap instance parameters                     -->
      
      <script>
        outFile = '%s/client_modifyLoad_%s.txt' % (LOG_DIR,client.getId())
        compilDir = '%s/%s_%s' % (workingDir,client.getHost(),client.getId())
        outFile = '%s/client_modifyLoad_id%s.txt' % \
                  (client.getLogDir(),client.getId())
        cParams = client.getParams()
        serverInstanceFromClient = cParams[0][1]
        baseDn = cParams[1][1]
@@ -142,7 +145,8 @@
          </script>
          <call function="'writeEndTagOperation'">{'fileFd'  : fileFd}</call>
          
          <!-- ==== build client : run build.ksh file ==== -->
          <!-- ==== Build client : run build.ksh file ==== -->
          <call function="'writeStartTagOperation'">
          { 'tagName' : 'build',
            'fileFd'  : fileFd }
@@ -152,13 +156,14 @@
           'fileFd'  : fileFd}
          </call>
          
          <!-- Build Client in unique directory (compilDir), avoid          -->
          <!-- conflict if same client is run several time at the same time -->
          <process name="'%s: build %s' % (client.getHost(),client.getName())">
            <location>client.getHost()</location>
            <command mode="'shell'">'./build.ksh'</command>
            <parms/>
            <workdir>workingDir</workdir>
            <envs>['PATH=%s:/bin:/usr/bin' % JAVA_HOME]</envs>
            <envs>['PATH=%s:/bin:/usr/bin' % JAVA_HOME,'COMPILDIR=%s' % compilDir]</envs>
            <stderr mode="'stdout'"/>
            <stdout/>
            <returnstdout/>
@@ -197,8 +202,7 @@
            cParam = '%s -XX:NewRatio=1 -XX:SurvivorRatio=100' % cParam
            cParam = '%s -cp %s/clients/LDAPjdk/ldapjdk.jar' \
                      % (cParam,LOCAL_TESTS_DIR)
            cParam = '%s:%s/clients/searchLoad/search.jar' \
                      % (cParam,LOCAL_TESTS_DIR)
            cParam = '%s:%s/modify.jar' % (cParam,compilDir)
            cParam = '%s Client %s' % (cParam,parms)
            
            titleName = '%s: run %s on %s' % \
@@ -254,26 +258,6 @@
          </call>
          
          
          <!-- ==== Copy output file in main log directory ==== -->
          <script>
            clientHostFullName = '%s%s' % (client.getHost(),DOMAIN[0])
          </script>
          <if expr="clientHostFullName != STAXServiceMachine">
            <sequence>
              <call function="'copyFile'">
                {
                  'location'   : client.getHost(),
                  'remoteHost' : STAXServiceMachine,
                  'srcFile'    : outFile,
                  'destFile'   : outFile,
                  'fileFd'     : fileFd
                }
              </call>
              <script>
                errNum += STAXResult[0]
              </script>
            </sequence>
          </if>
        </sequence>
      </else>
      </if>
opends/tests/system-tests/clients/searchLoad/build.ksh
@@ -26,10 +26,12 @@
#      Copyright 2008 Sun Microsystems, Inc.
export CLASSPATH=$CLASSPATH:../LDAPjdk/ldapjdk.jar
mkdir -p $COMPILDIR
echo "Compiling classes..."
javac src/*.java -d .
javac src/*.java -d $COMPILDIR
[ $? -ne 0 ] && return 1
echo "Creating jarfile"
cd $COMPILDIR
jar cvf search.jar *.class
[ $? -ne 0 ] && return 1
echo "Cleanup"
opends/tests/system-tests/clients/searchLoad/searchLoad.xml
@@ -62,7 +62,10 @@
      <!-- get the ldap instance parameters                     -->
      
      <script>
        outFile = '%s/client_searchLoad_%s.txt' % (LOG_DIR,client.getId())
        compilDir = '%s/%s_%s' % (workingDir,client.getHost(),client.getId())
        outFile = '%s/client_searchLoad_id%s.txt' % \
                  (client.getLogDir(),client.getId())
        cParams = client.getParams()
        serverInstanceFromClient = cParams[0][1]
        baseDn = cParams[1][1]
@@ -79,7 +82,7 @@
          
        else:
          # remove sec, try to finish before timer kill -9 the client
          duration = duration - 10
          duration = duration - 20
          
          parms=[]
          parms.append('-h %s -p %s' % \
@@ -142,7 +145,8 @@
          </script>
          <call function="'writeEndTagOperation'">{'fileFd'  : fileFd}</call>
          
          <!-- ==== build client : run build.ksh file ==== -->
          <!-- ==== Build client : run build.ksh file ==== -->
          <call function="'writeStartTagOperation'">
          { 'tagName' : 'build',
            'fileFd'  : fileFd }
@@ -152,13 +156,14 @@
           'fileFd'  : fileFd}
          </call>
          
          <!-- Build Client in unique directory (compilDir), avoid          -->
          <!-- conflict if same client is run several time at the same time -->
          <process name="'%s: build %s' % (client.getHost(),client.getName())">
            <location>client.getHost()</location>
            <command mode="'shell'">'./build.ksh'</command>
            <parms/>
            <workdir>workingDir</workdir>
            <envs>['PATH=%s:/bin:/usr/bin' % JAVA_HOME]</envs>
            <envs>['PATH=%s:/bin:/usr/bin' % JAVA_HOME,'COMPILDIR=%s' % compilDir ]</envs>
            <stderr mode="'stdout'"/>
            <stdout/>
            <returnstdout/>
@@ -196,7 +201,7 @@
            cParam = '-client -Xmx1G -Xms1G'
            cParam = '%s -XX:NewRatio=1 -XX:SurvivorRatio=100' % cParam
            cParam = '%s -cp %s/clients/LDAPjdk/ldapjdk.jar' % (cParam,LOCAL_TESTS_DIR)
            cParam = '%s:%s/clients/searchLoad/search.jar' % (cParam,LOCAL_TESTS_DIR)
            cParam = '%s:%s/search.jar' % (cParam,compilDir)
            cParam = '%s Client %s' % (cParam,parms)
            
            titleName = '%s: run %s on %s' % \
@@ -249,26 +254,6 @@
           'fileFd'  : fileFd}
          </call>
          
          <!-- ==== Copy output file in main log directory ==== -->
          <script>
            clientHostFullName = '%s%s' % (client.getHost(),DOMAIN[0])
          </script>
          <if expr="clientHostFullName != STAXServiceMachine">
            <sequence>
              <call function="'copyFile'">
                {
                  'location'   : client.getHost(),
                  'remoteHost' : STAXServiceMachine,
                  'srcFile'    : outFile,
                  'destFile'   : outFile,
                  'fileFd'     : fileFd
                }
              </call>
              <script>
                errNum += STAXResult[0]
              </script>
            </sequence>
          </if>
        </sequence>
      </else>
      </if>