Automated Test Environment.
-
Install tools and dependencies:
-
- Run:
sudo apt update sudo apt install git cmake libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libdbus-glib-1-dev libglib2.0-dev python2.7-dev
- Run:
-
- Add entries to /etc/apt/sources.list:
deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe multiverse deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe multiverse
- Run:
sudo apt update sudo apt install git cmake libdbus-glib-1-dev libglib2.0-dev python2.7-dev
- Add entries to /etc/apt/sources.list:
-
-
Clone, build and install VHAT dependencies:
-
Clone repository and init submodules:
git clone [email protected]:VHAT/ATE.git git -C ATE submodule update --init
- Download and install Python 2.7 with latest bugfix https://www.python.org/download/releases/2.7/
- Download and install latest CMake https://cmake.org/download/
- Download and install latest git https://git-scm.com/downloads/
- Download and install Visual Studio 2015 or later https://visualstudio.microsoft.com/downloads/.
- In Visual Studio Installer select Desktop development with C++ and install latest MSVC build tools and Windows 10 SDK.
- Clone, build and install ThirdParty.
-
Create build dir and generate build tool files there:
mkdir build && cd build cmake ../ATE
- To configure build check options section .
-
Build:
cmake --build .
- To choose build target check targets section.
-
Install:
sudo cmake --build . --target install
- To choose install directory check install section.
Only ATE client is supported on Windows platform.
-
Create build dir and generate build tool files there:
md build cd build cmake ..\ATE
-
Build
-
Debug:
cmake --build . --config Debug
-
Release:
cmake --build . --config Release
-
-
Install
- Debug:
cmake --build . --target install --config Debug
- Release:
cmake --build . --target install --config Release
- Debug:
-
cmake path/to/sources -DATE_BUILD_CLIENT=ON [other options ...]
-
cmake path/to/sources -DATE_BUILD_SERVER=ON [other options ...]
-
cmake path/to/sources -DATE_COVERAGE=ON [other options ...]
Turns on the
coverage
target which performs code coverage measurement. -
cmake path/to/sources -DATE_TESTING=OFF [other options ...]
Provides the ability to turn off unit testing and hence the
check
target. As a result, the code coverage measurement is also turned off (see Code coverage). -
cmake path/to/sources -DCMAKE_INSTALL_PREFIX=/usr -DATE_PACKAGE=ON [other options ...]
Turns on the
package
target which allow create deb package.It is highly recommended to create Debian package that would intall into /usr. For now, packaging prefix is strongly tied to the install prefix.
-
cmake path/to/sources -DATE_INSTALL_SERVER_SERVICE=ON [other options ...]
-
cmake path/to/sources -DCMAKE_TOOLCHAIN_FILE=path/to/toolchain/file [other options ...]
-
cmake --build path/to/build/directory cmake --build path/to/build/directory --target all
If a target is not specified (which is equivalent to the
all
target), it builds everything possible including unit tests and also calls thecheck
target. -
cmake --build path/to/build/directory --target check
Launches built (and builds if not yet) unit tests. Enabled by default.
-
On Windows must specify
--config Debug
or--config Release
option. e.g.:cmake --build . --config Debug --target check
See also
test
. -
-
cmake --build path/to/build/directory --target test
Launches built (and builds if not yet) unit tests. Enabled by default.
See also
check
. -
cmake --build path/to/build/directory --target coverage
Analyzes run unit tests (and runs is not yet) using gcovr.
Target is only available if
ATE_COVERAGE
option is on. -
cmake --build path/to/build/directory --target coverage_html
Generate html (index.html) report in binary directory.
Analyzes run unit tests (and runs is not yet) using gcovr.
Target is only available if
ATE_COVERAGE
option is on. -
cmake path/to/sources -DATE_PACKAGE=ON cmake --build path/to/build/directory --target package
Creating package for install.
Target is only available if
ATE_PACKAGE
option is on. -
cmake path/to/sources -DCMAKE_INSTALL_PREFIX=/usr cmake --build path/to/build/directory --target install
Installing ATE to
CMAKE_INSTALL_PREFIX
folder.
-
cmake path/to/sources -DCMAKE_BUILD_TYPE=Debug cmake --build <path/to/build/directory>
-
cmake path/to/sources -DCMAKE_BUILD_TYPE=Debug -DATE_COVERAGE=ON cmake --build path/to/build/directory --target coverage
-
cmake path/to/sources -DATE_BUILD_SERVER=OFF -DATE_TESTING=OFF cmake --build path/to/build/directory>
-
cmake path/to/sources -GNinja cmake --build path/to/build/directory>
-
cmake path/to/sources -DCMAKE_INSTALL_PREFIX=/usr sudo cmake --build path/to/build/directory --target install
-
Building the project in the release mode with creating a package (see target package).
cmake path/to/sources -DCMAKE_BUILD_TYPE=Release -DATE_PACKAGE=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_PREFIX_PATH=path/to/installed/dependencies cmake --build path/to/build/directory --target package
-
-
Enable server service install, install icon storage and create package :
cmake path/to/sources -DCMAKE_INSTALL_PREFIX=/usr -DATE_INSTALL_SERVER_SERVICE=ON -DATE_PACKAGE=ON cmake --build path/to/build/directory --target package
-
You can use dpkg package manager to install this package. This command will also replace the previous installation of ATE:
sudo dpkg -i ate-X.Y.Z.deb
-
-
cmake path/to/sources -DATE_TESTING=ON cmake --build path/to/build/directory --target test
or
cmake path/to/sources -DATE_TESTING=ON cmake --build path/to/build/directory --target check
-
Open server config for edit:
<install prefix>/etc/ate_server.ini
-
Set up video stream:
[VIDEO_STREAM] FrameWidth = <TDK display resolution width> FrameHeight = <TDK display resolution height>
-
Select icon storage:
[DB] Target = <TDK Sync version (sync3 | sync4)> Build = <TDK Sync software build version> CollectionMode = <Current Sync display theme(day_mode | night_mode)>
-
Save the ate_server.ini and run ATE server:
<install prefix>/bin/ate_server
ATE server need to be restarted in order to apply any config or icon storage changes.
-
Open server config for edit:
<install prefix>/etc/ate_server.ini
-
Set up video stream source:
[VIDEO_STREAM] Source = RTSP Path = rtsp://127.0.0.1:8554/lvds
-
Either set up path to send touch events to TDK via VDP server:
[INTERACTION] Type = VDP Address = <ip address of LVDS board running VDP server> Port = <port of VDP server on LVDS board> DisplayType = <type of HMI display as configured on TDK>
Or just stub it:
[INTERACTION] Type = Dummy
-
Select icon storage:
[DB] Target = <TDK sync version (sync3 | sync4)> Build = <Sync software build version> CollectionMode = <Current Sync display theme(day_mode | night_mode)>
-
Save the ate_server.ini and run ATE server:
<install prefix>/bin/ate_server
For full video stream support you will also need to set up webrtc client which is not covered by this project.
Import vhat_client.so from <install prefix>/lib/python2.7/dist-packages into your Python 2.7 code.
If <install prefix> was set to a standard system resource directory (i.e. /usr or /usr/local) then vhat_client.so could be looked up from any point of a system.
Otherwise you'd like to add module location to PYTHONPATH or look it up manually.
No additional configuration is needed.
- Open client config for edit:
<install prefix>/etc/ate_client.ini
- Set IP address of LVDS board running ATE server:
[BOARD] Address = <IP address>
- Import vhat_client.so from <install prefix>/lib/python2.7/dist-packages into your Python 2.7 code. Module look up rules are the same as for LVDS board case above.
- Build tools and libs provided by Ubuntu dev packages are automatically installed by setup-environment.sh script.
- DBManagerLib
- RecognitionLib
- JsonCpp
- GoogleTest
- (LVDS board only) GStreamer
TBD