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

al_xipe
30.07.2007 c6ab616512c401e11942d8127757882940547f8b
 1. addition of a 10 second sleep to fix a windows file lock issue on restart
2. a property to bypass proxy detection when running tests
3. display of the functional tests success rate in the ant text output
4. declaration of NO_CHECK variable in runTestJob.xml
5. fool proofing runTestJob.xml in the way it parses the testcase name (in case it does not conform to the implicit naming convention)
6. fix the testcase name for the sample test suite
3 files modified
37 ■■■■ changed files
opends/tests/functional-tests/staf-installer.xml 16 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/testcases/runTestJob.xml 19 ●●●● patch | view | raw | blame | history
opends/tests/functional-tests/testcases/sample/sample.xml 2 ●●● patch | view | raw | blame | history
opends/tests/functional-tests/staf-installer.xml
@@ -109,7 +109,7 @@
<!-- Usage section - bottom  -->
    
<!-- Downloader section - top    -->
  <target name="download-do-prepare-check-proxy">
  <target name="download-do-prepare-check-proxy" unless="proxy.disabled">
    <echo>Checking for proxy [${proxy.host}:${proxy.port}] as user [${proxy.user}].</echo>
    <echo>Note: If these values do not match your environment, </echo>
    <echo>      please use the 'configure' target</echo>
@@ -716,6 +716,7 @@
      </filterchain>
    </copy>
    <property file="${staf.tmp.dir}/percentage.properties"/>
    <echo>Test Success Rate: ${test.percentage}%</echo>
  </target>
  <target name="send-mail" if="email.send" depends="send-mail-get-percentage">
@@ -1112,6 +1113,7 @@
  <target name="restart">
    <antcall target="stop" inheritAll="false" />
    <sleep seconds="10"                        />
    <antcall target="start" inheritAll="false" />
  </target>
<!--  Macros section - bottom -->
@@ -1166,4 +1168,16 @@
      <replacevalue></replacevalue>
    </replace>
  </target>
  <target name="generate-report">
    <tstamp>
      <format property="tstamp.today" pattern="yyyyMMdd"/>
    </tstamp>
    <fileset id="resultxml" file="${tstamp.today}-*/**/reports/results.xml" />
    <xslt processor="trax"
          in="C:\Users\arnaud\.hudson\jobs\opends-vista-functional-tests\workspace\opends\tests\functional-run\tmp\20070726-234928\Windows-x86-jvm1.5\reports\results.xml"
          out="${staf.tmp.dir}/results.html"
          style="shared/xsl/gen-alltests-report.xsl">
    </xslt>
  </target>
</project>
opends/tests/functional-tests/testcases/runTestJob.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "../../shared/stax.dtd">
<!DOCTYPE stax SYSTEM "../shared/stax.dtd">
<!--
 ! CDDL HEADER START
 !
@@ -62,6 +62,15 @@
      <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
        file="'%s/stafcmd.xml' % (TESTS_FUNCTIONS_DIR)" />
        
      <!--
        dirty workaround because utils.xml now depends on environment.xml
        to avoid loading environment.xml I'll just set the required vars here
        allegedly ugly
        -=arnaud=-
      -->
      <script>
        NO_CHECK = 'noCheck'
      </script>
      <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
        file="'%s/utils.xml' % (TESTS_FUNCTIONS_DIR)" />        
        
@@ -358,10 +367,16 @@
        for tcname in testCaseList:
          if testDict.has_key(tcname):
            tcnamesplit=tcname.split(":")
            if tcnamesplit[0]:
            testgroup=tcnamesplit[0]
              if tcnamesplit[1]:
            testsuite=tcnamesplit[1]
              else:
                testsuite=testgroup
            else:
              testgroup=tcname
              testsuite=tcname
            
            if testDict[tcname].has_key('pass'):
              tcpass=testDict[tcname]['pass']
opends/tests/functional-tests/testcases/sample/sample.xml
@@ -96,7 +96,7 @@
      #@TestPostamble             none
      #@TestResult                Success if OpenDS returns 0
    -->
    <testcase name="'%s' % STAXCurrentFunction">
    <testcase name="'%s: %s: %s' % (CurrentTestPath['group'],CurrentTestPath['suite'],STAXCurrentFunction)">
      <sequence>
        <call function="'testCase_Preamble'" />
        <call function="'SearchObject'">