Required pre-configuration
- build sources
- please reference README file to build the sources of device-io
- JDK 8
- download JDK8
- apache-ant
- download apache-ant distribution
- jtharness
- wiki
- download link
- IMPORTANT: javatest.jar and jh.jar from the distribution must be placed in the dev/tests/lib folder
- google-gson library v2.1
- download link
- IMPORTANT: gson-2.1.jar from the distribution must be placed in de/tests/lib folder
Start JT Harness:
- export JAVA_HOME=<location of JDK8 install>
- export ANT_HOME=<location of apache-ant distribution>
to compile:
- ${ANT_HOME}/bin/ant compile
to build jar:
- ${ANT_HOME}/bin/ant jar
to compile and run JT Harness GUI:
- ${ANT_HOME}/bin/ant -Djavatest.mode.batch=false run-javatest
to compile and run tests in batch mode:
- ${ANT_HOME}/bin/ant run-javatest
Configure and run
- start JT Harness GUI on your host machine
- Configure -> Edit configuration
Answer all the required questions, select Agent in the modes question and press Done
IMPORTANT: while configuring GPIO Ports, in pins section specify pin id's defined above in GPIO Pins section, so i.e 0,1,2,3, not the real pins numbers - ssh on the device
- copy build classes there keeping the layout to enable agent's map functionality
- create a map file, to map layout on the host and on the device
NOTE: take a look an the map_example.txt in the repository root as an example - run agent
java -cp ./lib/javatest.jar com.sun.javatest.agent.AgentMain -activeHost <your host ip> -map ../map.txt -trace - this will provide an output like
set map:
map-from: C:\JDK\bin\java.exe
map-to: /jdk/bin/java
map-from: D:\DIOTests
map-to: /home/user/DIOTests
map-from: \
map-to: /
map-from: ;
map-to: :
end of map
AGENT STARTED, maxThreads=
1
THREAD Agent0 STARTED com.sun.javatest.agent.Agent$
1
host not responding: Connection refused
THREAD Agent0 com.sun.javatest.agent.ConnectionFactory$Fault: java.net.ConnectException: Connection refused
- to connect your host machine with your device, in JT Harness GUI, press Tools -> Agent monitor and click on Listening, this will connect your device with your host. On the device side you will see similar output
THREAD Agent0 STARTED com.sun.javatest.agent.Agent$
1
REQUEST FROM <hostname>,port=<port1>,localport=<port2>
- now select and run tests, right click and press Execute These Tests
Overview
Content Tools
ThemeBuilder