@@ -137,13 +137,17 @@ TODO:
137
137
<property name =" build-quick.dir" value =" ${ build.dir } /quick" />
138
138
<property name =" build-pack.dir" value =" ${ build.dir } /pack" />
139
139
<property name =" build-osgi.dir" value =" ${ build.dir } /osgi" />
140
+ <property name =" build-junit.dir" value =" ${ build.dir } /junit" />
140
141
<property name =" build-strap.dir" value =" ${ build.dir } /strap" />
141
142
<property name =" build-docs.dir" value =" ${ build.dir } /scaladoc" />
142
143
<property name =" build-sbt.dir" value =" ${ build.dir } /sbt-interface" />
143
144
144
145
<property name =" test.osgi.src" value =" ${ partest.dir } /osgi/src" />
145
146
<property name =" test.osgi.classes" value =" ${ build-osgi.dir } /classes" />
146
147
148
+ <property name =" test.junit.src" value =" ${ partest.dir } /junit" />
149
+ <property name =" test.junit.classes" value =" ${ build-junit.dir } /classes" />
150
+
147
151
<property name =" dists.dir" value =" ${ basedir } /dists" />
148
152
149
153
<property name =" copyright.string" value =" Copyright 2002-2013, LAMP/EPFL" />
@@ -208,6 +212,12 @@ TODO:
208
212
<dependency groupId =" biz.aQute" artifactId =" bnd" version =" 1.50.0" />
209
213
</artifact : dependencies >
210
214
215
+ <!-- JUnit -->
216
+ <property name =" junit.version" value =" 4.10" />
217
+ <artifact : dependencies pathId =" junit.classpath" filesetId =" junit.fileset" >
218
+ <dependency groupId =" junit" artifactId =" junit" version =" ${ junit.version } " />
219
+ </artifact : dependencies >
220
+
211
221
<!-- Pax runner -->
212
222
<property name =" pax.exam.version" value =" 2.5.0" />
213
223
<artifact : dependencies pathId =" pax.exam.classpath" filesetId =" pax.exam.fileset" >
@@ -218,10 +228,11 @@ TODO:
218
228
<dependency groupId =" org.ops4j.pax.swissbox" artifactId =" pax-swissbox-framework" version =" 1.5.1" />
219
229
<dependency groupId =" ch.qos.logback" artifactId =" logback-core" version =" 0.9.20" />
220
230
<dependency groupId =" ch.qos.logback" artifactId =" logback-classic" version =" 0.9.20" />
221
- <dependency groupId =" junit" artifactId =" junit" version =" 4.10 " />
231
+ <dependency groupId =" junit" artifactId =" junit" version =" ${ junit.version } " />
222
232
<dependency groupId =" org.apache.felix" artifactId =" org.apache.felix.framework" version =" 3.2.2" />
223
233
</artifact : dependencies >
224
234
235
+
225
236
<artifact : dependencies pathId =" partest.extras.classpath" filesetId =" partest.extras.fileset" versionsId =" partest.extras.versions" >
226
237
<dependency groupId =" com.googlecode.java-diff-utils" artifactId =" diffutils" version =" 1.3.0" />
227
238
<dependency groupId =" org.scala-tools.testing" artifactId =" test-interface" version =" 0.5" />
@@ -673,6 +684,12 @@ TODO:
673
684
</path>
674
685
-->
675
686
687
+ <path id =" test.junit.compiler.build.path" >
688
+ <pathelement location =" ${ test.junit.classes } " />
689
+ <path refid =" quick.compiler.build.path" />
690
+ <path refid =" junit.classpath" />
691
+ </path >
692
+
676
693
<path id =" test.osgi.compiler.build.path" >
677
694
<pathelement location =" ${ test.osgi.classes } " />
678
695
<pathelement location =" ${ build-osgi.dir } /org.scala-lang.scala-library.jar" />
@@ -1437,6 +1454,45 @@ TODO:
1437
1454
<stopwatch name =" quick.sbt-interface.timer" action =" total" />
1438
1455
</target >
1439
1456
1457
+ <target name =" test.junit.init" depends =" quick.done" >
1458
+ <uptodate property =" test.junit.available" targetfile =" ${ build-junit.dir } /test-compile.complete" >
1459
+ <srcfiles dir =" ${ test.junit.src } " >
1460
+ <include name =" **/*.scala" />
1461
+ </srcfiles >
1462
+ </uptodate >
1463
+ </target >
1464
+
1465
+ <target name =" test.junit.comp" depends =" test.junit.init, quick.done" unless =" test.junit.available" >
1466
+ <stopwatch name =" test.junit.compiler.timer" />
1467
+ <mkdir dir =" ${ test.junit.classes } " />
1468
+ <scalacfork
1469
+ destdir =" ${ test.junit.classes } "
1470
+ compilerpathref =" quick.compiler.path"
1471
+ params =" ${ scalac.args.quick } "
1472
+ srcdir =" ${ test.junit.src } "
1473
+ jvmargs =" ${ scalacfork.jvmargs } " >
1474
+ <include name =" **/*.scala" />
1475
+ <compilationpath refid =" test.junit.compiler.build.path" />
1476
+ </scalacfork >
1477
+ <touch file =" ${ build-junit.dir } /test-compile.complete" verbose =" no" />
1478
+ <stopwatch name =" test.junit.compiler.timer" action =" total" />
1479
+ </target >
1480
+
1481
+ <target name =" test.junit" depends =" test.junit.comp" >
1482
+ <stopwatch name =" test.junit.timer" />
1483
+ <mkdir dir =" ${ test.junit.classes } " />
1484
+ <junit fork =" yes" haltonfailure =" yes" showoutput =" yes" printsummary =" on" >
1485
+ <classpath refid =" test.junit.compiler.build.path" />
1486
+ <batchtest fork =" yes" todir =" ${ build-junit.dir } " >
1487
+ <fileset dir =" ${ test.junit.classes } " >
1488
+ <include name =" **/*Test.class" />
1489
+ </fileset >
1490
+ </batchtest >
1491
+ <formatter type =" plain" />
1492
+ </junit >
1493
+ <stopwatch name =" test.junit.timer" action =" total" />
1494
+ </target >
1495
+
1440
1496
<!-- See test/build-partest.xml for the macro(s) being used here. -->
1441
1497
1442
1498
<target name =" test.suite" depends =" pack.done" >
@@ -1467,7 +1523,7 @@ TODO:
1467
1523
1468
1524
<!-- for use in PR validation, where stability is rarely broken, so we're going to use starr for locker,
1469
1525
and skip test.stability (which requires locker == quick) -->
1470
- <target name =" test.core" depends =" test.osgi, test.sbt, test.bc, test.interactive, test.continuations.suite, test.scaladoc, test.suite" />
1526
+ <target name =" test.core" depends =" test.osgi, test.sbt, test.bc, test.junit, test. interactive, test.continuations.suite, test.scaladoc, test.suite" />
1471
1527
<target name =" test.done" depends =" test.core, test.stability" />
1472
1528
1473
1529
<!-- ===========================================================================
0 commit comments