~ubuntu-branches/ubuntu/utopic/libasm4-java/utopic

« back to all changes in this revision

Viewing changes to .pc/rm-sigtest.patch/test/build.xml

  • Committer: Package Import Robot
  • Author(s): Damien Raude-Morvan
  • Date: 2013-01-08 22:08:59 UTC
  • Revision ID: package-import@ubuntu.com-20130108220859-3n1oj2ns5m7cf0ub
Tags: 4.1-1
* Team upload.
* New package libasm4-java (ITP: #623950) based on libasm3-java packaging.
  ASM 4.x is need for Java 7 support (ie. for class format 51).
* d/control: Set Aditya Vaidya and myself as Uploaders.
* d/control: Import packaging in Alioth Git, so update Vcs-* headers.
* d/patches/remove-bnd.diff: Drop usage of BND to create OSGi metadata
  and use pre-generated MANIFEST from debian/osgi/.
* d/maven.rules: Replace poms version by "4.x".

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!--
 
2
 ! ASM: a very small and fast Java bytecode manipulation framework
 
3
 ! Copyright (c) 2000-2011 INRIA, France Telecom
 
4
 ! All rights reserved.
 
5
 !
 
6
 ! Redistribution and use in source and binary forms, with or without
 
7
 ! modification, are permitted provided that the following conditions
 
8
 ! are met:
 
9
 ! 1. Redistributions of source code must retain the above copyright
 
10
 !    notice, this list of conditions and the following disclaimer.
 
11
 ! 2. Redistributions in binary form must reproduce the above copyright
 
12
 !    notice, this list of conditions and the following disclaimer in the
 
13
 !    documentation and/or other materials provided with the distribution.
 
14
 ! 3. Neither the name of the copyright holders nor the names of its
 
15
 !    contributors may be used to endorse or promote products derived from
 
16
 !    this software without specific prior written permission.
 
17
 !
 
18
 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 
19
 ! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 
20
 ! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 
21
 ! ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 
22
 ! LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 
23
 ! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 
24
 ! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 
25
 ! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 
26
 ! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 
27
 ! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 
28
 ! THE POSSIBILITY OF SUCH DAMAGE.
 
29
-->
 
30
 
 
31
<project name="test" default="test">
 
32
 
 
33
  <!-- ==================================== -->
 
34
  <!-- ======== PROPERTY DEFINITION ======= -->
 
35
  <!-- ==================================== -->
 
36
 
 
37
  <property name="test.conform"   value="${test}/conform"/>
 
38
  <property name="test.perf"      value="${test}/perf"/>
 
39
 
 
40
  <target name="properties">
 
41
    <condition property="asm.test.class" value="">
 
42
      <not><isset property="asm.test.class"/></not>
 
43
    </condition>
 
44
 
 
45
    <condition property="java5">
 
46
      <available classname="java.lang.annotation.Annotation"/> 
 
47
    </condition>
 
48
    
 
49
    <condition property="test-all">
 
50
      <and>
 
51
        <not><isset property="test.type"/></not>
 
52
        <not><isset property="test.group"/></not>
 
53
      </and>
 
54
    </condition>
 
55
 
 
56
    <condition property="test-conform">
 
57
      <or>
 
58
        <equals arg1="${test.type}" arg2="conform"/>
 
59
        <isset property="test-all"/>
 
60
      </or>  
 
61
    </condition>
 
62
 
 
63
    <condition property="test-perf">
 
64
      <or>
 
65
        <equals arg1="${test.type}" arg2="perf"/>
 
66
        <isset property="test-all"/>
 
67
      </or>  
 
68
    </condition>
 
69
 
 
70
    <condition property="test.paths.configured">
 
71
      <and>
 
72
        <isset property="bcel.path"/>
 
73
        <isset property="aspectj.path"/>
 
74
        <isset property="serp.path"/>
 
75
        <isset property="javassist.path"/>
 
76
        <isset property="janino.path"/>
 
77
        <isset property="cobertura.path"/>
 
78
        <isset property="cobertura.runtime.path"/>
 
79
        <isset property="kawa.runtime.path"/>
 
80
        <isset property="csg-bytecode.runtime.path"/>
 
81
        <isset property="cojen.runtime.path"/>
 
82
        <isset property="jbet.runtime.path"/>
 
83
        <isset property="jclasslib.runtime.path"/>
 
84
        <isset property="jiapi.runtime.path"/>
 
85
        <isset property="rhino.runtime.path"/>
 
86
      </and>
 
87
    </condition>
 
88
  </target>
 
89
 
 
90
  <!-- ================================== -->
 
91
  <!-- ========  INITIALIZATION   ======= -->
 
92
  <!-- ================================== -->
 
93
  
 
94
  <target name="check" unless="test.paths.configured">
 
95
    <echo message="The 'build.properties' file must be configured"/>
 
96
    <fail/>
 
97
  </target>
 
98
  
 
99
  <target name="init" depends="properties,check">  
 
100
    <mkdir dir="${out.test}"/>
 
101
    <mkdir dir="${out.test}/cases"/>
 
102
    <mkdir dir="${out.test}/reports"/>
 
103
    <path id="test.classpath">
 
104
      <pathelement location="${out.build}/tmp"/>
 
105
      <pathelement location="${out.test}"/>
 
106
      <pathelement path="${bcel.path}"/>
 
107
      <pathelement path="${aspectj.path}"/>
 
108
      <pathelement path="${serp.path}"/>  
 
109
      <pathelement path="${javassist.path}"/>
 
110
      <pathelement path="${janino.path}"/>
 
111
      <pathelement path="${cobertura.runtime.path}"/>
 
112
      <pathelement path="${kawa.runtime.path}"/>
 
113
      <pathelement path="${csg-bytecode.runtime.path}"/>
 
114
      <pathelement path="${cojen.runtime.path}"/>
 
115
      <pathelement path="${jbet.runtime.path}"/>
 
116
      <pathelement path="${jclasslib.runtime.path}"/>
 
117
      <pathelement path="${jiapi.runtime.path}"/>
 
118
      <pathelement path="${rhino.runtime.path}"/>
 
119
    </path>
 
120
  </target>
 
121
  
 
122
  <!-- ==================================== -->
 
123
  <!-- =========== COMPILATION ============ -->
 
124
  <!-- ==================================== -->
 
125
 
 
126
  <target name="compile.test.conform" depends="init">
 
127
    <javac srcdir="${test.conform}" destdir="${out.test}"
 
128
        source="1.5" target="1.5"
 
129
        debug="on" debuglevel="lines,vars,source">
 
130
      <classpath refid="test.classpath"/>
 
131
      <include name="**/*.java"/>
 
132
    </javac>
 
133
    <delete dir="${out.test}/cases"/>
 
134
    <java classname="org.objectweb.asm.test.cases.Generator">
 
135
      <classpath>
 
136
        <pathelement location="${out.build}"/>
 
137
        <pathelement location="${out.test}"/>
 
138
      </classpath>
 
139
      <arg value="${out.test}/cases"/>
 
140
    </java>
 
141
  </target>
 
142
 
 
143
  <target name="compile.test.perf" depends="init">
 
144
    <javac srcdir="${test.perf}" destdir="${out.test}" debug="on" source="1.5" target="1.5">
 
145
      <classpath refid="test.classpath"/>
 
146
      <include name="**/*.java"/>
 
147
      <exclude name="**/xml/*.java"/>
 
148
    </javac>
 
149
  </target>
 
150
 
 
151
  <target name="compile" depends="compile.test.conform,compile.test.perf"/>
 
152
 
 
153
  <!-- ============================= -->
 
154
  <!-- =========== TEST ============ -->
 
155
  <!-- ============================= -->
 
156
 
 
157
  <target name="testConform" depends="compile" if="test-conform">
 
158
    <ant antfile="${test.conform}/adviceadapter.xml" inheritRefs="true"/>
 
159
    <ant antfile="${test.conform}/analyzeradapter.xml" inheritRefs="true"/>
 
160
    <ant antfile="${test.conform}/annotations.xml" inheritRefs="true"/>
 
161
    <ant antfile="${test.conform}/asmifier.xml" inheritRefs="true"/>
 
162
    <ant antfile="${test.conform}/basicinterpreter.xml" inheritRefs="true"/>
 
163
    <ant antfile="${test.conform}/basicverifier.xml" inheritRefs="true"/>
 
164
    <ant antfile="${test.conform}/checkclassadapter.xml" inheritRefs="true"/>
 
165
    <ant antfile="${test.conform}/checksignatureadapter.xml" inheritRefs="true"/>
 
166
    <ant antfile="${test.conform}/classadapter.xml" inheritRefs="true"/>
 
167
    <ant antfile="${test.conform}/classnode.xml" inheritRefs="true"/>
 
168
    <ant antfile="${test.conform}/classreader.xml" inheritRefs="true"/>
 
169
    <ant antfile="${test.conform}/classwriter.xml" inheritRefs="true"/>
 
170
    <ant antfile="${test.conform}/classwritercomputeframes.xml" inheritRefs="true"/>
 
171
    <ant antfile="${test.conform}/classwritercomputeframesdeadcode.xml" inheritRefs="true"/>
 
172
    <ant antfile="${test.conform}/classwritercomputemaxs.xml" inheritRefs="true"/>
 
173
    <ant antfile="${test.conform}/classwritercopypool.xml" inheritRefs="true"/>
 
174
    <ant antfile="${test.conform}/classwriterresizeinsns.xml" inheritRefs="true"/>
 
175
    <ant antfile="${test.conform}/codesizeevaluator.xml" inheritRefs="true"/>
 
176
    <ant antfile="${test.conform}/gasmifier.xml" inheritRefs="true"/>
 
177
    <ant antfile="${test.conform}/jsrinlineradapter.xml" inheritRefs="true"/>
 
178
    <ant antfile="${test.conform}/localvariablessorter.xml" inheritRefs="true"/>
 
179
    <ant antfile="${test.conform}/localvariablessorter2.xml" inheritRefs="true"/>
 
180
    <ant antfile="${test.conform}/remappingadapter.xml" inheritRefs="true"/>
 
181
    <ant antfile="${test.conform}/remappingadapter2.xml" inheritRefs="true"/>
 
182
    <ant antfile="${test.conform}/saxadapter.xml" inheritRefs="true"/>
 
183
    <ant antfile="${test.conform}/signaturewriter.xml" inheritRefs="true"/>
 
184
    <ant antfile="${test.conform}/simpleverifier.xml" inheritRefs="true"/>    
 
185
    <ant antfile="${test.conform}/sourceinterpreter.xml" inheritRefs="true"/>
 
186
    <ant antfile="${test.conform}/staticinitmerger.xml" inheritRefs="true"/>
 
187
    <ant antfile="${test.conform}/svuidadder.xml" inheritRefs="true"/>
 
188
    <ant antfile="${test.conform}/traceclassadapter.xml" inheritRefs="true"/>
 
189
    <ant antfile="${test.conform}/unit.xml" inheritRefs="true"/>
 
190
    <ant antfile="${test.conform}/verifyclass.xml" inheritRefs="true"/>
 
191
  </target>
 
192
 
 
193
  <target name="testPerf" depends="compile" if="test-perf">
 
194
    <ant antfile="${test.perf}/all.xml" inheritRefs="true"/>
 
195
    <ant antfile="${test.perf}/gen.xml" inheritRefs="true"/>
 
196
    <ant antfile="${test.perf}/mem.xml" inheritRefs="true"/>
 
197
  </target>
 
198
 
 
199
  <target name="testGroup" depends="compile" if="test.group">
 
200
    <ant antfile="test/${test.group}.xml" inheritRefs="true"/>
 
201
  </target>
 
202
 
 
203
  <target name="test" depends="testConform,testPerf,testGroup">
 
204
    <!--junitreport todir="${out.test}/reports">
 
205
      <fileset dir="${out.test}/reports">
 
206
        <include name="TEST-*.xml"/>
 
207
      </fileset>
 
208
      <report todir="${out.test}/reports"/>
 
209
    </junitreport-->
 
210
  </target>
 
211
 
 
212
  <!-- ================================== -->
 
213
  <!-- =====  BINARY COMPATIBILITY   ==== -->
 
214
  <!-- ================================== -->
 
215
  
 
216
  <target name="sigtest-setup">
 
217
    <java classname="com.sun.tdk.signaturetest.Setup">
 
218
      <classpath>
 
219
        <pathelement location="${test}/lib/sigtestdev.jar"/>
 
220
      </classpath>
 
221
      <arg value="-apiversion"/>
 
222
      <arg value="${product.artifact}"/>
 
223
      <arg value="-static"/>
 
224
      <arg value="-classpath"/>
 
225
      <arg value="${java.home}/lib/rt.jar;${out.dist}/lib/all/asm-all-${product.artifact}.jar"/>
 
226
      <arg value="-package"/>
 
227
      <arg value="org.objectweb.asm"/>
 
228
      <arg value="-filename"/>
 
229
      <arg value="${test}/ASM.sig"/>
 
230
    </java>
 
231
  </target>
 
232
 
 
233
  <target name="sigtest">
 
234
    <taskdef name="atest" classname="com.sun.tdk.signaturetest.ant.ATest" 
 
235
        classpath="${test}/lib/sigtestdev.jar"/>
 
236
    <atest filename="${test}/ASM.sig"
 
237
        apiversion="${product.artifact}"
 
238
        backward="true" 
 
239
        binary="true"
 
240
        failonerror="true">     
 
241
      <package name="org.objectweb.asm"/>
 
242
      <classpath>
 
243
        <pathelement location="${java.home}/lib/rt.jar"/>
 
244
        <pathelement location="${out.dist}/lib/all/asm-all-${product.artifact}.jar"/>
 
245
      </classpath>
 
246
    </atest>
 
247
  </target>
 
248
  
 
249
</project>