Changeset 38981


Ignore:
Timestamp:
2024-05-02T14:50:21+12:00 (2 weeks ago)
Author:
anupama
Message:

Tabbing final target.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/build.xml

    r38980 r38981  
    48824882  </target>
    48834883   
    4884     <target name="run-collection-tests">
    4885         <if><bool><not><available file="${basedir}/ext/testing" type="dir"/></not></bool>
    4886             <fail>The testing extension is not available. This is required to perform the tests. It can be acquired from SVN by running the command "svn co https://svn.greenstone.org/gs3-extensions/testing/trunk/src testing" in the ext directory of your Greenstone 3 installation. </fail>
    4887         </if>
    4888         <for param="testjar">
    4889             <path>
    4890                 <fileset dir="${basedir}" includes="web/sites/*/collect/*/tests/tests.jar"/>
    4891             </path>
    4892             <sequential>
    4893                 <echo>Testing @{testjar}</echo>
    4894                 <java classname="org.junit.runner.JUnitCore" fork="true">
    4895                     <!--https://stackoverflow.com/questions/38676719/selenium-using-java-the-path-to-the-driver-executable-must-be-set-by-the-webdr-->
    4896                     <sysproperty key="webdriver.gecko.driver" path="${basedir}/ext/testing/geckodriver"/>
    4897                     <arg value="gstests.TestClass"/>
    4898                     <jvmarg value="-DSERVERURL=${default.server.protocol}://${tomcat.server}:${default.tomcat.port}${app.path}${server.default.servlet} "/>
    4899                     <classpath>
    4900                         <fileset dir="${basedir}/ext/testing/lib/java">
    4901                             <include name="*.jar"/>
    4902                         </fileset>
    4903                         <files includes="@{testjar}"/>
    4904                     </classpath>
    4905                 </java>
    4906             </sequential>
    4907         </for>
    4908     </target>
    4909    
    4910     <target name="build-collection-tests">
    4911         <if><bool><not><available file="${basedir}/ext/testing" type="dir"/></not></bool>
    4912             <fail>The testing extension is not available. This is required to perform the tests. It can be acquired from SVN by running the command "svn co https://svn.greenstone.org/gs3-extensions/testing/trunk/src testing" in the ext directory of your Greenstone 3 installation. </fail>
    4913         </if>
    4914         <for param="compiledir">
    4915             <path>
    4916                 <dirset dir="${basedir}" includes="web/sites/*/collect/*/tests/src"/>
    4917             </path>
    4918             <sequential>
    4919                 <echo>Compiling @{compiledir}</echo>
    4920                 <if><bool><not><available file="@{compiledir}/../build" type="dir"/></not></bool>
    4921                     <mkdir dir="@{compiledir}/../build"/>
    4922                 </if>
    4923                 <javac srcdir="@{compiledir}"
    4924                        destdir="@{compiledir}/../build"
    4925                        includeantruntime="${compile.includeantruntime}"
    4926                        debug="${compile.debug}"
    4927                        deprecation="${compile.deprecation}"
    4928                        optimize="${compile.optimize}"
     4884  <target name="run-collection-tests">
     4885    <if><bool><not><available file="${basedir}/ext/testing" type="dir"/></not></bool>
     4886    <fail>The testing extension is not available. This is required to perform the tests. It can be acquired from SVN by running the command "svn co https://svn.greenstone.org/gs3-extensions/testing/trunk/src testing" in the ext directory of your Greenstone 3 installation. </fail>
     4887    </if>
     4888    <for param="testjar">
     4889      <path>
     4890    <fileset dir="${basedir}" includes="web/sites/*/collect/*/tests/tests.jar"/>
     4891      </path>
     4892      <sequential>
     4893    <echo>Testing @{testjar}</echo>
     4894    <java classname="org.junit.runner.JUnitCore" fork="true">
     4895      <!--https://stackoverflow.com/questions/38676719/selenium-using-java-the-path-to-the-driver-executable-must-be-set-by-the-webdr-->
     4896      <sysproperty key="webdriver.gecko.driver" path="${basedir}/ext/testing/geckodriver"/>
     4897      <arg value="gstests.TestClass"/>
     4898      <jvmarg value="-DSERVERURL=${default.server.protocol}://${tomcat.server}:${default.tomcat.port}${app.path}${server.default.servlet} "/>
     4899      <classpath>
     4900        <fileset dir="${basedir}/ext/testing/lib/java">
     4901          <include name="*.jar"/>
     4902        </fileset>
     4903        <files includes="@{testjar}"/>
     4904      </classpath>
     4905    </java>
     4906      </sequential>
     4907    </for>
     4908  </target>
     4909 
     4910  <target name="build-collection-tests">
     4911    <if><bool><not><available file="${basedir}/ext/testing" type="dir"/></not></bool>
     4912    <fail>The testing extension is not available. This is required to perform the tests. It can be acquired from SVN by running the command "svn co https://svn.greenstone.org/gs3-extensions/testing/trunk/src testing" in the ext directory of your Greenstone 3 installation. </fail>
     4913    </if>
     4914    <for param="compiledir">
     4915      <path>
     4916    <dirset dir="${basedir}" includes="web/sites/*/collect/*/tests/src"/>
     4917      </path>
     4918      <sequential>
     4919    <echo>Compiling @{compiledir}</echo>
     4920    <if><bool><not><available file="@{compiledir}/../build" type="dir"/></not></bool>
     4921    <mkdir dir="@{compiledir}/../build"/>
     4922    </if>
     4923    <javac srcdir="@{compiledir}"
     4924           destdir="@{compiledir}/../build"
     4925           includeantruntime="${compile.includeantruntime}"
     4926           debug="${compile.debug}"
     4927           deprecation="${compile.deprecation}"
     4928           optimize="${compile.optimize}"
    49294929                       encoding="${compile.encoding}">
    4930                   <compilerarg line="${compile.javac.flags}"/>
    4931                   <classpath>
    4932                     <fileset dir="${basedir}/ext/testing/lib/java">
    4933                       <include name="*.jar"/>
    4934                     </fileset>
    4935                   </classpath>
    4936                   <include name="gstests/*.java"/>
    4937                 </javac>
    4938                 <jar destfile="@{compiledir}/../tests.jar">
    4939                     <fileset dir="@{compiledir}/../build">
    4940                         <include name="gstests/**"/>
    4941                     </fileset>
    4942                     <manifest>
    4943                         <attribute name="Built-By" value="${user.name}" />
    4944                     </manifest>
    4945                 </jar>
    4946             </sequential>
    4947         </for>
    4948     </target>
     4930      <compilerarg line="${compile.javac.flags}"/>
     4931      <classpath>
     4932        <fileset dir="${basedir}/ext/testing/lib/java">
     4933          <include name="*.jar"/>
     4934        </fileset>
     4935      </classpath>
     4936      <include name="gstests/*.java"/>
     4937    </javac>
     4938    <jar destfile="@{compiledir}/../tests.jar">
     4939      <fileset dir="@{compiledir}/../build">
     4940        <include name="gstests/**"/>
     4941      </fileset>
     4942      <manifest>
     4943        <attribute name="Built-By" value="${user.name}" />
     4944      </manifest>
     4945    </jar>
     4946      </sequential>
     4947    </for>
     4948  </target>
    49494949</project>
Note: See TracChangeset for help on using the changeset viewer.