mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 02:21:36 +08:00
Integrate Python-based tests and benchmark into Travis
* Unfortunately, due to the SWIG dependency, we need sudo to install on Travis (conflicts when adding with debian-sid source prevent using addons) which means we cannot use the container-based infrastructure anymore. * Building the Python bindings requires g++5 (at least with -Werr set). * When building the Python bindings on Travis, the numpy includes are not found by cmake, so they have to be added separately by running a Python process with `numpy.get_include()` * The build script now (somewhat clumsily) depends on the RUN_PYTEST environment variable. If it is set to anything other than "", it will make the tests and run tests and benchmarks
This commit is contained in:
@@ -35,9 +35,20 @@
|
||||
# Exit on any error.
|
||||
set -e
|
||||
|
||||
# Build EKF shared library.
|
||||
mkdir Build -p
|
||||
cd Build
|
||||
cmake ../EKF
|
||||
make
|
||||
cd ..
|
||||
if [ -z ${RUN_PYTEST} ];
|
||||
then
|
||||
# Build EKF shared library.
|
||||
mkdir Build -p
|
||||
cd Build
|
||||
cmake ../EKF
|
||||
make
|
||||
cd ..
|
||||
else
|
||||
# Build EKF shared library.
|
||||
mkdir Build -p
|
||||
cd Build
|
||||
cmake -DPythonTests=1 ../EKF
|
||||
make pytest
|
||||
make pytest-benchmark
|
||||
cd ..
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user