src-test/build.xml
author Asier Lostalé <asier.lostale@openbravo.com>
Wed, 06 Feb 2019 14:36:33 +0100
changeset 35436 7d8efc4cd8e1
parent 35218 759dcd28bd8d
permissions -rw-r--r--
related to issue 40102: combined admin and cross org modes

Added test case proving it is possible to combine both modes.
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@33675
    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@27102
    35
    <path refid="test-src-dirs"/>
asier@27096
    36
    <pathelement path="${build.test}" />
asier@27096
    37
  	<pathelement path="${build}" />
asier@24247
    38
    <fileset dir="${base.lib}">
asier@27096
    39
      <include name="**/*.jar" />
asier@27096
    40
    </fileset>
asier@27096
    41
    <fileset dir="${build.core.lib}">
asier@27096
    42
      <include name="openbravo-core.jar" />
asier@27096
    43
    </fileset>
asier@27096
    44
    <fileset dir="${build.trl.lib}">
asier@27096
    45
      <include name="openbravo-trl.jar" />
asier@27096
    46
    </fileset>
asier@27096
    47
    <fileset dir="${build.wad.lib}">
asier@27096
    48
      <include name="openbravo-wad.jar" />
asier@27096
    49
    </fileset>
asier@27096
    50
    <fileset dir="${base.lib}">
asier@27096
    51
      <include name="**/*.jar" />
asier@27096
    52
    </fileset>
asier@27096
    53
    <fileset dir="${base.db}/lib/">
asier@27096
    54
      <include name="**/*.jar" />
asier@24247
    55
    </fileset>
asier@24247
    56
    <fileset dir="${base.modules}">
asier@27096
    57
      <include name="*/lib/**" />
asier@27096
    58
    </fileset>
javier@35218
    59
    <pathelement path="${base.src.test}/src"/>
asier@24247
    60
  </path>
asier@24247
    61
asier@27102
    62
  <target name="compile.test" depends="sqlc,generate.entities.quick">
asier@24247
    63
  	 <mkdir dir="${build.test}"/>
asier@24247
    64
     <javac destdir="${build.test}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" nowarn="${friendlyWarnings}" includeantruntime="false">
asier@24247
    65
      <src refid="test-src-dirs"/>
asier@24247
    66
      <classpath refid="test.class.path" />
asier@24247
    67
    </javac>
asier@24247
    68
  </target>
asier@24247
    69
javier@35218
    70
  <target name="run.tests" depends="compile.test">
asier@33675
    71
    <junit printsummary="no" haltonfailure="yes" showoutput="yes" outputtoformatters="false">
asier@27096
    72
      <classpath refid="test.class.path" />
asier@24247
    73
      <test name="org.openbravo.test.AntTaskTests" haltonfailure="no"/>
asier@24247
    74
    </junit>
asier@24247
    75
  </target>
asier@24247
    76
javier@35218
    77
  <target name="run.all.tests" depends="compile.test">
asier@33675
    78
    <junit printsummary="no" haltonfailure="yes" showoutput="yes" outputtoformatters="false">
asier@27096
    79
      <classpath refid="test.class.path" />
asier@24247
    80
      <test name="org.openbravo.test.AllAntTaskTests" haltonfailure="no" outfile="../src/result">
asier@24247
    81
      <formatter type="xml" />
asier@24247
    82
    </test>
asier@24247
    83
    </junit>
asier@24247
    84
  </target>
asier@24247
    85
javier@35218
    86
  <target name="run.quick.tests" depends="compile.test">
asier@33675
    87
    <junit printsummary="no" haltonfailure="yes" showoutput="yes" outputtoformatters="false">
asier@27096
    88
      <classpath refid="test.class.path" />
asier@24247
    89
      <test name="org.openbravo.test.AllQuickAntTaskTests" haltonfailure="no"/>
asier@24247
    90
    </junit>
asier@24247
    91
  </target>
asier@24247
    92
javier@35218
    93
  <target name="run.test" depends="compile.test">
asier@33675
    94
    <junit printsummary="no" haltonfailure="yes" showoutput="yes" outputtoformatters="false">
asier@27099
    95
      <classpath refid="test.class.path" />
asier@32599
    96
      <test name="${test}" haltonfailure="no" outfile="../src/result-${test}">
asier@32599
    97
        <formatter type="xml"/>
asier@32599
    98
      </test>
asier@27099
    99
    </junit>
asier@27099
   100
  </target>
asier@27099
   101
javier@35218
   102
  <target name="run.webservice.tests" depends="compile.test">
asier@33675
   103
    <junit printsummary="no" haltonfailure="yes" showoutput="yes" outputtoformatters="false">
asier@27096
   104
      <classpath refid="test.class.path" />
asier@24247
   105
      <test name="org.openbravo.test.AllWebserviceTests" haltonfailure="no" outfile="../src/resultws">
asier@24247
   106
        <formatter type="xml" />
asier@24247
   107
      </test>
asier@24247
   108
    </junit>
asier@24247
   109
  </target>
staff@25152
   110
</project>