Browse Source

Pass DMDIRC_HOME to unit tests.

Fixes Issue 0003635: make ant set DMDIRC_HOME env variable when running unit tests.

Change-Id: I5a2ee45945b2f511dbf63114e567e8ef992c65fe
Reviewed-on: http://gerrit.dmdirc.com/644
Automatic-Compile: Chris Smith <chris@dmdirc.com>
Reviewed-by: Chris Smith <chris@dmdirc.com>
tags/0.6.3b1
Shane Mc Cormack 14 years ago
parent
commit
dfbe987b8c
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      nbproject/build-impl.xml

+ 7
- 0
nbproject/build-impl.xml View File

29
     <path id="plugins.libs">
29
     <path id="plugins.libs">
30
         <fileset dir="modules/plugins/lib" includes="*.jar"/>
30
         <fileset dir="modules/plugins/lib" includes="*.jar"/>
31
     </path>
31
     </path>
32
+    <property name="test_profile_dir" value="./test_profile"/>
32
     <target name="-pre-init">
33
     <target name="-pre-init">
33
         <!-- Empty placeholder for easier customization. -->
34
         <!-- Empty placeholder for easier customization. -->
34
         <!-- You can override this target in the ../build.xml file. -->
35
         <!-- You can override this target in the ../build.xml file. -->
204
             <attribute default="${excludes}" name="excludes"/>
205
             <attribute default="${excludes}" name="excludes"/>
205
             <attribute default="**" name="testincludes"/>
206
             <attribute default="**" name="testincludes"/>
206
             <sequential>
207
             <sequential>
208
+                <delete dir="${test_profile_dir}"/>
207
                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" timeout="120000">
209
                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" timeout="120000">
208
                     <classpath>
210
                     <classpath>
209
                         <pathelement path="${clover.jar}"/>
211
                         <pathelement path="${clover.jar}"/>
210
                     </classpath>
212
                     </classpath>
213
+                    <env key="DMDIRC_HOME" value="${test_profile_dir}"/>
211
                     <classpath refid="plugins.libs"/>
214
                     <classpath refid="plugins.libs"/>
212
                     <batchtest todir="${build.test.results.dir}">
215
                     <batchtest todir="${build.test.results.dir}">
213
                         <clover-optimized-testset>
216
                         <clover-optimized-testset>
243
                     <formatter type="xml"/>
246
                     <formatter type="xml"/>
244
                     <jvmarg line="${run.jvmargs}"/>
247
                     <jvmarg line="${run.jvmargs}"/>
245
                 </junit>
248
                 </junit>
249
+                <delete dir="${test_profile_dir}"/>
246
             </sequential>
250
             </sequential>
247
         </macrodef>
251
         </macrodef>
248
     </target>
252
     </target>
253
             <attribute default="${excludes}" name="excludes"/>
257
             <attribute default="${excludes}" name="excludes"/>
254
             <attribute default="**" name="testincludes"/>
258
             <attribute default="**" name="testincludes"/>
255
             <sequential>
259
             <sequential>
260
+                <delete dir="${test_profile_dir}"/>
256
                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" timeout="120000">
261
                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" timeout="120000">
257
                     <classpath refid="plugins.libs"/>
262
                     <classpath refid="plugins.libs"/>
263
+                    <env key="DMDIRC_HOME" value="${test_profile_dir}"/>
258
                     <batchtest todir="${build.test.results.dir}">
264
                     <batchtest todir="${build.test.results.dir}">
259
                         <fileset dir="${main.test.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
265
                         <fileset dir="${main.test.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
260
                             <filename name="@{testincludes}"/>
266
                             <filename name="@{testincludes}"/>
277
                     <formatter type="xml"/>
283
                     <formatter type="xml"/>
278
                     <jvmarg line="${run.jvmargs}"/>
284
                     <jvmarg line="${run.jvmargs}"/>
279
                 </junit>
285
                 </junit>
286
+                <delete dir="${test_profile_dir}"/>
280
             </sequential>
287
             </sequential>
281
         </macrodef>
288
         </macrodef>
282
     </target>
289
     </target>

Loading…
Cancel
Save