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

al_xipe
27.53.2007 c9ad78271b5878fa80b879d58cdf734e492ef389
1.fix for functional tests pre-run (Re-enabled cleanup)
2.added get-dtd target
3.ability to see in the email report subject pass/fail status
1 files added
1 files modified
50 ■■■■■ changed files
opends/tests/functional-tests/staf-installer.xml 43 ●●●● patch | view | raw | blame | history
opends/tests/functional-tests/staf-installer/failure.html 7 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/staf-installer.xml
@@ -282,7 +282,9 @@
  <target name="gui"
          depends="status-do"
          description="brings up the stax gui" >
    <!--
    <echo>${java.home}/bin/java -classpath ${staf.install.dir}/services/stax/STAXMon.jar${path.separator}${staf.lib.dir}/JSTAF.jar</echo>
    -->
    <exec
      dir="${staf.install.dir}"
      executable="${java.home}/bin/java"
@@ -509,6 +511,9 @@
      <tstamp>
        <format property="tests.run.time" pattern="yyyy.MM.dd-HH.mm.ss"/>
      </tstamp>
      <!-- clean up some -->
      <delete dir="${staf.logs.dir}"/>
      <delete dir="${staf.tmp.dir}"/>
      <!-- make all the necessary directories for this test run -->
      <mkdir dir="${staf.tmp.dir}"/>
      <mkdir dir="${tests.run.dir}/${tests.run.time}"/>
@@ -605,9 +610,7 @@
    <copy todir="${tests.run.dir}/${tests.run.time}/staf-logs">
      <fileset dir="${staf.home}/logs"/>
    </copy>
    <!--
    <delete dir="${staf.home}/logs" />
    -->
    <echo>Saving report</echo>
    <copy todir="${tests.run.dir}/${tests.run.time}/report">
      <fileset dir="${staf.tmp.dir}">
@@ -635,13 +638,23 @@
        </not>
      </or>
    </condition>
    <condition property="email.file"
               value="${staf.tmp.dir}/results.html"
               else="staf-installer/failure.html">
      <available file="${staf.tmp.dir}/results.html"/>
    </condition>
    <condition property="email.subject"
               value="FT - Run - ${daily.date} - ${os.name} - ${os.arch}"
               else="FT - Failed -${daily.date} - ${os.name} - ${os.arch}">
      <available file="${staf.tmp.dir}/results.html"/>
    </condition>
    <antcall target="send-mail-noauth"/>
    <antcall target="send-mail-withauth"/>
  </target>
  <target name="send-mail-noauth" if="email.send.noauth">
    <mail from="${email.from}" 
          tolist="${email.to}" 
          subject="FT - ${daily.date} - ${os.name} - ${os.arch}"
          subject="${email.subject}"
          files="${staf.tmp.dir}/results.html"
          mailhost="${email.server.host}"
          mailport="${email.server.port}"
@@ -651,7 +664,7 @@
  <target name="send-mail-withauth" unless="email.send.noauth">
    <mail from="${email.from}" 
          tolist="${email.to}" 
          subject="FT - ${daily.date} - ${os.name} - ${os.arch}"
          subject="${email.subject}"
          files="${staf.tmp.dir}/results.html"
          mailhost="${email.server.host}"
          mailport="${email.server.port}"
@@ -964,4 +977,24 @@
    <echoproperties/>
  </target>
  
  <target name="get-dtd" depends="status-do">
    <property name="stax.dtd" value="${staf.home}/stax.dtd"/>
    <exec
      dir="${staf.bin.dir}"
      executable="${staf.executable}"
      output="${stax.dtd}"
      >
      <arg line="LOCAL STAX get dtd"/>
      <env key="CLASSPATH" path="${staf.lib.dir}/JSTAF.jar${path.separator}${e.CLASSPATH}"/>
      <env key="LD_LIBRARY_PATH" value="${staf.lib.dir}"/>
      <env key="STAFCONVDIR" value="${staf.install.dir}/codepage"/>
      <env key="STAFCODEPAGE" value="LATIN_1"/>
    </exec>
    <replace file="${stax.dtd}">
      <replacetoken>Response
--------
</replacetoken>
      <replacevalue></replacevalue>
    </replace>
  </target>
</project>
opends/tests/functional-tests/staf-installer/failure.html
New file
@@ -0,0 +1,7 @@
<html>
  <body>
    <center>
      <img src="http://pangea.stanford.edu/courses/GES41L/motivation/failure.gif">
    </center>
  </body>
</html>