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 <george.nash@intel.com>
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 https://search.maven.org/remotecontent?filepath=junit/junit/4.13/junit-4.13.jar
- wget --quiet --output-document=hamcrest-core-1.3.jar https://search.maven.org/remotecontent?filepath=org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
script:
- 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 ./build-unit-tests.sh
- JUNIT4=../../../junit-4.13.jar HAMCREST_CORE=../../../hamcrest-core-1.3.jar ./run-unit-tests.sh
- cd -
Android_build:
stage: build
......
#!/bin/bash
# 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 .
#$HOME/junit/junit-4.13.jar
\ No newline at end of file
#!/bin/bash
#$HOME/junit/junit-4.13.jar
#$HOME/junit/hamcrest-core-1.3.jar
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