• Home
    • View
    • Login
    This page
    • Normal
    • Export PDF
    • Export Word
    • Attachments
    • Page Information

    Loading...
  1. Dashboard
  2. Device I/O
  3. Main
  4. Tests Configuration And Execution

Tests Configuration And Execution

  • Created by Jen Dority on Jul 21, 2014

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
      • https://wiki.openjdk.java.net/display/CodeTools/JT+Harness
    • download link
      • https://adopt-openjdk.ci.cloudbees.com/job/jtharness/lastSuccessfulBuild/artifact/jtharness-62.tar.gz
    • 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
      • https://google-gson.googlecode.com/files/google-gson-2.1-release.zip
    • 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
  • No labels

Terms of Use
• License: GPLv2
• Privacy • Trademarks • Contact Us

Powered by a free Atlassian Confluence Open Source Project License granted to https://www.atlassian.com/software/views/opensource-community-additional-license-offer. Evaluate Confluence today.

  • Kolekti ThemeBuilder Powered by Atlassian Confluence 8.5.21
  • Kolekti ThemeBuilder printed.by.atlassian.confluence
  • Report a bug
  • Atlassian News
Atlassian
Kolekti ThemeBuilder EngineAtlassian Confluence
{"serverDuration": 219, "requestCorrelationId": "b7c7b276a8094397"}