Commit a1689188 authored by George Nash's avatar George Nash Committed by Kishen Maloor

Run junit tests as part of Java build

Signed-off-by: George Nash's avatarGeorge Nash <>
parent 5667cba6
Pipeline #593 passed with stage
in 7 minutes and 44 seconds
......@@ -30,9 +30,16 @@ Linux_with_java:
- swig -version
- java -version
- javac -version
- wget --quiet --output-document=junit-4.13.jar
- wget --quiet --output-document=hamcrest-core-1.3.jar
- cd port/linux
- make TCP=1 IPV4=1 CLOUD=1 PKI=1 JAVA=1
- cd -
- cd swig/apps/unit_test
- JUNIT4=../../../junit-4.13.jar ./
- JUNIT4=../../../junit-4.13.jar HAMCREST_CORE=../../../hamcrest-core-1.3.jar ./
- cd -
stage: build
# remove existing .class files
rm -rf ./bin
# create .class files directory
mkdir ./bin
# compile server java files
javac -cp ../../iotivity-lite-java/libs/iotivity-lite.jar:$JUNIT4 -sourcepath ../../iotivity-lite-java/junit -d ./bin ../../iotivity-lite-java/junit/org/iotivity/*.java
# create jar file
jar -cfv iotivity-junit.jar -C ./bin .
\ No newline at end of file
java -Djava.library.path=../../iotivity-lite-java/libs -cp iotivity-junit.jar:../../iotivity-lite-java/libs/iotivity-lite.jar:$JUNIT4:$HAMCREST_CORE org.iotivity.TestRunner
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment