src-test/build.xml
author Asier Lostalé <asier.lostale@openbravo.com>
Mon, 19 Jun 2017 15:16:26 +0200
changeset 32244 443c3cdbf841
parent 27242 28f34efdae7d
permissions -rw-r--r--
fixed bug 36274: abandoned connection in SessionListener

Detach connection from current thread to allow it to be properly returned
to pool.

This is required whever the thread doing the actio is not handling an standard
request.
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@25986
    16
 * All portions are Copyright (C) 2014-2015 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@27222
    35
    <path refid="test-src-dirs"/>
asier@27216
    36
    <pathelement path="${build.test}" />
asier@27216
    37
  	<pathelement path="${build}" />
asier@24247
    38
    <fileset dir="${base.lib}">
asier@27216
    39
      <include name="**/*.jar" />
asier@27216
    40
    </fileset>
asier@27216
    41
    <fileset dir="${build.core.lib}">
asier@27216
    42
      <include name="openbravo-core.jar" />
asier@27216
    43
    </fileset>
asier@27216
    44
    <fileset dir="${build.trl.lib}">
asier@27216
    45
      <include name="openbravo-trl.jar" />
asier@27216
    46
    </fileset>
asier@27216
    47
    <fileset dir="${build.wad.lib}">
asier@27216
    48
      <include name="openbravo-wad.jar" />
asier@27216
    49
    </fileset>
asier@27216
    50
    <fileset dir="${base.lib}">
asier@27216
    51
      <include name="**/*.jar" />
asier@27216
    52
    </fileset>
asier@27216
    53
    <fileset dir="${base.db}/lib/">
asier@27216
    54
      <include name="**/*.jar" />
asier@24247
    55
    </fileset>
asier@24247
    56
    <fileset dir="${base.modules}">
asier@27216
    57
      <include name="*/lib/**" />
asier@27216
    58
    </fileset>
asier@24247
    59
  </path>
asier@24247
    60
asier@27222
    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@25986
    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@24247
    76
    <junit printsummary="yes" haltonfailure="yes">
asier@27216
    77
      <classpath refid="test.class.path" />
asier@24247
    78
      <formatter type="plain" usefile="no"/>
asier@24247
    79
      <test name="org.openbravo.test.AntTaskTests" haltonfailure="no"/>
asier@24247
    80
    </junit>
asier@24247
    81
  </target>
asier@24247
    82
asier@24247
    83
  <target name="run.all.tests" depends="compile.test, copy.xml">
asier@24247
    84
    <junit printsummary="yes" haltonfailure="yes">
asier@27216
    85
      <classpath refid="test.class.path" />
asier@24247
    86
      <formatter type="plain" usefile="no"/>
asier@24247
    87
      <test name="org.openbravo.test.AllAntTaskTests" haltonfailure="no" outfile="../src/result">
asier@24247
    88
      <formatter type="xml" />
asier@24247
    89
    </test>
asier@24247
    90
    </junit>
asier@24247
    91
  </target>
asier@24247
    92
asier@24247
    93
  <target name="run.quick.tests" depends="compile.test, copy.xml">
asier@24247
    94
    <junit printsummary="yes" haltonfailure="yes">
asier@27216
    95
      <classpath refid="test.class.path" />
asier@24247
    96
      <formatter type="plain" usefile="no"/>
asier@24247
    97
      <test name="org.openbravo.test.AllQuickAntTaskTests" haltonfailure="no"/>
asier@24247
    98
    </junit>
asier@24247
    99
  </target>
asier@24247
   100
asier@27219
   101
  <target name="run.test" depends="compile.test, copy.xml">
asier@27219
   102
    <junit printsummary="yes" haltonfailure="yes">
asier@27219
   103
      <classpath refid="test.class.path" />
asier@27219
   104
      <formatter type="plain" usefile="no"/>
asier@27219
   105
      <test name="${test}" haltonfailure="no"/>
asier@27219
   106
    </junit>
asier@27219
   107
  </target>
asier@27219
   108
asier@24247
   109
  <target name="run.webservice.tests" depends="compile.test, copy.xml">
asier@24247
   110
    <junit printsummary="yes" haltonfailure="yes">
asier@27216
   111
      <classpath refid="test.class.path" />
asier@24247
   112
      <formatter type="plain" usefile="no"/>
asier@24247
   113
      <test name="org.openbravo.test.AllWebserviceTests" haltonfailure="no" outfile="../src/resultws">
asier@24247
   114
        <formatter type="xml" />
asier@24247
   115
      </test>
asier@24247
   116
    </junit>
asier@24247
   117
  </target>
asier@24993
   118
asier@24993
   119
  <target name="run.api.test.javascript" depends="compile.test">
asier@27242
   120
    <taskdef name="jstest" classname="org.openbravo.test.javascript.JavaScriptAntTest" classpathref="test.class.path" />
asier@24993
   121
    <property name="export" value="no" />
asier@24993
   122
    <jstest apiDetailsPath="${api.test.javascript.details}" jsPath="${base.web}/js" export="${export}" />
asier@24993
   123
  </target>
staff@25152
   124
</project>