init
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
# This file is the entry with which the test should be executed. It sets the environement to correct values for the tests.
|
||||
# After building the project a correctly configured copy of this file should be available in the build folder.
|
||||
# Executing "ctest -T Test" in the build folder should execute the tests automatically using this file.
|
||||
|
||||
set(ENV{OV_BINARY_PATH} "@DIST_ROOT@")
|
||||
set(OV_CONFIG_SUBDIR @OV_CONFIG_SUBDIR@) # This is used in the dart files
|
||||
set(CMAKE_COMMAND "@CMAKE_COMMAND@")
|
||||
if(WIN32)
|
||||
set(ENV{OV_USERDATA} "$ENV{APPDATA}/${OV_CONFIG_SUBDIR}/")
|
||||
else()
|
||||
SET(ENV{OV_USERDATA} "$ENV{HOME}/.config/${OV_CONFIG_SUBDIR}/")
|
||||
endif()
|
||||
SET(OV_LOGFILE "$ENV{OV_USERDATA}/log/openvibe-designer.log")
|
||||
|
||||
set(CTEST_SOURCE_DIRECTORY "@CMAKE_SOURCE_DIR@")
|
||||
|
||||
# this is the folder where test scenarios can be run under
|
||||
set(ENV{OV_TEST_DEPLOY_PATH} "${CTEST_SOURCE_DIRECTORY}/local-tmp/test-deploy/")
|
||||
|
||||
# subdirs command is deprecated and should be replaced by add_subdirectory calls as per the documentation recommendations,
|
||||
# however the 2 command do not have the same behavior with ctest. Doing the change currently breaks tests.
|
||||
subdirs("${CTEST_SOURCE_DIRECTORY}/contrib/plugins/server-extensions/tcp-tagging/test")
|
||||
#subdirs("${CTEST_SOURCE_DIRECTORY}/plugins/processing/acquisition/test") # No tests here
|
||||
subdirs("${CTEST_SOURCE_DIRECTORY}/plugins/processing/artifact/test")
|
||||
subdirs("${CTEST_SOURCE_DIRECTORY}/plugins/processing/classification/test")
|
||||
subdirs("${CTEST_SOURCE_DIRECTORY}/plugins/processing/data-generation/test")
|
||||
#subdirs("${CTEST_SOURCE_DIRECTORY}/plugins/processing/dll-bridge/test") # No tests here
|
||||
subdirs("${CTEST_SOURCE_DIRECTORY}/plugins/processing/evaluation/test")
|
||||
#subdirs("${CTEST_SOURCE_DIRECTORY}/plugins/processing/examples/test") # No tests here
|
||||
subdirs("${CTEST_SOURCE_DIRECTORY}/plugins/processing/features-selection/test")
|
||||
subdirs("${CTEST_SOURCE_DIRECTORY}/plugins/processing/file-io/test")
|
||||
#subdirs("${CTEST_SOURCE_DIRECTORY}/plugins/processing/matlab/test") # No tests here
|
||||
#subdirs("${CTEST_SOURCE_DIRECTORY}/plugins/processing/network-io/test") # No tests here
|
||||
subdirs("${CTEST_SOURCE_DIRECTORY}/plugins/processing/riemannian/test")
|
||||
subdirs("${CTEST_SOURCE_DIRECTORY}/plugins/processing/signal-processing/test")
|
||||
subdirs("${CTEST_SOURCE_DIRECTORY}/plugins/processing/simple-visualization/test")
|
||||
subdirs("${CTEST_SOURCE_DIRECTORY}/plugins/processing/stimulation/test")
|
||||
#subdirs("${CTEST_SOURCE_DIRECTORY}/plugins/processing/streaming/test") # No tests here
|
||||
#subdirs("${CTEST_SOURCE_DIRECTORY}/plugins/processing/tests/test") # No tests here
|
||||
#subdirs("${CTEST_SOURCE_DIRECTORY}/plugins/processing/tools/test") # No tests here
|
||||
#subdirs("${CTEST_SOURCE_DIRECTORY}/plugins/processing/vrpn/test") # No tests here
|
||||
#subdirs("${CTEST_SOURCE_DIRECTORY}/applications/platform/acquisition-server/test") # No tests here
|
||||
#subdirs("${CTEST_SOURCE_DIRECTORY}/applications/demos/ssvep-demo/test") # No tests here
|
||||
subdirs("${CTEST_SOURCE_DIRECTORY}/applications/demos/vr-demo/test")
|
||||
#subdirs("${CTEST_SOURCE_DIRECTORY}/applications/developer-tools/plugin-inspector/test") # No tests here
|
||||
#subdirs("${CTEST_SOURCE_DIRECTORY}/applications/developer-tools/skeleton-generator/test") # No tests here
|
||||
#subdirs("${CTEST_SOURCE_DIRECTORY}/applications/developer-tools/vrpn-simulator/test") # No tests here
|
||||
#subdirs("${CTEST_SOURCE_DIRECTORY}/documentation/test") # No tests here
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
unamestr=`uname`
|
||||
if [[ "$unamestr" == 'Linux' ]]; then
|
||||
if [[ -e /etc/fedora-release ]]; then
|
||||
echo -e 'openvibe\nopenvibe\n' | sudo passwd
|
||||
echo -e 'spawn ./linux-install_dependencies\n expect "assword:"\n send "openvibe\n"\n expect -timeout 3600 "done."\n expect -timeout 7200 "Install linux dependencies done"\n' | expect
|
||||
else
|
||||
./linux-install_dependencies
|
||||
fi;
|
||||
else
|
||||
#cygwin
|
||||
chmod +x ./win32-install_dependencies.exe
|
||||
./win32-install_dependencies.exe /S
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
|
||||
This directory contains scripts for running the automatic tests of OpenViBE.
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
To use these tests, you need to have openvibe already successfully compiled with the NON-ide buid.
|
||||
|
||||
On windows, you need to have
|
||||
- ctest (cmake suite; usually in openvibe's dependencies)
|
||||
- git command-line tools. The git executable needs to be on PATH.
|
||||
|
||||
On Linux fedora, you need to install :
|
||||
|
||||
# yum install cmake git redhat-lsb gcc-c++ expect
|
||||
|
||||
|
||||
Execute test scripts
|
||||
--------------------
|
||||
Call "ctest -T Test" in folder build/extras-Release/
|
||||
|
||||
|
||||
How to add a new test
|
||||
---------------------
|
||||
|
||||
You can add new test using a DartTestFile.txt placed in the test directory of a specific module.
|
||||
|
||||
For example, designer specific tests should be placed in DartTestFile.txt in applications/platform/designer/test/
|
||||
And specific test for data generation plugin should be placed in DartTestFile.txt in plugins/processing/data-generation/test/
|
||||
To be sure that the test is executed, you need to have the relevant subdirectories declared in file test/CTestfile.cmake.
|
||||
|
||||
For example,
|
||||
|
||||
...
|
||||
SUBDIRS("${CTEST_SOURCE_DIRECTORY}/applications/platform/designer/test")
|
||||
SUBDIRS("${CTEST_SOURCE_DIRECTORY}/plugins/processing/data-generation/test")
|
||||
...
|
||||
|
||||
|
||||
There is an example of a test using Sinus Oscillator in plugins/processing/data-generation/test/DartTestFile.txt.
|
||||
|
||||
|
||||
Test GUI using sikuli-ide
|
||||
-------------------------
|
||||
*** WARNING : THE SIKULI TESTS ARE NOT CURRENTLY MAINTAINED AND PROBABLY WILL NOT WORK ***
|
||||
|
||||
If you have installed sikuli-ide in your linux machine them some GUI test are launch.
|
||||
|
||||
For GUI test with sikuli we need a complete gtk windows manager. Actually, we only test with gnome whole package.
|
||||
|
||||
You need to set the same GTK icon theme between machine that generate test and slave.
|
||||
|
||||
You can install (on ubuntu) :
|
||||
|
||||
sudo aptitude install gnome-tweak-tool ubuntu-mono ttf-ubuntu-font-family light-themes dmz-cursor-theme
|
||||
|
||||
them lanch :
|
||||
|
||||
gnome-tweak-tool
|
||||
|
||||
switch icon theme to Ubuntu-Mono-Dark
|
||||
switch GTK+ theme to Ambiance
|
||||
if there is Windows theme then switch to Ambiance
|
||||
switch Cursor theme to DMZ-White
|
||||
|
||||
|
||||
|
||||
Some remarks
|
||||
------------
|
||||
|
||||
- The tests may run designer with no GUI. In Linux this still needs a X11 context. So you need to be sure that the test can access an X server.
|
||||
If you run on a virtual machine that doesn't start X by default, getting X up can be achieved by automatic start-up of "Xorg -ac&" command to ensure that X server is available.
|
||||
Thats also why we need to define DISPLAY environment variable before launching the tests.
|
||||
- For designing new tests, use the existing DartTestFile.txt files as a starting point
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# This script tries to locate boxes in scenarios which need to be updated
|
||||
#
|
||||
# Assumes openvibe is compiled and installed to dist/, and that we are in test/
|
||||
#
|
||||
|
||||
SYSTEM=`uname -o`
|
||||
if [ $SYSTEM == "Cygwin" ]; then
|
||||
EXT="cmd"
|
||||
else
|
||||
EXT="sh"
|
||||
fi
|
||||
|
||||
pushd .. >/dev/null
|
||||
|
||||
echo Scenarios requiring update:
|
||||
find -iname "*xml" | grep "box-tutorials/\|test/\|bci-examples/" | grep -v dist | while read FN; do
|
||||
dist/openvibe-designer.$EXT --no-session-management --no-pause --no-gui --open "$FN" | grep -q -E ".*WARNING.*Scenario requires.*update.*box"
|
||||
if [ $? == 0 ]; then
|
||||
echo $FN
|
||||
fi
|
||||
done
|
||||
|
||||
popd >/dev/null
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# This script prints out how many times each box has been used in all scenarios
|
||||
#
|
||||
#
|
||||
|
||||
SYSTEM=`uname -o`
|
||||
if [ $SYSTEM == "Cygwin" ]; then
|
||||
EXT="cmd"
|
||||
else
|
||||
EXT="sh"
|
||||
fi
|
||||
|
||||
cd ../dist/share/openvibe/scenarios/
|
||||
../../../openvibe-plugin-inspector.$EXT --no-pause -l | grep -e "^BoxAlgorithm " | sort | while read DUMMY NAME ID; do
|
||||
numLines=`grep -R -i "$ID" | wc -l`
|
||||
echo $NAME : $numLines occurrences
|
||||
if [ $numLines -eq 0 ]; then
|
||||
echo !!! No scenario for $NAME $ID
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user