Project

General

Profile

« Previous | Next » 

Revision d20f93a2

Added by Neels Hofmeyr about 4 years ago

add MobileIdentity as separate class, add test

Use fixed applet-project.mk to put Mobile Identity implementations in a
separate class MobileIdentity.java.

That allows trivially testing the MobileIdentity implementation outside of an
actual SIM card environment: add a 'test' target to the Makefile and a
Test.java class that runs some tests.

View differences:

sim-applet/Makefile
6 6
PACKAGE_NAME    = org.osmocom.IMSIPseudo
7 7
PACKAGE_VERSION = 1.0
8 8

  
9
SOURCES = src/org/osmocom/IMSIPseudo/IMSIPseudo.java
9
SOURCES = src/org/osmocom/IMSIPseudo/MobileIdentity.java src/org/osmocom/IMSIPseudo/IMSIPseudo.java
10

  
10 11
CAP_FILE = build/javacard/org/osmocom/IMSIPseudo/javacard/IMSIPseudo.cap
11 12

  
12 13
include ./applet-project.mk
......
37 38
		--kid "$$KID1"
38 39

  
39 40
delete: remove
41

  
42
.PHONY: test
43
test:
44
	mkdir -p ./test/classes
45
	javac -target 1.1 -source 1.3 -classpath test/classes -g -d ./test/classes src/org/osmocom/IMSIPseudo/MobileIdentity.java
46
	javac -target 1.1 -source 1.3 -classpath test/classes -g -d ./test/classes src/org/osmocom/IMSIPseudo/Test.java
47
	java -classpath test/classes org.osmocom.IMSIPseudo.Test

Also available in: Unified diff

Add picture from clipboard (Maximum size: 48.8 MB)