Skip to content

Commit 71b8eba

Browse files
committed
Reinstate unit tests
1 parent 8155f7e commit 71b8eba

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
vivokey-otp.cap
2-
ant-javacard-*.jar
1+
*.cap
2+
*.jar

build.xml

+26-1
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,36 @@
77
<taskdef name="javacard" classname="pro.javacard.ant.JavaCard" classpath="ant-javacard-${version}.jar"/>
88
</target>
99

10-
<target name="build" depends="ant-javacard">
10+
<target name="build" depends="test,ant-javacard">
1111
<javacard>
1212
<cap jckit="oracle_javacard_sdks/jc222_kit" aid="A0:00:00:06:17:00:61:FC:54:D5:01" output="vivokey-otp.cap" sources="applet/src">
1313
<applet class="pkgYkneoOath.YkneoOath"/>
1414
</cap>
1515
</javacard>
1616
</target>
17+
18+
<target name="test">
19+
<local name="tmpdir"/>
20+
<tempfile property="tmpdir" destDir="${java.io.tmpdir}"/>
21+
<mkdir dir="${tmpdir}"/>
22+
23+
<javac destDir="${tmpdir}" includeantruntime="false">
24+
<src path="test/src"/>
25+
<src path="applet/src"/>
26+
<classpath location="junit-4.12.jar"/>
27+
<classpath location="jcardsim-2.2.2-all.jar"/>
28+
</javac>
29+
30+
<junit fork="yes">
31+
<classpath location="${tmpdir}"/>
32+
<classpath location="test/resources"/>
33+
<classpath location="junit-4.12.jar"/>
34+
<classpath location="hamcrest-core-1.3.jar"/>
35+
<classpath location="jcardsim-2.2.2-all.jar"/>
36+
<batchtest>
37+
<fileset dir="${tmpdir}" includes="pkgYkneoOathTest/*.class"/>
38+
<formatter type="plain" usefile="false"/>
39+
</batchtest>
40+
</junit>
41+
</target>
1742
</project>

0 commit comments

Comments
 (0)