Non-Java source files in the tests directory now appear on the classpath for unit...
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Sun, 28 Aug 2005 23:20:05 +0000 (23:20 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Sun, 28 Aug 2005 23:20:05 +0000 (23:20 +0000)
JUnit only picks up test case files that end in Test now to avoid picking up other classes in the test directory - Fixes bug 425

Added support for directories with in the bin directory (should have been there before, but wasn't)

git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@1835 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

custom/extension-build.xml

index 1894c4f..818432a 100644 (file)
                                debug="on"
                                source="1.4"
                                deprecation="true"/>
+                        
+                        <!-- Copy any conf files over so that they end up on the classpathh -->
+                        <copy todir="${ext.test.classes}">
+                                                       <fileset dir="${ext.test.src}">
+                               <include name="**" />
+                                                           <exclude name="**/*.java"/>
+                            </fileset>
+                        </copy>
 
                         <echo message="Running tests cases for extension ${ext.name}" />
                         <junit printsummary="no" fork="yes" haltonerror="true" haltonfailure="true" dir="${ext.root}">
                             <classpath refid="ext-test-path"/>
                             <formatter type="plain" />
                             <batchtest todir="${ext.root}">
-                                <fileset dir="${ext.test.src}" />
+                                <fileset dir="${ext.test.classes}">
+                                    <include name="**/Test.java"/>
+                                </fileset>
                             </batchtest>
                         </junit>
                     </then>
             <then>
                 <copy todir="${ext.filesystem.home}/bin">
                     <fileset dir="${ext.bin}">
-                        <include name="*" />
+                        <include name="**" />
                     </fileset>
                 </copy>
                 <chmod dir="${ext.filesystem.home}/bin" perm="ug+rx" includes="**/*" />