Copyright Tecnalia 2020
Contains generic python file for testing (in CI process) a docker image generated within the context of the Eurobench framework.
An Eurobench docker image is defined by:
- an algorithm to launch.
It is associated to a script available in the docker image (
pi_name
) - A folder with reference input data files (
input_folder
) - A folder with reference output data files (
output_folder
) - A set of input parameters provided to the Pi algorithm (
parameters
)
All that information is provided within an XML file, with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<test_plan>
<test pi_name="./run_protocol1"
parameters="/in/jointAngles.csv /in/platformData.csv /in/emg.csv /out"
input_folder="data/protocol1/input"
output_folder="data/protocol1/output"/>
<test pi_name="./run_protocol2"
parameters="/in/jointAngles.csv /in/platformData.csv /in/emg.csv /out"
input_folder="data/protocol2/input"
output_folder="data/protocol2/output"/>
</test_plan>
In the previous example, two tests will be conducted.
The first one will launch the algorithm ./run_protocol1
.
All input files are stored in the folder data/protocol1/input
.
The parameters required by the script are indicated through the tag parameters
, where /in
is the folder containing the input files.
A set of files are to be generated by the program.
All will be compared with the reference ones, as provided within the folder indicated in the output_folder
tag.
A similar process will be also conducted or the second algorithm, named ./run_protocol2
-
We currently use that file directly within the CI process, so that no proper installation is so far envisioned: the python test file is directly downloaded locally for direct use.
wget -O test_docker_call.py https://raw.githubusercontent.com/eurobench/docker_test/master/test_docker_call.py
export DOCKER_IMAGE='pi_bullet'
export TEST_PLAN='tests/test_plan.xml'
python3 test_docker_call.py
Supported by Eurobench - the European robotic platform for bipedal locomotion benchmarking. More information: Eurobench website
This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement no. 779963.
The opinions and arguments expressed reflect only the author‘s view and reflect in no way the European Commission‘s opinions. The European Commission is not responsible for any use that may be made of the information it contains.