src-test/build.xml
author RM packaging bot <staff.rm@openbravo.com>
Wed, 09 May 2018 17:04:26 +0000
changeset 33941 2be7d3efe606
parent 33676 976f1009134a
child 35219 759dcd28bd8d
permissions -rw-r--r--
CI: update AD_MODULE to version 33940
asier@24247
     1
<?xml version="1.0" encoding="UTF-8" ?>
asier@24247
     2
<!--
asier@24247
     3
 *************************************************************************
asier@24247
     4
 * The contents of this file are subject to the Openbravo Public License 
asier@24247
     5
 * Version 1.1 (the "License"), being the Mozilla Public License 
asier@24247
     6
 * version 1.1  with a permitted attribution clause ; you may not use 
asier@24247
     7
 * this file except in compliance with the License. 
asier@24247
     8
 * You may obtain a copy of the License at  
asier@24247
     9
 * http://www.openbravo.com/legal/license.txt 
asier@24247
    10
 * Software distributed under the License is distributed on an 
asier@24247
    11
 * "AS IS" basis, WITHOUT WARRANTY OF  ANY KIND, either express or 
asier@24247
    12
 * implied. See the License for the specific language governing rights 
asier@24247
    13
 * and  limitations under the License. 
asier@24247
    14
 * The Original Code is Openbravo ERP. 
asier@24247
    15
 * The Initial Developer of the Original Code is Openbravo SLU 
asier@33676
    16
 * All portions are Copyright (C) 2014-2018 Openbravo SLU 
asier@24247
    17
 * All Rights Reserved. 
asier@24247
    18
 * Contributor(s): Openbravo S.L.U.
asier@24247
    19
 ************************************************************************
asier@24247
    20
-->
asier@24247
    21
asier@24247
    22
<project name="openbravo" default="compile.complete" basedir="..">
asier@24247
    23
  <import file="../src/build.xml" />
asier@24247
    24
asier@24247
    25
  <property name="build.test" location="${base.src.test}/build/classes" />
asier@24247
    26
asier@24247
    27
  <path id="test-src-dirs">
asier@24247
    28
    <pathelement path="${base.src.test}" />
asier@24247
    29
    <dirset dir="${base.modules}">
asier@24247
    30
      <include name="*/src-test" />
asier@24247
    31
    </dirset>
asier@24247
    32
  </path>
asier@24247
    33
asier@24247
    34
  <path id="test.class.path">
asier@27144
    35
    <path refid="test-src-dirs"/>
asier@27138
    36
    <pathelement path="${build.test}" />
asier@27138
    37
  	<pathelement path="${build}" />
asier@24247
    38
    <fileset dir="${base.lib}">
asier@27138
    39
      <include name="**/*.jar" />
asier@27138
    40
    </fileset>
asier@27138
    41
    <fileset dir="${build.core.lib}">
asier@27138
    42
      <include name="openbravo-core.jar" />
asier@27138
    43
    </fileset>
asier@27138
    44
    <fileset dir="${build.trl.lib}">
asier@27138
    45
      <include name="openbravo-trl.jar" />
asier@27138
    46
    </fileset>
asier@27138
    47
    <fileset dir="${build.wad.lib}">
asier@27138
    48
      <include name="openbravo-wad.jar" />
asier@27138
    49
    </fileset>
asier@27138
    50
    <fileset dir="${base.lib}">
asier@27138
    51
      <include name="**/*.jar" />
asier@27138
    52
    </fileset>
asier@27138
    53
    <fileset dir="${base.db}/lib/">
asier@27138
    54
      <include name="**/*.jar" />
asier@24247
    55
    </fileset>
asier@24247
    56
    <fileset dir="${base.modules}">
asier@27138
    57
      <include name="*/lib/**" />
asier@27138
    58
    </fileset>
asier@24247
    59
  </path>
asier@24247
    60
asier@27144
    61
  <target name="compile.test" depends="sqlc,generate.entities.quick">
asier@24247
    62
  	 <mkdir dir="${build.test}"/>
asier@24247
    63
     <javac destdir="${build.test}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" nowarn="${friendlyWarnings}" includeantruntime="false">
asier@24247
    64
      <src refid="test-src-dirs"/>
asier@24247
    65
      <classpath refid="test.class.path" />
asier@24247
    66
    </javac>
asier@24247
    67
  </target>
asier@24247
    68
asier@24247
    69
  <target name="copy.xml">
asier@24247
    70
    <copy todir="${build}">
asier@26020
    71
      <fileset dir="${base.src.test}/src" includes="**/*.xml" />
asier@24247
    72
    </copy>
asier@24247
    73
  </target>
asier@24247
    74
asier@24247
    75
  <target name="run.tests" depends="compile.test, copy.xml">
asier@33676
    76
    <junit printsummary="no" haltonfailure="yes" showoutput="yes" outputtoformatters="false">
asier@27138
    77
      <classpath refid="test.class.path" />
asier@24247
    78
      <test name="org.openbravo.test.AntTaskTests" haltonfailure="no"/>
asier@24247
    79
    </junit>
asier@24247
    80
  </target>
asier@24247
    81
asier@24247
    82
  <target name="run.all.tests" depends="compile.test, copy.xml">
asier@33676
    83
    <junit printsummary="no" haltonfailure="yes" showoutput="yes" outputtoformatters="false">
asier@27138
    84
      <classpath refid="test.class.path" />
asier@24247
    85
      <test name="org.openbravo.test.AllAntTaskTests" haltonfailure="no" outfile="../src/result">
asier@24247
    86
      <formatter type="xml" />
asier@24247
    87
    </test>
asier@24247
    88
    </junit>
asier@24247
    89
  </target>
asier@24247
    90
asier@24247
    91
  <target name="run.quick.tests" depends="compile.test, copy.xml">
asier@33676
    92
    <junit printsummary="no" haltonfailure="yes" showoutput="yes" outputtoformatters="false">
asier@27138
    93
      <classpath refid="test.class.path" />
asier@24247
    94
      <test name="org.openbravo.test.AllQuickAntTaskTests" haltonfailure="no"/>
asier@24247
    95
    </junit>
asier@24247
    96
  </target>
asier@24247
    97
asier@27141
    98
  <target name="run.test" depends="compile.test, copy.xml">
asier@33676
    99
    <junit printsummary="no" haltonfailure="yes" showoutput="yes" outputtoformatters="false">
asier@27141
   100
      <classpath refid="test.class.path" />
asier@32635
   101
      <test name="${test}" haltonfailure="no" outfile="../src/result-${test}">
asier@32635
   102
        <formatter type="xml"/>
asier@32635
   103
      </test>
asier@27141
   104
    </junit>
asier@27141
   105
  </target>
asier@27141
   106
asier@24247
   107
  <target name="run.webservice.tests" depends="compile.test, copy.xml">
asier@33676
   108
    <junit printsummary="no" haltonfailure="yes" showoutput="yes" outputtoformatters="false">
asier@27138
   109
      <classpath refid="test.class.path" />
asier@24247
   110
      <test name="org.openbravo.test.AllWebserviceTests" haltonfailure="no" outfile="../src/resultws">
asier@24247
   111
        <formatter type="xml" />
asier@24247
   112
      </test>
asier@24247
   113
    </junit>
asier@24247
   114
  </target>
staff@25286
   115
</project>