1. Patrick Mézard
  2. libphonenumber-csharp

Commits

rou...@google.com@ee073f10-1060-11df-b6a4-87a95322a99c  committed 436bb73

Add a build target that runs a specified unit test

  • Participants
  • Parent commits c1e2616
  • Branches default

Comments (0)

Files changed (1)

File java/build.xml

View file
     </junitreport>
   </target>
 
+  <target name="testname" unless="test">
+    <fail message="You must run this target with -Dtest=TestName"/>
+  </target>
+
+  <target name="test" depends="test-jar, testname">
+    <junit printsummary="withOutAndErr">
+      <classpath refid="test.classpath"/>
+      <formatter type="plain" usefile="false"/>
+      <batchtest fork="no">
+        <fileset dir="${libphonenumber.test.dir}" includes="**/*${test}.java"/>
+        <fileset dir="${geocoder.test.dir}" includes="**/*${test}.java"/>
+      </batchtest>
+    </junit>
+  </target>
+
   <target name="clean" description="Remove generated files.">
     <delete dir="${build.dir}"/>
   </target>
 
   <target name="clean-build" depends="clean,jar"/>
 </project>
-